yum -y install gcc //sudo apt-get install g++ sudo apt-get install gcc
yum install pcre-devel
yum install zlib-devel

sudo apt-get install libpcre3 libpcre3-dev
sudo apt-get install zlib1g
sudo apt-get install zlib1g.dev


安装nginx之前应先安装gcc g++、 build-essential、pcre-8.37和 zlib-1.2.8
pcre-8.37 安装前 先安装:gcc g++
1、gcc-c++
CentOS 和RedHat: yum install gcc gcc-c++
ubuntu :apt-get install gcc-c++
2、build-essential
apt-get install build-essential
yum install build-essential

执行安装命令时出现的问题:Package build-essential is not available
解决办法:[sudo apt-get update && sudo aptitude install build-essential]
CentOS 和RedHat: yum install build-essential
ubuntu :apt-get install build-essential
3、pcre
wget http://ftp.exim.llorien.org/pcre/pcre-8.36.tar.gz
tar zxvf pcre-8.36.tar.gz
cd pcre-8.36/
./configure
make
make install
4、zlib
将安装包放在指定目录下
tar zxvf zlib-1.2.8.tar.gz
cd zlib-1.2.8/
./configure
make
make install

http://nginx.org/download/ (nginx下载地址)

 

 
posted on 2018-06-24 16:28  jxba  阅读(184)  评论(0编辑  收藏  举报