Install nginx source code

Source: Internet
Author: User
Tags openssl library

Install and install nginx source code environment: Ubuntu 12.04 Nginx: V1.4.2 PCRE: V8.33 zlib: V1.2.8 download the above source package to the current user's home directory (local:/home/tdtc100 ). 1. Install zlib (1) decompress [plain] tdtc100 @ ubuntu :~ $ Tar zxvf zlib-1.2.8.tar.gz (2) install [plain] tdtc100 @ ubuntu :~ $ Cd zlib-1.2.8 tdtc100 @ ubuntu :~ /Zlib-1.2.8 $./configure tdtc100 @ ubuntu :~ /Zlib-1.2.8 $ make tdtc100 @ ubuntu :~ Zlib-1.2.8 $ sudo make install 2. install PCRE (1) install the dependency Package c ++ [plain] sudo apt-get install build-essential Note: If not installed, when (3), the following error occurs: [plain] configure: error: You need a C ++ compiler for C ++ support. (2) decompress [plain] tdtc100 @ ubuntu :~ Install [plain] tdtc100 @ ubuntu :~ $ Cd pcre-8.33 tdtc100 @ ubuntu :~ /Pcre-8.33 $./configure tdtc100 @ ubuntu :~ /Pcre-8.33 $ make tdtc100 @ ubuntu :~ Pcre-8.33 $ sudo make install 3. install nginx (1) install the dependency package open-ssl library [plain] sudo apt-get install libcurl4-openssl-dev Note: If not installed, when (3) is performed, the following occurs: [plain]. /configure: error: SSL modules require the OpenSSL library. you can either do not enable the modules, or install the OpenSSL library into the system, or build the OpenSSL library statically from the source with nginx by using -- with-openssl = <path> option. (2) decompress [plain] tdtc100 @ ubuntu :~ $ Tar zxvf nginx-1.4.2.tar.gz (3) Installation Reference official documentation [plain] tdtc100 @ ubuntu :~ $ Cd nginx-1.4.2 tdtc100 @ ubuntu :~ Nginx-1.4.2 $. /configure \> -- sbin-path =/usr/local/nginx \> -- conf-path =/usr/local/nginx. conf \> -- pid-path =/usr/local/nginx. pid \> -- with-http_ssl_module \> -- with-pcre = .. /pcre-8.33 \> -- with-zlib = .. /zlib-1.1.3 tdtc100 @ ubuntu :~ /Nginx-1.4.2 $ make tdtc100 @ ubuntu :~ /Nginx-1.4.2 $ sudo make install --------------------------- installation completed --------------------- xiaobin_hlj80 running: [plain] tdtc100 @ ubuntu:/usr/local/nginx $ sudo./nginx running effect:

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.