1.
2.安裝目錄在usr/local下
--安裝openssl-1.0.1t.tar.gz
tar zxvf openssl-1.0.1t.tar.gz
mv openssl-1.0.1t openssl
cd openssl
./config --prefix=/usr/local/openssl
make && make install
--安裝pcre-8.39.tar.gz
tar zxvf pcre-8.39.tar.gz
mv pcre-8.39 pcre (注後續nginx指定的是原始碼目錄不是安裝目錄)
./configure --prefix=/usr/local/pcre
make && make install
--安裝zlib
tar zxvf zlib-1.2.8.tar.gz
mv zlib-1.2.8 zlib
./configure --prefix=/usr/local/zlib
make && make install
--安裝nginx-1.11.1.tar.gz
tar zxvf nginx-1.11.1.tar.gz
mv nginx-1.11.1 nginx
./configure --prefix=/usr/local/nginx --with-zlib=/usr/local/zlib --with-openssl=/usr/local/openssl --with-pcre=/usr/local/pcre
make && make install
報錯,需要指定原始碼目錄,而不是安裝目錄
./configure --prefix=/usr/local/nginx --with-zlib=/usr/local/src/zlib --with-openssl=/usr/local/scr/openssl --with-pcre=/usr/local/src/pcre
make && make install
測試:
./usr/local/nginx/sbin/nginx -t
提示以下資訊表示安裝成
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
在linux上安裝nginx
2 為了不與安裝包混淆,再建乙個同級的nginx包,在 jboss nginx install nginx 1.6.2目錄下 即nginx的解壓檔案包 執行如下命令 configure prefix jboss nginx with pcre jboss nginx install pcre 8.3...
在linux下安裝nginx
yum install y gcc c yum install y pcre pcre develyum install y zlib zlib develyum install y openssl openssl devel先進入 usr local software 目錄,在這個目錄下執行以下命...
Nginx在Linux下安裝
首先安裝nginx所需要的依賴 1.安裝gcc 命令 yum install gcc 備註 可以輸入gcc v查詢版本資訊,看系統是否自帶安裝 2.安裝pcre 命令 yum install pcre devel 3.安裝zlib 命令 yum install zlib zlib devel 4.安...