Because my system is just loaded, and what bags are not!
1: Update all packages first
sudo apt-get update
2: Jump to the system's Downloads folder (i downloaded to the downloads folder below)
cd /home/用户名/Downloads/
3: Download stable version of Nginx from official website
wget http://nginx.org/download/nginx-1.8.1.tar.gz
4: Unzip
tar zxvf nginx-1.8.1.tar.gz
5: Go to the unpacked folder
cd nginx-1.8.1
6: Execute command
./configure发现报错 原因是缺少pcre library
7: Re-enter downloads folder download Pcre
wegt http://sourceforge.net/projects/pcre/files/pcre/8.31/pcre-8.31.tar.gz
8: Unzip the Pcre
tar zxvf pcre-8.31.tar.gz
9: Go to the unpacked folder
cd pcre-8.31
10: Execute command
./configure 这句成功make 这句会报错,编译不通过,所以需要安装g++
11: Install g++
sudo apt-get install g++
12: Re-enter the pcre-8.31 folder and execute the command
./configuremakesudo make install 报错缺少zlib包
13: Install the zlib package
sudo apt-get install zlib1g-dev
14: Re-enter the pcre-8.31 folder and execute the command
./configuremakesudo make install
15: Re-enter nginx-1.8.1 folder execution command
./configuremakesudo make install
16: Start Nginx
sudo /usr/local/nginx/sbin/nginx启动成功之后登陆localhost看看是否安装成功!http://localhost:80
17: Off Nginx
sudo killall -9 nginx
'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
'). Text (i)); }; $numbering. FadeIn (1700); }); });
The above describes the Ubuntu1404 installation Nginx stable version of the steps, including the aspects of the content, I hope that the PHP tutorial interested friends helpful.