php7.0搭配nginx,Linux安装配置php7.0+nginx

2.安装nginx

查看nginx相关信息

yum list | grep nginx

collectd-nginx.x86_64 4.10.9-1.el6 epel

munin-nginx.noarch 2.0.25-2.el6 epel

nginx.x86_64 1.0.15-11.el6 epel

nginx-filesystem.noarch 1.0.15-11.el6 epel

owncloud-nginx.noarch 7.0.5-2.el6 epel

yum info nginx

Loaded plugins: security

Available Packages

Name : nginx

Arch : x86_64

Version : 1.0.15

Release : 11.el6

Size : 404 k

Repo : epel

Summary : A high performance web server and reverse proxy server

URL : http://nginx.org/

License : BSD

Description : Nginx is a web server and a reverse proxy server for HTTP, SMTP, POP3 and

: IMAP protocols, with a strong focus on high concurrency, performance and

: low memory usage.

发现版本很低,于是追加 nginx 的 yum 仓库,创建一个文件 /etc/yum.repos.d/nginx.repo,并将下面的内容复制进去

[nginx]

name=nginx repo

baseurl=http://nginx.org/packages/centos/$releasever/$basearch/

gpgcheck=0

enabled=1

编辑并保存/etc/yum.repos.d/nginx.repo文件后,在命令行下执行

yum list | grep nginx

collectd-nginx.x86_64 4.10.9-1.el6 epel

munin-nginx.noarch 2.0.25-2.el6 epel

nginx.x86_64 1.6.3-1.el6.ngx nginx

nginx-debug.x86_64 1.6.3-1.el6.ngx nginx

nginx-debuginfo.x86_64 1.6.3-1.el6.ngx nginx

nginx-filesystem.noarch 1.0.15-11.el6 epel

nginx-nr-agent.noarch 2.0.0-7.el6.ngx nginx

owncloud-nginx.noarch 7.0.5-2.el6 epel

发现最新的稳定版1.6.3,于是直接执行

yum install nginx -y

安装完成,下面直接就可以启动Nginx了:

/etc/init.d/nginx start

Starting nginx: [ OK ]

现在Nginx已经启动了,直接访问服务器就能看到Nginx欢迎页面了的。

Nginx的命令以及配置文件位置:

/etc/init.d/nginx start # 启动Nginx服务

/etc/init.d/nginx stop # 停止Nginx服务

/etc/nginx/nginx.conf # Nginx配置文件位置

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值