https://blog.csdn.net/qq_45752401/article/details/1226609651.上传文件到指定目录
2.修改文件权限:chmod -R 777 /usr/local/nginx
3.安装依赖库
yum -y install pcre-devel openssl openssl-devel
4.配置configure --prefix 代表安装的路径,--with-http_ssl_module 安装ssl,--with-http_stub_status_module查看nginx的客户端状态
/usr/local/nginx/configure --prefix=/usr/local/nginx --with-http_ssl_module --with-http_stub_status_module
5.第四步执行完nginx目录多了一个Makefile文件,cd到nginx目录执行以下命令来编译安装nginx
make & make install
6.新建logs文件夹
7.复制service到执行目录并设置开机启动
# systemctl start nginx 停止服务
# systemctl stop nginx 停止服务
# systemctl restart nginx 重新启动服务
# systemctl status nginx 查看服务当前状态
# systemctl enable nginx 设置开机自启动
# systemctl disable nginx 停止开机自启动
# systemctl list-units --type=service 查看所有已启动的服务