nginx怎样换openresty

问答中心分类: OneinStacknginx怎样换openresty
Bruce Xie asked 5 年 ago
我刚开发安装了nginx+php+mysql+redis,现在我想把nginx换成openresty,但它提示我已经安装过nginx了,我怎么换呢?因为openresty有lua模块可以用比nginx好点,我现在网站在运行,不能卸载再重装,有什么办法吗?我试过源码编译,./configure的参数直接用了nginx -V输出的参数,但很奇怪,nginx里有--with-pcre=../pcre-8.42,可以我看我的/usr/local里却没有pcre-8.42,不知道这是怎么弄的。而且自己编译openresty报:error SSE 4.2 not found这个错误,网上查说cpu不支持,但如果我直接用oneinstack装会支持吗?
我的nginx -V参数


nginx version: nginx/1.14.0
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC)
built with OpenSSL 1.0.2o 27 Mar 2018
TLS SNI support enabled
configure arguments: --prefix=/usr/local/nginx --user=www --group=www --with-http_stub_status_module --with-http_v2_module --with-http_ssl_module --with-http_gzip_static_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-openssl=../openssl-1.0.2o --with-pcre=../pcre-8.42 --with-pcre-jit --with-ld-opt=-ljemalloc

2 Answers
oneinstack answered 5 年 ago

1. 升级oneinstack
~/oneinstack/upgrade.sh oneinstack
2. 卸载nginx
~/oneinstack/uninstall.sh web
3. 安装openresty
~/oneinstack/install.sh --nginx_option 3
4. 重新生成配置文件
~/oneinstack/vhost.sh

Bruce Xie answered 5 年 ago
@oneinstack
感谢,已经安装好了