CENTOS 65 configure YUM to install NGINX
Release: 2016-08-08 09:21:26
Original
896 people have browsed it
The first step is to create a source configuration file nginx.repo: ?1
23
cd
/etc/yum.repos.d/
vim nginx.repo
Fill in the following: ?
1
2
3
4
5
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
|
Save, a /etc/yum.repos.d/nginx.repo file will be generated. Just execute the following command to automatically install Nginx: ?
After the installation is complete, you can start Nginx directly: ?
1
/etc/init .d/nginx start
|
Now that Nginx has been started, you can see the Nginx welcome page by directly accessing the server. If you still cannot access it, you need to configure the Linux firewall. ?
1
2
3
4
5
iptabl es -I INPUT 5 -i eth0 -p tcp --dport 80 - m state --state NEW,ESTABLISHED -j ACCEPT
service iptables save
service iptables restart
|
Nginx command and configuration file location: ?
1
2
3
4
5
/etc/ init.d/nginx start # Start Nginx service
/etc/init.d/nginx stop # Stop Nginx service
/etc/nginx/nginx.conf # Nginx configuration file location
At this point, Nginx has been fully configured and installed.
http://my.oschina.net/VincentJiang/blog/224993
The above introduces how to configure YUM to install NGINX on CENTOS 65, including the relevant aspects. I hope it will be helpful to friends who are interested in PHP tutorials.
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
-
2024-10-22 09:46:29
-
2024-10-13 13:53:41
-
2024-10-12 12:15:51
-
2024-10-11 22:47:31
-
2024-10-11 19:36:51
-
2024-10-11 15:50:41
-
2024-10-11 15:07:41
-
2024-10-11 14:21:21
-
2024-10-11 12:59:11
-
2024-10-11 12:17:31