Compile and install Nginx+mysql +php in CentOS (not finished)

Source: Internet
Author: User

Reference Address: http://www.cnblogs.com/htian/p/5728599.html

Go to the official website to find pcre and download http://www.pcre.org/
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre2-10.21.tar.gz
Decompression: TAR-XZVF pcre.tar.gz
Go to Pcre directory: CD pcre
Installing Pcre
./configure--prefix/usr/local/pcre2
Make
Make install

Install Pcre-devel (the module is missing, the installation of Nginx will be error)
Yum Install Pcre-devel

Go to official website Download zlib Library http://www.zlib.net/
wget http://www.zlib.net/zlib-1.2.11.tar.gz
TAR-XZVF zlib-1.2.11.tar.gz
CD zlib-1.2.11
./configure--prefix/usr/local/zlib
Make
Make install

Go to the official website to download openssl:https://www.openssl.org/
wget https://www.openssl.org/source/openssl-1.0.2l.tar.gz
TAR-XZVF openssl-1.0.2l.tar.gz
CD openssl-1.0.2l
./config
Make
Make install

Go to the official website to download nginx:http://nginx.org/en/
Nginx Source Installation Documentation: http://nginx.org/en/docs/configure.html
wget http://nginx.org/download/nginx-1.13.2.tar.gz
TAR-XZVF nginx-1.13.2.tar.gz
CD nginx-1.13.2
./configure--sbin-path=/usr/local/nginx--conf-path=/usr/local/nginx/nginx.conf--pid-path=/usr/local/nginx/ Nginx.pid--with-pcre=/home/lyh/download/pcre2-10.21--with-zlib=/home/lyh/download/zlib-1.2.11--with-openssl=/ home/lyh/download/openssl-1.0.2l
Make
Make install

Above--sbin-path= is the path that Nginx installs to, can customize; --conf-path= and--pid-path= Please refer to your own definition of the directory to fill in,--with-pcre= and--with-zlib=,--with-openssl is just the download of the compressed package extracted from the directory, Fill in according to your own file name

Compile and install Nginx+mysql +php in CentOS (not finished)

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.