1. Download the stable version first nginx1.10.2 use the wget command to download
wget http://nginx.org/download/nginx-1.10.2.tar.gz
2. Then unzip
TAR-ZXVF nginx-1.10.2.tar.gz
3. Installing dependent libraries
sudo apt-get install Libpcre3-dev aptitude Libssl-dev
sudo apt-get install OpenSSL
sudo apt-get install libssl0.9.8
sudo apt-get install Libssl-dev
4. Compiling
./configure
Success will output:
Configuration Summary
+ Using System PCRE Library
.....
Make && make install
MAKE[1]: Leaving directory '/root/nginx ' success
5. Adding system Variables
sudo echo "path= $PATH:/usr/local/nginx/sbin" >>/etc/profile
sudo echo "Export PATH" >>/etc/profile
Source/etc/profile
Start Nginx
sudo nginx
Stop Nginx
sudo nginx-s stop
Re-start Nginx
sudo nginx-s reload
Nginx Compilation Installation Complete
Nginx config file in/usr/local/nginx/conf/nginx.conf
Recommended articles, Linux under compilation installation PHP7
Http://www.jianshu.com/p/3d61b051d9ea
Install Nginx under Linux compiler