linux nginx 安装及运行教程
1 下载nginx包
在/usr/local 目录下新建nginx文件夹
wget https://nginx.org/download/nginx-1.19.9.tar.gz
2 解压缩,进入目录
tar -zxvf nginx-1.19.9.tar.gz
cd nginx-1.19.9
3 使用配置
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
4 编译和安装
make
make install
5 使用配置文件
./nginx -c /usr/local/nginx/conf/nginx.conf
6 启动nginx
./nginx -s reload
7 查看运行状态
ps -ef|grep nginx