openresty安裝

一、安裝
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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章