1. Build Nginx Web site on the Linux server CentOS virtual machine

Source: Internet
Author: User
Tags ssh access install redis

1. Build a Linux virtual machine

Specific reference http://jingyan.baidu.com/article/86112f135e584a273697876b.html (how to build a Linux virtual machine under WIN7)

Download the software address:

1, VMware self-Baidu download

CentOS 6.5 Official Edition (32-bit + 64-bit) Download http://www.centoscn.com/CentosSoft/iso/2013/1205/2196.html

2. Setting up the virtual machine network

After the virtual machine is installed, I need Win7 to SSH access to the virtual Linux, the default network may not be available. Point in virtual machine-"VMware's head Menu-" Virtual machine-"settings-" hardware-"Network adapter-" Network connection-"NAT mode-" Confirm

3. Modify the SSH configuration

Vim/etc/ssh/sshd_config Remove the # number in front of them

Port 22ListenAddress 0.0.0.0Protocol 2

4. Successful connection

On the virtual machine command line, enter Ifconfig to locate the virtual machine's LAN IP. Then log in win7 ssh [email protected] (enter password)

2. Modify Yum's source configuration to successfully install Nginx, git, Redis, Nodejs and other environments

I use yum install download software has been unsuccessful, this toss me depressed, the back finally solved, reference http://www.laozuo.org/5755.html

wget HTTP://DL.FEDORAPROJECT.ORG/PUB/EPEL/6/X86_64/EPEL-RELEASE-6-8.NOARCH.RPMRPM-IVH epel-release-6-8.noarch.rpm

Yum Install git
Yum Install Nginx
Yum Install Redis
Yum Install Nodejs
Yum Install NPM

3. Open Nginx, need to shut down the Linux firewall

In the shell command, enter

Open: Nginx

Pause Nginx-s Stop

Restart Nginx-s Reload

Linux firewall, configuration address/etc/sysconfig/iptables

Open: Service iptables start
Close: Service iptables stop

Iptables Way
To view the firewall status:
/etc/init.d/iptables status
To temporarily turn off the firewall:
/etc/init.d/iptables stop
Restart Iptables:
/etc/init.d/iptables restart

1. Build Nginx Web site on linux server CentOS virtual machine

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.