1.检查gcc是否安装
gcc -v
2.检查zlib,openssl,pcre安装,没有则安装,命令就不说了,好多人写的挺详细的
rpm -qa openssl
rmp -qa zlib
rpm -qa pcre
3.下载nginx源码包,http://nginx.org/download/nginx-1.14.0.tar.gz,也可以使用高版本,但是有风险
wget http://nginx.org/download/nginx-1.14.0.tar.gz
tar zxvf nginx-1.14.0.tar.gz
cd nginx-1.14.0
./configure
make && make install
4.查看nginx安装路径
whereis nginx
5.查看是否启动进程
ps -aux |grep nginx