Linux CentOS7 OpenResty安装
安装环境为CentOS7
1、安装依赖库
yum install readline-devel pcre-devel openssl-devel perl -y
# debian用这个
# apt-get install libreadline-dev libpcre3-dev libssl-dev perl
2、下载openresty
wget https://openresty.org/download/openresty-1.15.8.3.tar.gz
3、解压并进入目录
tar -zxvf openresty-1.15.8.3.tar.gz
cd openresty-1.15.8.3
4、创建安装目录并配置
./configure --prefix=/usr/local/openresty --with-luajit --without-http_redis2_module --with-http_iconv_module
5、编译
gmake
6、安装
gmake install
7、配置环境变量(在/etc/profile文件末尾添加)
export PATH=$PATH:/usr/local/openresty/nginx/sbin
8、使环境变量生效
source /etc/profile
本文来自博客园,作者:HumorChen99,转载请注明原文链接:https://www.cnblogs.com/HumorChen/p/18039745