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

openresty安装

时间:2019-04-11 19:51:06      阅读:154      评论:0      收藏:0      [点我收藏+]

标签:usr   源码   源码包   iconv   --   status   gre   源码编译   stream   

一、安装
1.安装依赖
yum install pcre-devel openssl-devel gcc curl postgresql-devel

2.官网下载源码包
http://openresty.org/cn/download.html

  1. 新建项目目录结构
    mkdir work
    cd work
    mkdir {conf,logs}

4.源码编译
./configure --prefix=/usr/local/openresty/ --with-http_stub_status_module --with-luajit --without-http_redis2_module --with-http_iconv_module --with-http_postgres_module --with-stream

gmake && gmake install

5.添加环境变量
vim /etc/profile
PATH=/usr/local/openresty/nginx/sbin:$PATH
export PATH

6.配置文件编写
vim conf/nginx.conf # 内容就是nginx配置文件格式

7.启动
nginx -p pwd/ -c conf/nginx.conf

openresty安装

标签:usr   源码   源码包   iconv   --   status   gre   源码编译   stream   

原文地址:https://blog.51cto.com/haoyonghui/2377398

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