1. installation package Preparation
go to http://nginx.org/en/download.html Download Latest Stable Nginx installation package
2. Upload to Ubuntu server
Can be uploaded via WinSCP
3. Unpack the installation package
Use command: TAR-ZXVF nginx-1.8.0.tar.gz
To see if the decompression was successful,
Use command: LS
4. Start the installation
command to enter the nginx-1.8.0/directory
Install the input command./configure
Errors that may occur after execution have been resolved
A. Error C compiler cc is not found
Cause of error: lack of packages required by Nginx
Workaround: Install the missing packages
安装命令:
sudo
apt
install gcc gcc-c++ autpconf automake
Note that this place may fail to install, then you need to update the source into this directory /etc/apt/ and then enter the command: Apt-get update for updating the source
When you're done, enter./configure
B. An error occurred./configure:error:the HTTP Rewrite module requires the PCRE library.
Cause of error: lack of Pcre library
WORKAROUND: Command to install the missing packages
安装命令:sudo
apt-get
install
libpcre3 libpcre3-dev
When you're done, enter./configure
c. An error occurred./configure:error:the HTTP gzip module requires the Zlib library.
Cause of error: lack of zlib library
WORKAROUND: Command to install the missing packages
安装命令:
sudo
apt-get
install
zlib1g zlib1g-dev
When you're done, enter./configure
At this time如果出现,表示安装条件已满足
?然后输入make
等待make完成后,
最后 输入命令:make install
5、验证是否安装成功
输入命令 cd /usr/local/
输入命令ls 如果你发现该目录下有nginx目录,表示已经安装成功
Ubuntu 5-Step installation Nginx record