Centos7 源码安装Nginx
1 、安装依懒包
[root@localhost ~]#yum -y install pcre-devel openssl openssl-devel
2 、下载安装包
[root@localhost ~]# wget http://nginx.org/download/nginx-1.13.8.tar.gz
3 、解压
[root@localhost ~]# tar -zxvf nginx-1.13.8.tar.gz
4 、创建用户
[root@localhost ~]#useradd -M -s /sbin/nologin www
5 、编译
[root@localhost ~]# cd nginx-1.13.8 [root@localhost nginx-1.13.8]#./configure -prefix=/usr/local/nginx --user=www --group=www
6 、安装
[root@localhost nginx-1.13.8]#make -j 4 && make install
7 、启动
[root@localhost ~]# /usr/local/nginx/sbin/nginx [root@localhost ~]# netstat -antup |grep 80 tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 6960/nginx:master
温馨提示:如无特殊说明,本站文章均为作者原创,转载时请注明出处及相应链接!