CentOS65 安装 Openresty centos6.3 centos6安装 centos6.5安装教程

php中文网
发布: 2016-07-29 08:54:15
原创
1253人浏览过

学习开源软件的第一步就是上官网,看安装guidedemo(examples)。对于openresty来说一样,官网给出了详细的安装说明:http://openresty.org/en/installation.html

那就来动手TIY一下。

1. 安装依赖

openresty依赖于perl 5.6.1+libreadlinelibpcrelibssl

centos,centos6.5,centos6.7,centos6下载,centos7,centos6.0,centos6.3,centos6安装,centos6.5安装教程

CentosRed Hat的克隆版,因此操作按照RedHat用户的步骤进行

centos,centos6.5,centos6.7,centos6下载,centos7,centos6.0,centos6.3,centos6安装,centos6.5安装教程

为了避免在安装的过程中手动输入确认,在yum命令中带上-y选项

运行`sudo yumy install readline-devel pcre-devel openssl-devel gcc`

如果安装顺利的话,会看到completed

centos,centos6.5,centos6.7,centos6下载,centos7,centos6.0,centos6.3,centos6安装,centos6.5安装教程

2.安装openresty

2.1 下载某个release版本的openresty

centos,centos6.5,centos6.7,centos6下载,centos7,centos6.0,centos6.3,centos6安装,centos6.5安装教程

本人并没有使用最新,而是选择1.9.7.3这个版本。

帮衣帮-AI服装设计
帮衣帮-AI服装设计

AI服装设计神器,AI生成印花、虚拟试衣、面料替换

帮衣帮-AI服装设计 106
查看详情 帮衣帮-AI服装设计
centos,centos6.5,centos6.7,centos6下载,centos7,centos6.0,centos6.3,centos6安装,centos6.5安装教程

2.2 解压文件

运行`tarzxvf openresty-1.9.7.3.tar.gz`

centos,centos6.5,centos6.7,centos6下载,centos7,centos6.0,centos6.3,centos6安装,centos6.5安装教程

2.3  运行`./configure`,成生了几个文件,包含一个重要的配置文件Makefile

centos,centos6.5,centos6.7,centos6下载,centos7,centos6.0,centos6.3,centos6安装,centos6.5安装教程

2.4  运行`make`,执行Makefile中的第一个编译规则,如果你熟悉java中的ant(基本上对应于anttarget),那么你就很容易在干什么了,可以看一下Makefile的内容

centos,centos6.5,centos6.7,centos6下载,centos7,centos6.0,centos6.3,centos6安装,centos6.5安装教程

2.5 编译完成后,运行`make install`

centos,centos6.5,centos6.7,centos6下载,centos7,centos6.0,centos6.3,centos6安装,centos6.5安装教程

如果一切顺利的话,openresty就安装完成了。

有可能会安装不成功,提示权限出错,这是由于openresty默认安装在/usr/local/openresty/目录,需要root权限,再次运行`sudo make install`就能成功安装完成。

centos,centos6.5,centos6.7,centos6下载,centos7,centos6.0,centos6.3,centos6安装,centos6.5安装教程

2.6 启动nginx

centos,centos6.5,centos6.7,centos6下载,centos7,centos6.0,centos6.3,centos6安装,centos6.5安装教程

OK,到目前为止,我们已经顺利的安装了Openresty了,剩下的工作就是配置和使用它了。

欢迎转载,请保留原文链接 http://blog.csdn.net/musa875643dn/article/details/51104922

以上就介绍了CentOS65 安装 Openresty,包括了CentOS6方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

最佳 Windows 性能的顶级免费优化软件
最佳 Windows 性能的顶级免费优化软件

每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号