码迷,mamicode.com
首页 > 其他好文 > 详细

Centos7安装Openresty

时间:2017-03-13 23:53:03      阅读:1336      评论:0      收藏:0      [点我收藏+]

标签:data   key   11.2   systemctl   1.2   https   开放   pcr   div   

通过yum安装

在 /etc/yum.repos.d/ 下新建 OpenResty.repo 内容

[openresty]
name=Official OpenResty Repository
baseurl=https://copr-be.cloud.fedoraproject.org/results/openresty/openresty/epel-$releasever-$basearch/
skip_if_unavailable=True
gpgcheck=1
gpgkey=https://copr-be.cloud.fedoraproject.org/results/openresty/openresty/pubkey.gpg
enabled=1
enabled_metadata=1

查看可用的openresty软件

yum --disablerepo="*" --enablerepo="openresty" list available

当前安装的是 openresty.x86_64 版本1.11.2.2-8.el7.centos, 内置的openssl 是 1.0.2j

安装

yum install openresty

默认会安装到 /usr/local/openresty/ 目录下, 目录下包含了 luajit, lualib, nginx, openssl, pcre, zlib 这些组件

启动

/usr/local/openresty/nginx/sbin/nginx -c /usr/local/openresty/nginx/conf/nginx.conf

防火墙检查和配置

# 查看状态
systemctl status firewalld
# 查看开放的端口
firewall-cmd --zone=public --list-all
# 添加80端口
firewall-cmd --permanent --zone=public --add-port=80/tcp
firewall-cmd --reload

 

Centos7安装Openresty

标签:data   key   11.2   systemctl   1.2   https   开放   pcr   div   

原文地址:http://www.cnblogs.com/milton/p/6545448.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!