#nginx是一款功能強(qiáng)大、開源軟件
1、系統(tǒng)版本和內(nèi)核版本
[root@node06 ~]# uname -r
3.10.0-327.el7.x86_64
[root@node06 ~]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
[root@node06 ~]#
2、軟件包版本 nginx-1.11.10.tar.gz (包的地址在介紹里)
3、安裝依賴
[root@nginx ~]# yum install -y gcc pcre-devel openssl-devel
4、創(chuàng)建nginx啟動(dòng)用戶、需要的目錄并解壓安裝包。
[root@nginx ~]# useradd nginx
[root@nginx ~]# mkdir -p /usr、local/nginx/{client,proxy,fastcgi,uwsgi,scgi}
[root@nginx ~]# tar zxf nginx-1.11.10.tar.gz
[root@nginx ~]# cd nginx-1.11.10/
5、配置nginx的安裝參數(shù)和編譯
[root@nginx nginx-1.11.4]# ./configure \
--prefix=/usr/local/nginx \
--user=nginx \
--group=nginx \
--with-http_ssl_module \
--with-http_flv_module \
--with-http_stub_status_module \
--with-http_gzip_static_module \
--http-client-body-temp-path=/usr/local/nginx/client \
--http-proxy-temp-path=/usr/local/nginx/proxy \
--http-fastcgi-temp-path=/usr/local/nginx/fastcgi \
--http-uwsgi-temp-path=/usr/local/nginx/uwsgi \
--http-scgi-temp-path=/usr/local/nginx/scgi \
--with-pcre \
--with-file-aio \
--with-http_secure_link_module
[root@nginx nginx-1.11.10]# make && make install
6、驗(yàn)證安裝是否成功
[root@nginx ~]#cd /usr/local/nginx/
[root@nginx ~]#ls sbin/
nginx 證明安裝成功
7、啟動(dòng)nginx并設(shè)置開機(jī)自啟
[root@nginx ~]# /usr/local/nginx/sbin/nginx
[root@nginx ~]# vim /etc/rc.d/rc.local
/usr/local/nginx/sbin/nginx
[root@nginx ~]# chmod a+x /etc/rc.d/rc.local -------> centos7.2需要這一步
8、驗(yàn)證nginx是否正常啟動(dòng)
打開網(wǎng)頁輸入 http://<ip地址>
能看到nginx提供的頁面表示安裝成功
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。
當(dāng)前題目:centos7.2下部署nginx-創(chuàng)新互聯(lián)
URL網(wǎng)址:http://www.rwnh.cn/article36/dosppg.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站設(shè)計(jì)公司、服務(wù)器托管、云服務(wù)器、軟件開發(fā)、微信小程序、手機(jī)網(wǎng)站建設(shè)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)