[linux] openresty V1.15.8安装


本文总阅读量

1、安装先决条件

需要安装perl 5.6.1+ libpcre libssl,确保ldconfig命令在PATH环境变量下
yum -y install epel-release
yum -y install vim wget lrzsz pcre pcre-devel openssl openssl-devel zlib zlib-devel telnet lua luajit gcc gcc-c++ axel curl unzip

2、下载软件包

1
2
3
4
mkdir -p /data/soft
cd /data/soft
wget http://openresty.org/download/openresty-1.15.8.1.tar.gz
tar zxvf openresty-1.15.8.1.tar.gz && cd openresty-1.15.8.1

3、下载第三方包

1
2
3
4
5
6
7
8
cd /data/soft
wget http://labs.frickle.com/files/ngx_cache_purge-2.3.tar.gz
tar -zxvf ngx_cache_purge-2.3.tar.gz

cd /data/soft
wget https://codeload.github.com/yaoweibin/nginx_upstream_check_module/zip/master
unzip master
mv nginx_upstream_check_module-master nginx_upstream_check_module

4、编译安装

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
cd openresty-1.15.8.1

./configure \
--prefix=/usr/local/openresty \
--with-luajit \
--user=nobody \
--group=nobody \
--with-threads \
--with-file-aio \
--with-http_realip_module \
--with-http_sub_module \
--with-http_gunzip_module \
--with-http_gzip_static_module \
--with-http_auth_request_module \
--with-http_random_index_module \
--with-http_secure_link_module \
--with-http_slice_module \
--with-http_ssl_module \
--with-http_stub_status_module \
--with-stream \
--with-stream_ssl_module \
--with-http_v2_module \
--with-http_flv_module \
--with-mail=dynamic \
--add-module=/data/soft/ngx_cache_purge-2.3 \
--add-module=/data/soft/nginx_upstream_check_module

shell > gmake && gmake install
shell > ln -sf /usr/local/openresty/bin/openresty /usr/bin/openresty

修改linux配置参数

sudo sysctl -w net.core.somaxconn=4096

在/etc/sysctl.conf末尾追加内容

net.core.somaxconn = 4096
echo "net.core.somaxconn = 4096" >> /etc/sysctl.conf

目录
  1. 1. 1、安装先决条件
  2. 2. 2、下载软件包
  3. 3. 3、下载第三方包
  4. 4. 4、编译安装

Proudly powered by Hexo and Theme by Lap
本站访客数人次
© 2020 zeven0707's blog