Nginx Installation Steps

Source: Internet
Author: User

1. download Nginx, url: http://nginx.org/download/

2. Unzip TAR-XZVF nginx-1.6.2.tar.gz

3. Create an image file: mount-t iso9660 rhel-server-6.5-i386-dvd.iso/media/iso-o Loop

4. in the/ETC/YUM.REPOS.D directory, the new file Myresource.repo content is as follows:

[Rhel-source]

Name=iso-source

Baseurl=file:///media/iso

Enabled=1

Gpgcheck=0

BaseURL is our image path; The enabled value indicates whether the file is available, 1 is available, 0 is unavailable, Gpgcheck indicates that the GPG signature needs to be checked, 0 means no, and 1 means

5. Execute the Install command:yum groupinstall Development Tools, install some development tool software.

an unintentionally encountered problem:

If there is another repo file in the/ETC/YUM.REPOS.D directory that also defines: Baseurl=file:///mnt/iso; execute yum groupinstall development Tools command when looking for the

The installation package may be located in the/mnt/iso directory, causing the installation file to not be found. You can modify the path to the path where we created the image (Baseurl=file:///media/iso).

6. Set the Nginx installation directory, easy to uninstall and so on:./configure--prefix=/usr/local/install //Note:--prefix=/usr/... Do not have spaces on either side of the equals sign;

This step may report the following error, requiring the installation of the Pcre library or associated to the Pcre installation directory;     

   ./configure:error:the HTTP rewrite module requires the PCRE library.    --without-http_rewrite_module   option, or install the PCRE library into the system, or build the PCRE library   /c3>--with-pcre=<path> option.

If Pcre is not installed on the system, if you need to download and install the Pcre-related installation package, I am using: pcre-8.35.tar.gz.

after installing Pcre, execute again:./configure--prefix=/usr/local/nginx Command, if still an error, it may be necessary to associate to the Pcre path. You can associate it with the error message,

For example:./configure--prefix=/usr/local/nginx--with-pcre=/usr/local/pcre

7. then execute, make command, if no problem is performed: Make install completed

Description: The purpose of 3,4,5 step is to install some related development tools software, strictly speaking with Nginx installation does not matter. The aim is to avoid the problem of large-scale dependency program missing during installation of Nginx.

Nginx Installation Steps

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.