1.linux Source Installation Nginx

Source: Internet
Author: User

    1. Download nginx.tar.gz source package from official website
    2. Copy to Linux system for decompression TAR-ZXVF nginx.tar.gz
    3. Enter the extracted directory, need./configure, this step will report multiple errors, such as the installation of GCC when not installed GCC, etc.
    • ./confiure

When the./configure, the error may be as follows:./configure:error:the HTTP Rewrite module requires the PCRE library. You can either disable the module by using--without-http_rewrite_module option, or install the PCRE library into the System, or build the PCRE library statically from the source with Nginx by using--with-pcre=<path> option.

    • The solution is to install Pcre-devel this package, yum-y install pcre-devel in order to rewrite rewrite
    • After installing the above package, will also error, hint./configure:error:the HTTP gzip module requires the Zlib library. You can either disable the module by using--without-http_gzip_module option, or install the Zlib library into the system, or build the Zlib library statically from the source with Nginx
    • The Zlib-devel package needs to be installed at this time, yum-y install Zlib-devel for gzip compression

4.make

5.make Install or 4 and 5 combined, make && make install

6. The program compiled and installed will be saved in the/usr/local directory, as follows:

    • [Email protected] nginx-1.14.0]# ls/usr/local/nginx/
      Conf HTML logs Sbin
      [Email protected] nginx-1.14.0]#

7. Run the command./sbin/nginx will start Nginx, via Ps-ef | grep nginx or by NETSTAT-ANPL | grep 80 to view process or port status

    • To access Firefox localhost:80, if the following interface appears, the Nginx boot success:

1.linux Source Installation Nginx

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.