1.Select the source code directory
Selected directory /usr/local/
cd /usr/local/
2. Install PCRE library
cd /usr/local/
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre2-10.21.tar.gz
tar -zxvf pcre2-10.21.tar.gz
cd pcre2-10.21
sudo ./configure
sudo make
sudo make install
3. Install zlib library
cd /usr/local/
wget http://zlib.net/zlib-1.2.8.tar.gz
tar -zxvf zlib-1.2.8.tar.gz cd zlib-1.2.8
sudo ./configure
sudo make
sudo make install
4.Install ssl
cd /usr/local/
wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz
tar -zxvf openssl-1.0.1c.tar.gz
sudo ./config
sudo make
sudo make install
5. Install nginx
Nginx generally has two versions, namely the stable version and the development version. You can choose one of these two versions according to your purpose. The following is to install Nginx to /usr Detailed steps under the /local/nginx directory:
cd /usr/local/
wget http://nginx.org/download/nginx-1.2.8.tar.gz
tar -zxvf nginx-1.2.8.tar.gz
cd nginx-1.2.8
sudo ./configure –prefix=/usr/local/nginx
sudo make
sudo make install
–with-pcre=/usr/src/pcre-8.21 refers to the source code path of pcre-8.21.
–with-zlib=/usr/src/zlib-1.2.7 refers to the source code path of zlib-1.2.7.
6. Start
Make sure that system port 80 is not occupied by other programs,
/usr/local/nginx/sbin/nginx
Check whether the startup is successful:
netstat -ano|grep 80 If the result is entered, the startup is successful
The above introduces the installation of ubuntu proxy server nginx, including ubuntu content. I hope it will be helpful to friends who are interested in PHP tutorials.