Install nginx with yum

rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm yum install -y nginx Systemctl start nginx systemctl start nginxCopy the code

After the installation is successful, the browser will display the default welcome page

Nginx common commands

Nginx -t // Check the configuration file is correct nginx -s stop // stop nginx -s quit // stop nginx -s start // start nginx -s reload // reload the configuration fileCopy the code

Linux commands

Whereis nginx / / view nginx address ps - ef | grep nginx / / view the nginx occupy the portCopy the code