- 联网下载nginx
wget http://nginx.org/download/nginx-1.12.2.tar.gz
- 解压压缩文件
使用命令 tar -zxvf nginx-1.12.2.tar.gz
cd nginx-1.12.2
使用命令解压 ./configure完成后,执行make && make install
#开启ssl
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
make && make install
- 启动nginx
cd /usr/local/nginx/sbin
./nginx