//用命令「 gcc」,查看gcc是否安裝;若是出現「gcc: no input files」信息,說明已經安裝好了
yum install -y gcc
//查看已經安裝好了的gcc
yum list installed gcc
//安裝pcre
yum install -y pcre pcre-devel
//查看已經安裝好了的pcre
yum list installed pcre
//安裝zlib
yum install -y zlib zlib-devel
//查看已經安裝好了的zlib
yum list installed zlib
//安裝openssl
yum install -y openssl openssl-devel
//查看已經安裝好了的openssl
yum list installed openssl
//也能夠寫在一塊兒
yum install -y gcc pcre pcre-devel zlib zlib-devel openssl openssl-devel
從官方地址(http://nginx.org/)下載,解壓,配置,編譯,安裝:前端
1.下載
cd /home/
wget http://nginx.org/download/nginx-1.10.3.tar.gz
2. 解壓:
tar -zxvf nginx-1.10.3.tar.gz
3. 配置:
cd nginx-1.10.3 進入nginx解壓目錄
./configure
4. 編譯安裝:
make
make install
5. 查找安裝路徑:
whereis nginx
默認的安裝路徑爲:/usr/local/nginx;跳轉到其目錄下sbin路徑下,即可以啓動或中止它了。nginx
至此安裝完畢!c++