# command_for_daily_work **Repository Path**: shadow625/command_for_daily_work ## Basic Information - **Project Name**: command_for_daily_work - **Description**: 日常使用的命令 - **Primary Language**: Shell - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-11-19 - **Last Updated**: 2022-01-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 日常使用的命令 ssh: ##### linux 生成 ssh 密钥 ```shell ssh-keygen -t rsa -C "xxxxx@xxxxx.com" ``` ##### centos mongoDB 配置阿里源 ``` # vi /etc/yum.repos.d/mongodb-org.repo //粘贴如下,数字4.4 可配置,根据官方最新版本,2020年11月19日当前最新为4.4 [mongodb-org] name = MongoDB Repository baseurl = https://mirrors.aliyun.com/mongodb/yum/redhat/$releasever/mongodb-org/4.4/x86_64/ gpgcheck = 1 enabled = 1 gpgkey = https:// www.mongodb.org/static/pgp/server-4.4.asc # yum update # yum install mongodb-org //安装成功 //如果出现安装失败报告NOKEY ,可以关掉gpgcheck 修改repo文件如下: [mongodb-org] name = MongoDB Repository baseurl = https://mirrors.aliyun.com/mongodb/yum/redhat/$releasever/mongodb-org/4.4/x86_64/ gpgcheck = 0 enabled = 1 ``` ##### git alias ```shell alias gd="git diff" alias gs="git status" alias typora="open -a typora" ``` ##### Remote deploy ```shell scp metadata-management.jar root@192.168.10.67:/opt/MY_APP/mdm && ssh -l root 192.168.10.67 "cd /opt/MY_APP/mdm/; ./start.sh" mvn install -DskipTests=true scp zdr-admin/target/zdr-admin.jar root@192.168.10.67:/opt/zdr && ssh -l root 192.168.10.67 "cd /opt/zdr/; ./start.sh" ``` ##### 大数据 ```shell presto --server zdxf-node1:8688 --catalog kudu ``` ##### oh-my-zsh ```shell git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions ``` ##### 自动删除占用指定端口的应用- mac ```shell lsof -i tcp:4334 | grep '\d\d\d' | awk '{print $2}'|xargs kill -9 ```