1.安裝nodejs
參考官方文檔安裝方式:
在root權限下運行
curl --silent --location https://rpm.nodesource.com/setup_6.x | bash -
安裝nodejs
yum -y install nodejs
安裝編譯工具
yum install gcc-c++ make
OK。
2.安裝nginx
創建文件/etc/yum.repos.d/nginx.repo
[nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/6/$basearch/ gpgcheck=0 enabled=1
安裝nginx
yum -y install nginx
完成。