yum -y install nginx
yum -y install nodejs
node -v
#安装nodejs后发现版本不是最新版,安装n,通过n安装最新版nodejs,更新到最新版,但是查版本依然为原先版本,改PATH路径。
which node
which n
vim ~/.bash_profile
#按i进入编辑状态。
export N_PREFIX=/usr/local
export PATH=$N_PREFIX/bin:$PATH
#N_PREFIX是node安装路径
#编辑好之后esc,:wq退出。
source ~/.bash_profile
echo $N_PREFIX
#npm更新
npm install -g npm
更新git
vim /etc/yum.repos.d/wandisco-git.repo
[wandisco-git]
name=Wandisco GIT Repository
baseurl=http://opensource.wandisco.com/centos/7/git/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco
sudo rpm --import http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco
yum install git
参考链接:
https://www.jianshu.com/p/2da3e3c6b8ac
https://www.jb51.net/article/98153.htm
https://blog.csdn.net/qq_39478237/article/details/85704412
原文地址:https://www.cnblogs.com/zhefu77/p/11405487.html