標籤:http os ar c++ amp type 安裝 ad
一、安裝基礎環境包
yum -y install gcc gcc-c++ openssl*
yum -y install libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel
yum -y install libxml2 libxml2-devel zlib zlib-devel ncurses ncurses-devvel curl curl-devel
yum -y install gd gd2 gd-devel gd2-devel
二、安裝PCRE
1、下載
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.35.tar.gz
2、解壓
tar zxvf pcre-8.35.tar.gz
3、安裝
cd pcre-8.35
./configure
make && make install
三、安裝Nginx
1、下載Nginx
wget http://nginx.org/download/nginx-1.7.3.tar.gz
2、解壓
tar zxvf nginx-1.7.3.tar.gz
3、安裝
cd nginx-1.7.3
./configure --prefix=/opt/nginx --with-http_ssl_module --with-http_stub_status_module
make && make install
註:--prefix=/opt/nginx,nging安裝目錄;--with-http_ssl_module,開啟HTTP SSL模組,使NGINX可以支援HTTPS請求。這個模組需要已經安裝了OpenSSL;--with-http_stub_status_module,開啟 nginx 的 NginxStatus功能,用來監控 Nginx 的目前狀態。
四、啟動Nginx
echo "/usr/local/lib" >>/etc/ld.so.conf
tail -1 /etc/ld.so.conf
ldconfig
/opt/nginx/sbin/nginx
lsof -i:80