Install Nginx under CentOS 65

Source: Internet
Author: User
Tags geoip
: This article describes how to install Nginx in CentOS 65. For more information about PHP tutorials, see. This demonstration is in CentOS6. 5/'target = '_ blank'> CentOS6. 5Install Nginx in the operating system

Operating system:CentOS6. 5/'target = '_ blank'>CentOS6. 5X86-64

Nginx version: nginx-release-centos-6-0.el6.ngx.noarch.rpm

Nginx: http://nginx.org/en/linux_packages.html#stable

Epel: epel-release-6-8.noarch.rpm

Epel pack: http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Epel source Image Address: http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/

1. install the EPEL package

Because install nginx needs to configure the EPEL source, so first install EPEL rpm package, to the epel-release-6-8.noarch.rpm Directory, install EPEL:

[root@localhost tmp]# rpm -ivh epel-release-6-8.noarch.rpmwarning: epel-release-6-8.noarch.rpm: HeaderV3 RSA/SHA256 Signature, key ID 0608b895: NOKEYPreparing...               ########################################### [100%]  1:epel-release          ########################################### [100%]

2. configure the EPEL source

Therefore, the demo is not connected to the internet. Therefore, you need to download the EPEL source file required by nginx and configure the source file as follows:

[root@localhost tmp]# vi  /etc/yum.repos.d/epel.repo

Modify: (put the required EPEL source package in the/tmp/epel directory)

Baseurl = file: // tmp/epel

Note:

# Shortlist

Appendix: this is the EPEL source file required for nginx installation (under the/tmp/epel directory)

(Image Address: http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64)

CentOS65. install Nginx ">

3. install Nginx

1) install the Nginx rpm Package

[root@localhost tmp]# rpm -ivh nginx-release-centos-6-0.el6.ngx.noarch.rpmwarning:nginx-release-centos-6-0.el6.ngx.noarch.rpm: Header V4 RSA/SHA1 Signature, keyID 7bd9bf62: NOKEYPreparing...               ########################################### [100%]  1:nginx-release-centos  ########################################### [100%]

2) delete the nginx source

[root@localhost yum.repos.d]# pwd/etc/yum.repos.d[root@localhost yum.repos.d]# rm nginx.reporm: remove regular file `nginx.repo'? y

3) install Nginx

[root@localhost yum.repos.d]# yum install nginxLoaded plugins: fastestmirror, securityLoading mirror speeds from cached hostfileSetting up Install ProcessResolving Dependencies--> Running transaction check---> Package nginx.x86_640:1.0.15-12.el6 will be installed--> Processing Dependency:nginx-filesystem = 1.0.15-12.el6 for package: nginx-1.0.15-12.el6.x86_64--> Processing Dependency:nginx-filesystem for package: nginx-1.0.15-12.el6.x86_64--> Processing Dependency: gd forpackage: nginx-1.0.15-12.el6.x86_64--> Processing Dependency: GeoIP forpackage: nginx-1.0.15-12.el6.x86_64--> Processing Dependency:libgd.so.2()(64bit) for package: nginx-1.0.15-12.el6.x86_64--> Processing Dependency:libGeoIP.so.1()(64bit) for package: nginx-1.0.15-12.el6.x86_64--> Running transaction check---> Package GeoIP.x86_64 0:1.6.5-1.el6will be installed--> Processing Dependency: geoipupdatefor package: GeoIP-1.6.5-1.el6.x86_64--> Processing Dependency: GeoIP-datafor package: GeoIP-1.6.5-1.el6.x86_64---> Package gd.x86_64 0:2.0.35-11.el6will be installed--> Processing Dependency:libXpm.so.4()(64bit) for package: gd-2.0.35-11.el6.x86_64---> Package nginx-filesystem.noarch0:1.0.15-12.el6 will be installed--> Running transaction check---> Package GeoIP-GeoLite-data.noarch0:2015.04-2.el6 will be installed--> Processing Dependency:GeoIP-GeoLite-data-extra = 2015.04-2.el6 for package:GeoIP-GeoLite-data-2015.04-2.el6.noarch---> Package geoipupdate.x86_640:2.2.1-2.el6 will be installed---> Package libXpm.x86_640:3.5.10-2.el6 will be installed--> Running transaction check---> PackageGeoIP-GeoLite-data-extra.noarch 0:2015.04-2.el6 will be installed--> Finished Dependency Resolution Dependencies Resolved ================================================================================================ Package                           Arch            Version                  Repository     Size================================================================================================Installing: nginx                             x86_64          1.0.15-12.el6            epel          404 kInstalling for dependencies: GeoIP                             x86_64          1.6.5-1.el6              epel          113 k GeoIP-GeoLite-data                noarch          2015.04-2.el6            epel          343 k GeoIP-GeoLite-data-extra          noarch          2015.04-2.el6            epel           23 M gd                                x86_64          2.0.35-11.el6            base          142 k geoipupdate                       x86_64          2.2.1-2.el6              epel           28 k libXpm                            x86_64          3.5.10-2.el6             base           51 k nginx-filesystem                  noarch          1.0.15-12.el6            epel          8.1 k Transaction Summary================================================================================================Install       8 Package(s) Total download size: 24 MInstalled size: 50 MIs this ok [y/N]: yDownloading Packages:------------------------------------------------------------------------------------------------Total                                                           61 MB/s |  24 MB     00:00    warning: rpmts_HdrFromFdno: Header V3RSA/SHA256 Signature, key ID 0608b895: NOKEYRetrieving key fromfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6Importing GPG key 0x0608B895: Userid : EPEL (6)
 
   Package: epel-release-6-8.noarch (installed) From   :/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6Is this ok [y/N]: yRunning rpm_check_debugRunning Transaction TestTransaction Test SucceededRunning TransactionWarning: RPMDB altered outside of yum. Installing : GeoIP-GeoLite-data-extra-2015.04-2.el6.noarch                                1/8 Installing : GeoIP-GeoLite-data-2015.04-2.el6.noarch                                      2/8 Installing : geoipupdate-2.2.1-2.el6.x86_64                                               3/8 Installing : GeoIP-1.6.5-1.el6.x86_64                                                    4/8 Installing : libXpm-3.5.10-2.el6.x86_64                                                  5/8 Installing : gd-2.0.35-11.el6.x86_64                                                     6/8 Installing : nginx-filesystem-1.0.15-12.el6.noarch                                        7/8 Installing : nginx-1.0.15-12.el6.x86_64                                                  8/8  Verifying : nginx-filesystem-1.0.15-12.el6.noarch                                        1/8 Verifying  :GeoIP-1.6.5-1.el6.x86_64                                                    2/8 Verifying  :GeoIP-GeoLite-data-2015.04-2.el6.noarch                                     3/8 Verifying  :libXpm-3.5.10-2.el6.x86_64                                                  4/8 Verifying  :geoipupdate-2.2.1-2.el6.x86_64                                              5/8 Verifying  : GeoIP-GeoLite-data-extra-2015.04-2.el6.noarch                                6/8 Verifying  :nginx-1.0.15-12.el6.x86_64                                                  7/8 Verifying  :gd-2.0.35-11.el6.x86_64                                                     8/8 Installed: nginx.x86_64 0:1.0.15-12.el6                                                                  Dependency Installed: GeoIP.x86_64 0:1.6.5-1.el6                       GeoIP-GeoLite-data.noarch 0:2015.04-2.el6  GeoIP-GeoLite-data-extra.noarch 0:2015.04-2.el6   gd.x86_64 0:2.0.35-11.el6                  geoipupdate.x86_64 0:2.2.1-2.el6                  libXpm.x86_640:3.5.10-2.el6               nginx-filesystem.noarch 0:1.0.15-12.el6          Complete!
 

4) run and check nginx

[root@localhost yum.repos.d]# nginx [root@localhost yum.repos.d]# whereis nginxnginx: /usr/sbin/nginx /etc/nginx/usr/share/nginx /usr/share/man/man8/nginx.8.gz/usr/share/man/man3/nginx.3pm.gz

5) nginx version

[root@localhost yum.repos.d]# /usr/sbin/nginx -vnginx version: nginx/1.0.15

4. log on to view the information. The operation is successful.

CentOS65. install Nginx ">

The above describes how to install Nginx under CentOS65, including some content. I hope my friends who are interested in the PHP Tutorial can help me.

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.