linux卸载kong,Ubuntu 源码安装Kong

安装openresty

tar xzvf openssl-1.0.2h.tar.gz

以下是我个人安装流程

tar xzvf openresty-1.9.15.1.tar.gz

安装openresty前需要先 准备对应的库有: perl 5.6.1+, libreadline, libpcre, libssl

如果为ubuntu用户则

apt-get install libreadline-dev libncurses5-dev libpcre3-dev \

libssl-dev perl make build-essential

下载完毕后进入目录

./configure \

--prefix=/opt/openresty \

--with-openssl=../openssl-1.0.2h \

--with-pcre-jit \

--with-ipv6 \

--with-http_realip_module \

--with-http_ssl_module \

--with-http_stub_status_module

其中 --prefix=/opt/openresty 为安装目录

make

make install

$ export PATH="/opt/openresty/bin:/opt/openresty/nginx/sbin:$PATH"

nginx -v

nginx version: openresty/1.9.15.1

表示成功安装

安装luarocks

luarocks为lua的包管理工具

1.克隆源码

git clone https://github.com/keplerproject/luarocks.git

2.配置、编译、安装

./configure \

--lua-suffix=jit \

--with-lua=/opt/openresty/luajit \

--with-lua-include=/opt/openresty/luajit/include/luajit-2.1

make

make install

安装serf v0.7

解压后移到 /usr/local/bin 或者 /usr/bin 目录下

安装 Kong

1.克隆源码并安装

$ git clone https://github.com/Mashape/kong

$ git checkout next

$ luarocks make

$ cd bin

$ sudo cp kong /usr/local/bin

2.修改配置文件

在源码的根目录下有个 kong.conf.default 文件,修改里面对应的配置使其满足你的需要。

运行 Kong

KONG_DATABASE=postgres kong start -c /etc/kong/kong.conf

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值