1、wget http://nginx.org/download/nginx-1.12.2.tar.gz
2、tar -zxvf nginx-1.12.2.tar.gz
3、ls -alh | grep nginx
4、cd nginx-1.12.2
5、./configure --prefix=/usr/local/nginx --with-pcre=../pcre-8.42
6、make
7、make install
8、cd /usr/local/nginx/sbin
杀死apache的进程
ps aux | grep httpd
Kill -9 进程号 先杀root