在Redhat上安裝Nginx折騰了我好一陣子,終於安裝完成,
跟著指令走吧。
yum install -y httpd-devel pcre perl pcre-devel zlib zlib-devel GeoIP GeoIP-devel wget
cd /usr/src/
mkdir nginx
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.35.tar.gz
wget http://zlib.net/zlib-1.2.8.tar.gz
wget https://www.openssl.org/source/openssl-1.0.1i.tar.gz
tar -xvf zlib-1.2.8.tar.gz
tar -xvf pcre-8.35.tar.gz
tar -xvf openssl-1.0.1i.tar.gz
wget http://nginx.org/download/nginx-1.7.3.tar.gz
tar -zxvf nginx-1.7.3.tar.gz
cd nginx-1.7.3
./configure
make
make install
到這邊就安裝完成了,接下來啟動並測試看看吧:
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
/usr/local/nginx/sbin/nginx -V
<上一篇 [node.js學習(二)]安裝mongodb @ Redhat / Centos
沒有留言:
張貼留言