Operating System: CentOS 7.3 64-bit
1. Download nginx
http://nginx.org/en/download.html
Choose stable version
2. Upload to the /usr/local directory via SSH
3. Unzip tar -xzvf nginx-1.12.0.tar.gz
4. Installation dependencies
yum -y install make zlib zlib-devel gcc-c++ libtool openssl openssl-devel
5、cd /usr/local/nginx-1.12.0
6、./configure
7、make
8、make install
9. Start, shutdown, stop commands
- /usr/local/nginx/sbin/nginx //启动
- /usr/local/nginx/sbin/nginx -s stop //关闭
- /usr/local/nginx/sbin/nginx -s reload //重启
10. Check the startup status
ps -ef | grep nginx
11. Enter the IP in the browser to see if the startup is successful