亚洲中字慕日产2020,大陆极品少妇内射AAAAAA,无码av大香线蕉伊人久久,久久精品国产亚洲av麻豆网站

資訊專欄INFORMATION COLUMN

centos7通過yum安裝nginx

Pink / 1505人閱讀

yum install -y nginx

通過yum安裝的時(shí)候提示下面的錯(cuò)誤

[root@localhost yum.repos.d]# yum install nginx
已加載插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
沒有可用軟件包 nginx。
錯(cuò)誤:無須任何處理

需要添加nginx的源

[root@localhost yum.repos.d]# rpm -ivh http://nginx.org/packages/cen...

該命令執(zhí)行之后,會在/etc/yum.respos.d下面多出一個(gè)nginx.repo

[root@localhost yum.repos.d]# ll
總用量 40
-rw-r--r--. 1 root root 1572 12月 1 2016 CentOS-Base.repo
-rw-r--r--. 1 root root 1572 12月 1 2016 CentOS-Base.repo.backup
-rw-r--r--. 1 root root 1664 10月 24 10:36 CentOS-Base.repo.bak
-rw-r--r--. 1 root root 1309 8月 30 2017 CentOS-CR.repo
-rw-r--r--. 1 root root 649 8月 30 2017 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root 314 8月 30 2017 CentOS-fasttrack.repo
-rw-r--r--. 1 root root 630 8月 30 2017 CentOS-Media.repo
-rw-r--r--. 1 root root 1331 8月 30 2017 CentOS-Sources.repo
-rw-r--r--. 1 root root 3830 8月 30 2017 CentOS-Vault.repo
-rw-r--r--. 1 root root 113 7月 15 2014 nginx.repo

然后再執(zhí)行安裝命令

yum install -y nginx

安裝之后,可以查看nginx的默認(rèn)安裝目錄

[root@localhost yum.repos.d]# whereis nginx
nginx: /usr/sbin/nginx /usr/lib64/nginx /etc/nginx /usr/share/nginx /usr/share/man/man8/nginx.8.gz
[root@localhost yum.repos.d]# pwd
/etc/yum.repos.d

以下是Nginx的默認(rèn)路徑:

(1) Nginx配置路徑:/etc/nginx/
(2) PID目錄:/var/run/nginx.pid
(3) 錯(cuò)誤日志:/var/log/nginx/error.log
(4) 訪問日志:/var/log/nginx/access.log
(5) 默認(rèn)站點(diǎn)目錄:/usr/share/nginx/html

事實(shí)上,只需知道Nginx配置路徑,其他路徑均可在/etc/nginx/nginx.conf 以及/etc/nginx/conf.d/default.conf 中查詢到

nginx相關(guān)的驗(yàn)證命令及啟動命令

root@localhost yum.repos.d]# nginx 
[root@localhost yum.repos.d]# nginx -t 
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
[root@localhost yum.repos.d]# nginx -s reload

nginx 啟動
nginx -t 測試命令
nginx -s relaod 修改nginx.conf之后,可以重載

文章版權(quán)歸作者所有,未經(jīng)允許請勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。

轉(zhuǎn)載請注明本文地址:http://www.ezyhdfw.cn/yun/39925.html

相關(guān)文章

  • 虛擬機(jī)Linux Centos7搭建web環(huán)境(LNMP)

    摘要:本文內(nèi)容是,如何在下快速搭建環(huán)境。虛擬機(jī)實(shí)體機(jī)環(huán)境都可以。按照提示,輸入。 本文內(nèi)容是,如何在Linux centos7下快速搭建LNMP環(huán)境。虛擬機(jī)、實(shí)體機(jī)環(huán)境都可以。另外,安裝教程參考的是,下面這篇文章進(jìn)行文字排版和內(nèi)容擴(kuò)充,感謝hcchanqing作者。CentOS6.2 yum安裝配置LNMP服務(wù)器(Nginx+PHP+MySQL) 特別提醒:本文系統(tǒng)用的Centos7,是7!...

    Enlightenment 評論0 收藏0
  • 虛擬機(jī)Linux Centos7搭建web環(huán)境(LNMP)

    摘要:本文內(nèi)容是,如何在下快速搭建環(huán)境。虛擬機(jī)實(shí)體機(jī)環(huán)境都可以。按照提示,輸入。 本文內(nèi)容是,如何在Linux centos7下快速搭建LNMP環(huán)境。虛擬機(jī)、實(shí)體機(jī)環(huán)境都可以。另外,安裝教程參考的是,下面這篇文章進(jìn)行文字排版和內(nèi)容擴(kuò)充,感謝hcchanqing作者。CentOS6.2 yum安裝配置LNMP服務(wù)器(Nginx+PHP+MySQL) 特別提醒:本文系統(tǒng)用的Centos7,是7!...

    Cristic 評論0 收藏0

發(fā)表評論

0條評論

閱讀需要支付1元查看
<