Brief introduction
Nginx was developed by Igor Sysoev, the second rambler.ru site for Russian visits, and the first public version of 0.1.0 was released on October 4, 2004. It publishes the source code in the form of a BSD-like license, which is known for its stability, rich feature sets, sample configuration files, and low system resource consumption.
CentOS 7 Conditions
The steps in the tutorial require root user permissions.
One, add Nginx to Yum source
Add the CentOS 7 Nginx Yum Repository, open the terminal, and use the following command:
sudo rpm-uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
Second, install Nginx
In your CentOS 7 server, use the Yum command to obtain from the Nginx source server to install Nginx:
Nginx will complete installation on your CentOS 7 server.
Third, start Nginx
The newly installed Nginx does not start on its own. Run Nginx:
sudo systemctl start Nginx.service
If all goes well, now you can use your domain name or IP to access your Web page to preview the Nginx default page;
If you see this page, the Web server in your CentOS 7 is installed correctly.
CentOS 7 Boot Nginx
sudo systemctl enable Nginx.service
Nginx configuration information
Web site files are stored in the default directory
Site Default Site Configuration
/etc/nginx/conf.d/default.conf
Customizing nginx Site configuration file storage Directory
Nginx Global Configuration
Here you can change the setup user to run the Nginx daemon process, and the number of worker processes gets nginx running, and so on.
Linux View public network IP
You can run the following command to display the public IP address of your server:
IP Addr Show Eth0 | grep inet | awk ' {print $} ' | Sed ' s/\/.*$//'
Summarize
The above is the entire content of this article, I hope the content of this article for everyone's study or work can bring certain help, if you have questions you can message exchange