一、版本信息
中间件 | 版本 | 安装包 | 安装方式 |
---|---|---|---|
openresty | openresty-1.21.4.1.tar.gz | 源码包 | 编译安装 |
二、安装
#安装依赖
yum install -y pcre-devel make gcc gcc-c++ m4 openssl openssl-devel
#解压安装
tar -xf openresty-1.21.4.1.tar.gzcd openresty-1.21.4.1
#编译安装
./configure --prefix=/data/openresty --with-luajit --without-http_redis2_module --with-http_iconv_module --with-stream --with-http_realip_module --with-http_stub_status_module --with-http_gzip_static_module --with-http_v2_module --with-http_ssl_module
#安装
make -j4 && make install
三、启动服务
#添加软连接到/usr/bin/方便使用
ln -s /data/openresty/nginx/sbin/nginx /usr/bin/nginx
#语法检查
nginx -t
#启动服务
nginx