Home > Backend Development > PHP Tutorial > nginx installation on centos

nginx installation on centos

WBOY
Release: 2016-07-29 09:04:07
Original
911 people have browsed it

You cannot directly use yum install nginx to install on centos

I used the rpm installation package.
nginx download URL: http://nginx.org/packages/centos/6/x86_64/RPMS/nginx-1.8.1-1.el6.ngx.x86_64.rpm Choose the appropriate version

Installation Guide CentOS 6.4 Quickly install Nginx http://blog.sina.com.cn/s/blog_586c261a0101i1eu.html

Some configurations after installation, please check if needed:
http://www.server110.com/nginx/201309/981.html
http://liuyu.blog.51cto.com/183345/166381/
I didn't use it anyway. It also feels a bit old

I installed gitlab at the same time, and its installation package also has nginx plug-in, which caused the default port 80 to be occupied.
So you need to modify the nginx configuration file:
vi /etc/nginx/conf.d/default.conf
Modify port 80, and then
/etc/init.d/nginx restart Restart

At the same time, add the new port to the firewall:
vi /etc/sysconfig/iptables
Add port
-A INPUT -m state –state NEW -m tcp -p tcp –dport 88 -j ACCEPT

Restart the firewall:
service iptables restart

nginx forgets the root password and does not have an email to reset, please refer to:
http://www.blogjava.net/Nirvana/archive/2014/03/28/411606.htmlReset password

nginx official website documentation:
http://nginx.org/en/docs/

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces the installation of nginx on centos, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template