nginx编译安装流程

1:查看nginx是否安装
rpm -qa nginx

2:安装Nnigx依赖包
1)pcre  安装正则库
yum -y install pcre pcre-devel

2)openssl安装
yum -y install openssl openssl-devel

3:添加用户和组
groupadd nginx
useradd -g nginx nginx -s /sbin/nologin -M

4:编译安装
./configure --prefix=/usr/local/nginx \
--user=nginx \
--group=nginx \
--with-http_ssl_module  \
--with-http_sub_module

5:make && make install

6:启动nginx安装完毕

7:检查服务是否启动(lsof命令和netstat)

lsof -i:80

netstat -nltup |grep nginx

你可能感兴趣的:(nginx编译安装流程)