编译安装nginx
准备好环境
[root@localhost ~]# yum install gcc-c++
[root@localhost ~]# yum install -y pcre pcre-devel
[root@localhost ~]# yum install -y zlib zlib-devel
[root@localhost ~]# wget https://nginx.org/download/nginx-1.16.0.tar.gz
解压 tar -zxvf nginx-1.16.0.tar.gz
改名 mv nginx-1.16.0 nginx
进入目录 cd nginx
[root@localhost ~]# ./configure
[root@localhost ~]# make
[root@localhost ~]# make install
[root@localhost ~]# whereis nginx
[root@localhost ~]# vi /etc/profile export
PATH="$PATH:/usr/local/php73/bin:/usr/local/nginx/sbin/"
#nginx 启动nginx #nginx -s stop 此方式相当于先查出nginx进程id再使用kill命令强制杀掉进程
#nginx -s quit 此方式停止步骤是待nginx进程处理任务完毕进行停止
#nginx -c /usr/local/nginx/conf/nginx.conf
[root@nginx]# ps -aux | grep nginx
root 2884 0.0 0.0 20552 612 ? Ss 15:52 0:00 nginx: master process nginx
nobody 2885 0.0 0.1 21004 1076 ? S 15:52 0:00 nginx: worker process
root 2907 0.0 0.0 112708 980 pts/0 S+ 15:52 0:00 grep --color=auto nginx
安装成功!!!!!