Notes for quick installation of nginx in centos 6.4

Source: Internet
Author: User
The articles on how to install nginx in centos 6.4 are written by ex_net (Zhang jianbo). For more information, see the source.
Http://blog.csdn.net/ex_net/article/details/9860689
Author: Zhang jianbo mailbox: 281451020@qq.com Phone: 13577062679 welcome to exchange calls!

 

Step 1: Download The centos installation disk (342 MB)

Http://mirrors.grandcloud.cn/centos/6.4/isos/x86_64/CentOS-6.4-x86_64-minimal.iso

I personally prefer a pure version of the system, so I downloaded the smallest version of the installation disk.

By the way, we recommend a recording software:

Http://nchc.dl.sourceforge.net/project/infrarecorder/InfraRecorder/0.53/ir053.exe

 

Step 2: Install centos

After the disk is started, the next operation is not required. Installation is complete. Wait for 6 minutes and the installation is complete.

 

Step 3: Modify the NIC Configuration

After centos minimal is installed, the NIC will not start by default.

Go to the/etc/sysconfig/network-scripts/directory and find the corresponding Nic configuration file for modification.

For example:

(1) VI ifcfg-eth0

Change onboot = No to onboot = Yes

(2) restart the network

Service Network restart

Step 4: first update the system Installation Software Package

Yum check-Update

Yum-y install wget

 

 

Step 5: Install nginx

(1) download the nginx RPM package

Wget http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm

(2) install the RPM package

Rpm-IVH nginx-release-centos-6-0.el6.ngx.noarch.rpm

(3) install nginx using yum

Yum install nginx

Note: Confirm installation according to Y

Step 6: Modify firewall configurations

VI/etc/sysconfig/iptables

Add Rules

 

# Firewall configuration written by system-config-firewall# Manual customization of this file is not recommended.*filter:INPUT ACCEPT [0:0]:FORWARD ACCEPT [0:0]:OUTPUT ACCEPT [0:0]-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT-A INPUT -p icmp -j ACCEPT-A INPUT -i lo -j ACCEPT-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT-A INPUT -j REJECT --reject-with icmp-host-prohibited-A FORWARD -j REJECT --reject-with icmp-host-prohibitedCOMMIT

 

Restart Firewall

Service iptables restart

Restart nginx

Nginx


Step 7: Open ie Test

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.