常用装机顺序
- 更新本地最新包:
yum update -y - 安装常用工具包:
yum groupinstall 'Development Tools' -y - 安装Git
- 安装依赖包:
yum install gettext-devel openssl-devel perl-CPAN perl-devel zlib-devel -y yum install curl-devel -y- 从GitHub上下载源码:
wget https://github.com/git/git/archive/v2.12.2.tar.gz -O git.tar.gz - 解压文件:
tar -zxf git.tar.gz - 切换目录:
cd git-* - 检查:
make configure - 加前缀:
./configure --prefix=/usr/local - 安装:
make install - 记住密码:
git config --global credential.helper cachegit config --global credential.helper 'cache --timeout=36000'
- 安装依赖包:
- 安装Nginx
- 增加nginx仓库:
sudo yum install epel-release -y - 安装nginx:
sudo yum install nginx -y - 启动nginx:
sudo systemctl start nginx - 开机自启:
sudo systemctl enable nginx
- 增加nginx仓库:
- 安装Nodejs
curl --silent --location https://rpm.nodesource.com/setup_6.x | bash -yum -y install nodejs
- 安装cnpm(可选,用来加速安装node包的速度)
npm install -g cnpm --registry=https://registry.npm.taobao.org
- 安装babel
npm install -g babel-cli
其他
- 报错:
libpng12.so.0: cannot open shared object file...
解决方法:yum install libpng12.x86_64 -y - git clone 项目时候 报错:
Unable to find remote helper for 'https'
解决方法:yum install curl-devel
参考文档
How To Install Git on CentOS 7
How To Install Nginx on CentOS 7
Installing Node.js via package manager
淘宝 NPM 镜像
libpng12.so.0: cannot open shared object file - genymotion
“Unable to find remote helper for ‘https’” during git clone
Caching your GitHub password in Git


