This article is a tutorial to share detailed process under Linux yum install nginx, for your reference, as follows
The first step in the / etc / yum.repos.Create a source profile nginx under d / directory.repo:
cd / etc / yum.repos.d /
vim nginx.repo
Fill in the following:
[Nginx]
name = nginx repo
baseurl = http: // nginx.org / packages / centos / $ releasever / $ basearch /
gpgcheck = 0
enabled = 1
Save, it will generate a / etc / yum.repos.d / nginx.repo file.
The following instruction is directly executed automatically installed as Nginx:
yum install nginx -y
The installation is complete, you can start directly below the Nginx:
/ Etc / init.d / nginx start
Nginx has now launched a direct access to the server will be able to see the welcome page of Nginx.
If you can not access, you need to configure what Linux firewall.
iptables -I INPUT 5 -i eth0 -p tcp --dport 80 -m state --state NEW, ESTABLISHED -j ACCEPT
service iptables save
service iptables restart
Nginx commands and configuration files here:
/ Etc / init.d / nginx start # start Nginx Service
/ Etc / init.d / nginx stop # Nginx stop service
/ Etc / nginx / nginx.conf # Nginx configuration file location
So far, Nginx has been fully configured installation is complete.
That''s all for this article, I want to be helpful to learn, I hope you will support script Home.
You may also be interested in the article: proxy_pass configure Nginx reverse proxy server to explain nginx as a reverse proxy load balancing example Nginx as a way to pass the client IP settings of nginx reverse proxy configuration Detailed url redirection - Reverse Proxy Nginx nginx reverse proxy configuration examples websocket study concluded five (nginx reverse proxy) and Nginx reverse proxy cache and cache busting method of centos6.Installation Guide 5 nginxcentos7 use of yum mounting lnmp (linux + nginx + php7 by yum.1 + mysql5.7) nginx reverse proxy configuration Detailed steps yum