-
Notifications
You must be signed in to change notification settings - Fork 33
Openresty installing guide
FijianJacobs edited this page Jan 1, 2020
·
2 revisions
- centos平台
yum install pcre-devel openssl-devel gcc
注意事项: 如果服务器无法访问外网,需要配置yum repo源!
- macosx平台
brew update
brew install pcre openssl
- openresty官方下载tar包,建议openresty-1.11.2.3版本及以上版本
wget https://openresty.org/download/openresty-1.11.2.3.tar.gz
- 解压并进入到目录
tar -xzvf openresty-VERSION.tar.gz
cd openresty-VERSION/
- configuration
- macosx平台
./configure --prefix=/usr/local/openresty/ \
--with-cc-opt="-I/usr/local/opt/openssl/include/ -I/usr/local/opt/pcre/include/" \
--with-ld-opt="-L/usr/local/opt/openssl/lib/ -L/usr/local/opt/pcre/lib/" \
--with-luajit \
--without-http_redis2_module \
--with-http_iconv_module \
--with-pcre-jit \
--with-ipv6 \
--with-http_realip_module \
--with-http_ssl_module \
--with-http_stub_status_module \
--with-http_v2_module
- centos平台
./configure --prefix=/usr/local/openresty/ \
--with-luajit \
--without-http_redis2_module \
--with-http_iconv_module \
--with-pcre-jit \
--with-ipv6 \
--with-http_realip_module \
--with-http_ssl_module \
--with-http_stub_status_module \
--with-http_v2_module
- make install
make
make install
- 设置soft link
ln -s /usr/local/openresty/bin/resty /usr/local/bin/resty
ln -s /usr/local/openresty/bin/openresty /usr/local/bin/openresty
ln -s /usr/local/openresty/nginx/sbin/nginx /usr/local/bin/nginx
- 配置yum仓库
yum install yum-utils
yum-config-manager --add-repo https://openresty.org/package/rhel/openresty.repo
- yum安装
yum install openresty
yum install resty
- 设置soft link
ln -s /usr/local/openresty/bin/resty /usr/local/bin/resty
ln -s /usr/local/openresty/bin/openresty /usr/local/bin/openresty
ln -s /usr/local/openresty/nginx/sbin/nginx /usr/local/bin/nginx
nginx -v
resty -v
openresty -v
Copyright @ 2019-2020 Go Go Easy Team