linux環境下安裝openresty的方法

1.安裝依賴

yum install pcre-devel openssl-devel gcc curl postgresql-devel

2.官網下載源碼包

http://openresty.org/cn/download.html

wget -c https://openresty.org/download/openresty-1.15.8.1rc2.tar.gz

解壓文件:

tar -zxvf openresty-1.15.8.1rc2.tar.gz

4.源碼編譯

//切換目錄
cd openresty-1.15.8.1rc2
//開始安裝
./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
保存退出

執行生效命令:source /etc/profile
查看是否生效:echo $PATH
在這裏插入圖片描述

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