莫大人

centos7 安装 nginx

参考:

https://www.nginx.com/resources/wiki/start/topics/tutorials/install/

1.配置源,我这里是centos7,不同的系统版本请自行更改

[root@guo elk]# touch /etc/yum.repos.d/nginx.repo
[root@guo elk]# cat >>/etc/yum.repos.d/nginx.repo <<!
> [nginx]
> name=nginx repo
> baseurl=http://nginx.org/packages/centos/7/x86_64
> gpgcheck=0
> enabled=1
> !

 

2.安装,我这里一起安装了  nginx httpd-tools

yum install nginx httpd-tools -y

3.启动

systemctl start nginx.service

4.配置

vi /etc/nginx/nginx.conf 

 

posted on 2017-08-03 11:30  莫大人  阅读(134)  评论(0编辑  收藏  举报

导航