艾编程教程:Linux 环境下 Nginx 安装
#安装说明:Nginx 安装前需要提前安装相关命令和工具包:
make 命令、gcc g++、pcre、zlib、openssl
1、安装 gcc g++
#ubuntu 环境下安装 apt-get install build-essential apt-get install libtool #centos 环境下安装 安装 make: yum -y install gcc automake autoconf libtool make 安装 g++: yum install gcc gcc-c++ 安装 wget yum -y install wget2、安装 PCRE
cd /usr/local/src wget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz tar -zxvf pcre-8.43.tar.gz cd pcre-8.43 ./configure make make install3、安装 zlib
cd /usr/local/src wget http://zlib.net/zlib-1.2.11.tar.gz tar -zxvf zlib-1.2.11.tar.gz cd zlib-1.2.11 ./configure make make install4、安装 openssl
cd /usr/local/src wget http://www.openssl.org/source/old/1.0.2/openssl-1.0.2e.tar.gz tar -zxvf openssl-1.0.2e.tar.gz cd openssl-1.0.2e ./config make make install5、安装 nginx
cd /usr/local/src wget http://nginx.org/download/nginx-1.9.9.tar.gz tar -zxvf nginx-1.9.9.tar.gz cd nginx-1.9.9 ./configure make make install