# nginx-config **Repository Path**: chenth/nginx-config ## Basic Information - **Project Name**: nginx-config - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2017-11-06 - **Last Updated**: 2022-06-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # nginx-config chenth nginx在centos7下面的安装 1、下载 wget -c https://nginx.org/download/nginx-1.12.2.tar.gz 2、解压 tar -zxvf nginx-1.12.2.tar.gz cd nginx-1.12.2 3、配置(使用默认配置) ./configure 4、编译安装 make && make install 5、注册服务 vim /usr/lib/systemd/system/nginx.service 将下面脚本复制进去 [Unit] Description=Web Service nginx After=network.target [Service] PIDFile=/usr/local/nginx/logs/nginx.pid ExecStart=/usr/local/nginx/sbin/nginx ExecStop=/usr/local/nginx/sbin/nginx -s stop ExecReload=/usr/local/nginx/sbin/nginx -s reload PrivateTmp=true [Install] WantedBy=default.target 6、开机启动nginx systemctl enable nginx.service 7、将配置文件放入conf中