nginx安装

```` cd ~ ## 下载nginx 1.19.6 wget http://nginx.org/download/nginx-1.19.6.tar.gz # wget http://down.leimingyun.com/centos/nginx-1.19.6.zip ## 解压 tar -zxvf nginx-1.19.6.tar.gz # 进入nginx目录 cd nginx-1.19.6 # 配置安装目录 mkdir /mnt/nginx ./configure --prefix=/mnt/nginx --with-http_stub_status_module --with-http_ssl_module # 安装 make && make install # 启动nginx /mnt/nginx/sbin/nginx ```` ## 常用命令 ##### 检查配置 ```` /mnt/nginx/sbin/nginx -t ```` ##### 重启Nginx生效 ```` /mnt/nginx/sbin/nginx -s reload ````