CentOS6.3 nginx installation guide

Source: Internet
Author: User
CentOS6.3 nginx installation guide has been installing nginx recently, and there are always some problems. It has been bothering me for a long time, and I have also found a lot of information. Finally, the installation is complete. Share it with you! Some dependent software packages (in rpm format) have been uploaded, and gcc is divided into two...
CentOS 6.3 nginx installation guide has been installing nginx recently, and there are always some problems. It has been bothering me for a long time, and I have also found a lot of information. Finally, the installation is complete. Share it with you! Some dependent software packages (in rpm format) have been uploaded, and gcc has divided them into two, because the files are too big together! Please pay attention when downloading! 1. install the CentOS system and send a document to everyone. refer to the installation documentation. Do not describe too much here. 2. set the IP address www.2cto.com after installing CentOS. 1) the virtual machine is connected to the same hub by means of bridge connection. the virtual machine and the host must be configured to the same network segment. Www.2cto.com 2) set the system IP # vi/etc/sysconfig/network-scripts/ifcfg-eth0 after opening the file, set the following information to DEVICE = eth0BOOTPROTO = noneBROADCAST = 192.168.0.255 // broadcast address HWADDR = 00: 0C: 29: 61: 63: 59 // physical address IPADDR = 192.168.0.249 // IP address NETMASK = 255.255.255.0 // subnet mask GATEWAY = 192.168.0.254 // GATEWAY
ONBOOT = yes refer to the above information to modify the ifcfg-eth0 file, according to your own network segment settings. Then configure dns # vi/etc/resolv. conf to write the statement "nameserver 192.168.0.2. Finally, restart the service # service network restartShutting down interface eth0: [OK] Shutting down loopback interface: [OK] Bringing up loopback interface: [OK] Bringing up interface eth0: [OK. Www.2cto.com I used SSH to connect to linux on the virtual machine, which is more convenient.
3. to install nginx, make sure that the system has installed software libraries such as gcc, openssl, pcre, and zlib before installing nginx. Www.2cto.com is not easy to install because my CentOS is using the yum command. So I found an rpm installation method on the Internet. 1) install gcc and install all the rpm files in the gcc folder into the gcc file. type the command # rpm-ivh *. rpm -- nodeps-force PS: the significance of the two parameters is that the dependency between packages is not analyzed during installation, and the error: Failed dependencies: this is an error. Check whether gcc is successfully installed: # gccgcc: no input files. this indicates the installation is successful. # gcc-v can check the gcc version. 2) install openssl, pcre, and zlib in the same way as gcc. 3) after the installation is complete, restart the system. (I personally think it is necessary, because I have tried it many times before, and I have not succeeded or found any problem. Restarting is not troublesome. we recommend that you reboot it !) 4. when the workshop is completed, start with the main dish -- Install nginxthe nginx-0.7.69.tar.gz I have installed. it may be a bit old, but I like the old o (∩) o haha.: http://nginx.org/en/download.html Www.2cto.com is easy to install. 1) upload nginx-0.7.69.tar.gz to/usr/local/src (install the software to be compiled, preferably in this directory ). Www.2cto.com 2) unzip # tar xvf nginx-0.7.69.tar.gz3) configuration into the nginx-0.7.69 Directory # cd nginx-0.7.69 #. /configure -- prefix =/usr/local/nginx the following parameter is the directory for configuration and installation. we recommend that you use this. There are also some other parameters for you to find out. If no error is reported after the configuration is successful, congratulations, success 1/3! 4) compile # make. if there is no error in this part and it is executed normally, there are a lot of things, which means you are one step away from success. 5) after the installation # make install step is complete, there are still no errors, indicating that the installation is successful! 6) start and test the command www.2cto.com #/usr/local/nginx/sbin/nginx [emerg]: bind () to 0.0.0.0: 80 failed (98: Address already in use) [emerg]: bind () to 0.0.0.0: 80 failed (98: Address already in use) [emerg]: bind () to 0.0.0.0: 80 failed (98: Address already in use) [emerg]: bind () to 0.0.0.0: 80 failed (98: Address already in use) [emerg]: bind () to 0.0.0.0: 80 failed (98: Address already in use) [emerg]: still cocould n Ot bind () www.2cto.com. Then access the ip address of your VM in ie. the installation is successful when this occurs!

Zlib.rar (44 KB) http://dl.iteye.com/topics/download/5ea25192-2262-3332-9acd-8e6301496eecpcre.rar (54.9 KB) http://dl.iteye.com/topics/download/40b1321f-c5b8-3099-b0ba-b04c188a9fc2openssl.rar (2.3 MB) http://dl.iteye.com/topics/download/6b31e1b4-422d-3166-9c5d-09483de1ea5fgcc_1.rar (9.6 MB) http://dl.iteye.com/topics/download/a3c01e4e-65fe-379f-8f76-627936e745dagcc_2.rar (9.4 MB) author made love voyage

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.