环境:centos 7.6 1810
软件:vim wget nginx安装包
下载安装包:
nginx-1.16.0.tar.gz
openssl-1.1.1c.tar.gz
pcre-8.43.tar.gz
zlib-1.2.11.tar.gz
解压
tar zxvf nginx-1.16.0.tar.gz
tar zxvf openssl-1.1.1c.tar.gz
tar zxvf pcre-8.43.tar.gz
tar zxvf zlib-1.2.11.tar.gz
安装依赖
yum -y install gcc automake autoconf libtool make gcc-c++
编译
Cd nginx-1.16.0
./configure --prefix=/usr/local/nginx --with-openssl=../openssl-1.0.2r --with-pcre=../pcre-8.43 --with-zlib=../zlib-1.2.11 --with-http_ssl_module --with-http_stub_status_module
安装
Make && make install
启动
./nginx
查看是否启动成功
Curt 127.0.0.1
有返回则启动成功
./nginx -s reload 重读配置文件
COMMENTS | NOTHING