CentOS常用命令

ambari 版本编译

mvn clean install -DskipTests -Drat.skip=true
mvn clean install rpm:rpm  -DskipTests -Drat.skip=true

iperf带宽测试

iperf -s -p 12345 -i 1 -M
iperf -c 94.191.21.117 -p 12345 -i 1 -t 10 -w 20K

远程目录拷贝

scp root@167.179.92.119:/home/.m2/repo/* /home/.m2/repo

DNS设置

nmcli  connection show 
nmcli con mod ens33 ipv4.dns "192.168.137.1"
nmcli con up ens33

SSH登录加速

  • 编辑配置文件 /etc/ssh/sshd_config vim /etc/ssh/sshd_config 找到
    UseDNS选项,如果没有注释,将其注释 #UseDNS yes 添加 UseDNS no

  • 找到 GSSAPIAuthentication选项,如果没有注释,将其注释 #GSSAPIAuthentication yes 添加
    GSSAPIAuthentication no

  • 保存配置文件

  • 重启 OpenSSH服务器 /etc/init.d/sshd restart

设置关联

ln -s ~/node-v9.3.0-linux-x64/bin/node /usr/bin/node
ln -s ~/node-v9.3.0-linux-x64/bin/npm /usr/bin/npm

网卡配置

/etc/sysconfig/network-scripts 目录下的网卡配置文件

路径清除

export PATH=""

TREE命令

安装: yum install tree
参数: -d:只列目录
-L: 目录深度

nodejs设置

  • 查看全局变量:
    echo $PATH
  • 修改配置文件:
    vi /etc/profile
  • 移动到最后一行,新增2行

export NODE_HOME=/usr/local/node_global
export PATH= N O D E H O M E / b i n : {NODE_HOME}/bin: NODEHOME/bin:PATH

  • 移动到
    cd /usr/local/
    npm config set prefix “node_global”
    npm config set cache “node_cache”
    source /etc/profile

  • 检查参数

    npm config get prefix “node_global”

nginx安装

添加nginx的源

rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

安装nginx服务器

yum instrall nginx

cnmp安装

npm install -g cnpm --registry=https://registry.npm.taobao.org

angular 的cnpm安装方式

ng new my-app --skip-install
cd my-app
cnpm install
ng serve
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值