国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 網(wǎng)站 > 建站經(jīng)驗(yàn) > 正文

Ce!ntOS7下 yum方式安裝Nginx的實(shí)現(xiàn)步驟

2019-11-02 14:29:12
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友

CentOS7下 yum方式安裝Nginx的實(shí)現(xiàn)步驟

Nginx 是一個(gè)很強(qiáng)大的高性能Web和反向代理服務(wù)器,它具有眾多非常優(yōu)越的特性。諸如低開銷,高并發(fā),支持緩存,支持正反向代理,支持負(fù)載均衡,支持正則,支持rewrite等等不一而足。所以眾多粉絲們也是不計(jì)其數(shù)。本文基于CentOS 7簡(jiǎn)要描述yum方式的安裝部署,供大家參考。

如果是編譯安裝可以參考:Linux 6下安裝編譯安裝Nginx

有關(guān)Nginx的常用配置可參考:Nginx 概述及日常管理

一、配置nginx yum源

演示環(huán)境[root@centos7-router ~]# more /etc/redhat-releaseCentOS Linux release 7.2.1511 (Core)[root@centos7-router ~]# vim /etc/yum.repos.d/nginx.repo[nginx]name=nginx repobaseurl=http://nginx.org/packages/OS/OSRELEASE/$basearch/gpgcheck=0enabled=1將上述配置文件中的OS替換為rhel或者centos,OSRELEASE替換為6或者7,即當(dāng)前的Linux為6還是7版本查看本機(jī)ip[root@centos7-router ~]# ip addr|grep inet|grep globalinet 172.24.8.254/24 brd 172.24.8.255 scope global eno16777728inet 192.168.1.175/24 brd 192.168.1.255 scope global dynamic eno33554960

二、安裝nginx

[root@centos7-router ~]# yum install nginx -y[root@centos7-router ~]# yum install nginx-module-perl.x86_64 -y 查看生程的相關(guān)文件[root@centos7-router ~]# rpm -ql nginx/etc/logrotate.d/nginx/etc/nginx/etc/nginx/conf.d/etc/nginx/conf.d/default.conf/etc/nginx/fastcgi_params/etc/nginx/koi-utf/etc/nginx/koi-win/etc/nginx/mime.types/etc/nginx/modules/etc/nginx/nginx.conf/etc/nginx/scgi_params/etc/nginx/uwsgi_params/etc/nginx/win-utf/etc/sysconfig/nginx/etc/sysconfig/nginx-debug/usr/lib/systemd/system/nginx-debug.service/usr/lib/systemd/system/nginx.service/usr/lib64/nginx/usr/lib64/nginx/modules/usr/libexec/initscripts/legacy-actions/nginx/usr/libexec/initscripts/legacy-actions/nginx/check-reload/usr/libexec/initscripts/legacy-actions/nginx/upgrade/usr/sbin/nginx/usr/sbin/nginx-debug/usr/share/doc/nginx-1.12.2/usr/share/doc/nginx-1.12.2/COPYRIGHT/usr/share/man/man8/nginx.8.gz/usr/share/nginx/usr/share/nginx/html/usr/share/nginx/html/50x.html/usr/share/nginx/html/index.html/var/cache/nginx/var/log/nginx

三、驗(yàn)證nginx

啟動(dòng)nginxroot@centos7-router ~]# systemctl start nginx[root@centos7-router ~]# systemctl enable nginx ###配置自啟動(dòng)[root@centos7-router ~]# ss -nltp|grep nginxLISTEN 0 128 *:80 *:* users:(("nginx",pid=65418,fd=6),("nginx",pid=65415,fd=6))查看nginx的版本[root@centos7-router ~]# nginx -vnginx version: nginx/1.12.2查看或修改配置文件[root@centos7-router ~]# more /etc/nginx/nginx.confuser nginx;worker_processes 1;error_log /var/log/nginx/error.log warn;pid /var/run/nginx.pid;events {worker_connections 1024;}http {include /etc/nginx/mime.types;  ### Author : Leshamidefault_type application/octet-stream; ### Blog : http://blog.csdn.net/leshamilog_format main
發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 江都市| 土默特左旗| 河津市| 乐东| 介休市| 怀集县| 榆社县| 中西区| 阳城县| 土默特右旗| 元阳县| 噶尔县| 福海县| 彭州市| 高要市| 兰州市| 米林县| 万年县| 阳江市| 百色市| 杭锦后旗| 台江县| 霍州市| 淮安市| 郧西县| 汉源县| 梧州市| 永德县| 黄大仙区| 梅河口市| SHOW| 霍山县| 西乌| 双流县| 五常市| 定南县| 册亨县| 大埔县| 平舆县| 阜城县| 博客|