**linux**
1.yum 安装必要插件gcc ssl 等,类似如下:
`yum install pcre-devel -y
`
下载nginx
~~~
cd ~
wget http://nginx.org/download/nginx-1.14.2.tar.gz
~~~
解压
`tar xzf nginx-1.14.2.tar.gz
`
`cd nginx-1.14.2
`
`useradd www
`
~~~
./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
~~~
`make & make install
`
测试配置
`/usr/local/nginx/sbin/nginx -t
`
查看端口
`ps -auz | grep nginx
`
`netstart -ntl
`
启动nginx
`/usr/local/nginx/sbin/nginx`
查看版本及安装配置信息
`/usr/local/nginx/sbin/nginx -V `
结果如下:
![](https://img.kancloud.cn/6c/3d/6c3d06f7e49e650c66b3f87859767870_777x139.png)