centos下kong源码安装
参考资料:
https://docs.konghq.com/install/source/
环境准备:操作系统 centeros7.3
1 :openssl和pcre一般系统自带,如果没有可自己安装 https://www.openssl.org/source/
或者 yum -y install pcre-devel openssl openssl-devel
2: git
yum install git -y
3:gcc
yum install gcc -y
3: lua
wget http://luajit.org/download/LuaJIT-2.0.5.tar.gz
tar -xvf LuaJIT-2.0.5.tar.gz
cd LuaJIT-2.0.5
make install
一: 下载安装 openresty
wget https://openresty.org/download/openresty-1.13.6.2.tar.gz
tar -xvf openresty-1.13.6.2.tar.gz
cd openresty-1.13.6.2
./configure --with-pcre-jit --with-http_ssl_module --with-http_realip_module --with-http_stub_status_module --with-http_v2_module
gmake install
二:luarocks
wget http://luarocks.github.io/luarocks/releases/luarocks-3.0.3.tar.gz
tar -xvf luarocks-3.0.3.tar.gz
cd luarocks-3.0.3
./configure
make install
三:安装kong
将源码copy到服务器
make install
如果成功会提示:kong 0.14.1-0 is now installed in /usr/local (license: MIT)
四 :安装数据库
yum install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm -y
yum install postgresql10 -y
yum install postgresql10-server -y
/usr/pgsql-10/bin/postgresql-10-setup initdb
systemctl enable postgresql-10
systemctl start postgresql-10
创建数据库
su - postgres
psql
CREATE USER kong; CREATE DATABASE kong OWNER kong;
\q
exit;
还需要设置下数据库访问权限
vi /var/lib/pgsql/10/data/pg_hba.conf
修改为:host all all 127.0.0.1/32 trust
systemctl restart postgresql-10 五:kong启动 在 /etc/kong/ 文件创建kong.conf 内容如下
prefix = /usr/data/kong/
proxy_listen = 0.0.0.0:8000, 0.0.0.0:8443 ssl
admin_listen = 127.0.0.1:8001
database = postgres # Determines which of PostgreSQL or Cassandra
pg_host = 127.0.0.1 # The PostgreSQL host to connect to.
pg_port = 5432 # The port to connect to.
pg_user = kong # The username to authenticate if required.
pg_password = # The password to authenticate if required.
pg_database = kong
在kong源码根目录
bin/kong migrations up
bin/kong start
检查配置:
curl -i -X GET http://localhost:8001/
安装完毕。 六: kong dashboard
yum install -y nodejs
npm install -g kong-dashboard
nohup kong-dashboard start --kong-url http://0.0.0.0:8001 --basic-auth admin=123456 &
centos下kong源码安装的更多相关文章
- centos下从源码安装openssl
cd /usr/src wget https://www.openssl.org/source/openssl-1.0.1g.tar.gz -O openssl-1.0.1g.tar.gz tar - ...
- centos下从源码安装openssl 1.0.1g
cd /usr/srcwget https://www.openssl.org/source/openssl-1.0.1g.tar.gz -O openssl-1.0.1g.tar.gz tar -z ...
- centos 6.4 源码安装php5.4 mysql5.5 apahce2
centos 6.4 源码安装php5.4 mysql5.5 apahce2 博客分类: php 参考:http://blog.csdn.net/simpleiseasy/article/deta ...
- centos精简系统 源码安装客户端git
CentOS的yum源中git版本比较低,需要最新版本git,只能自己编译安装,现在记录下编译安装的内容,留给自己备忘. 对于精简型的centos系统,会缺少很多依赖包和插件,要源码安装客户端git, ...
- CentOS 6.4 源码安装MySQL 5.6
1.安装前准备工作 1.1 必备的包 gcc/g++ :MySQL 5.6开始,需要使用g++进行编译.cmake :MySQL 5.5开始,使用cmake进行工程管理,cmake需要2.8以上版本. ...
- 阿里云centos postgresql9.4源码安装 精简步骤、问题解答
阿里云centos环境源码安装postgresql9.4 本文的安装步骤主要来源于http://www.cnblogs.com/mchina/archive/2012/06/06/2539003.ht ...
- RedHat7下PostGIS源码安装
本文介绍在RedHat7环境下安装使用PostGIS的流程. 1. PostgreSQL 1.1 yum安装PostgreSQL 这个比较简单,直接使用yum安装即可. $ sudo yum inst ...
- debian下如何源码安装tmux
一.源码安装ncurses库 1.1 获取源码 wget https://invisible-island.net/datafiles/release/ncurses.tar.gz tar xvf n ...
- Linux(CentOS或RadHat)下MySQL源码安装
安装环境: CentOS6.3 64位 软件: Mysql-5.6 所需包: gcc/g++ :MySQL 5.6开始,需要使用g++进行编译.cmake :MySQL 5.5开始,使用cmake进 ...
随机推荐
- sparksql语句
(1)in 不支持子查询 eg. select * from src where key in(select key from test);支持查询个数 eg. select * from src w ...
- 求欧拉回路 UOJ117
传送门什么是欧拉回路呢……?欧拉回路的定义就是从vi出发到vi,经过每条边有且只有一次的路径. 就很像一笔画. 欧拉回路的性质较多……定理也很多……直接证明很长……我们还是直接说怎么判定,怎么求欧拉回 ...
- obs nginx-rtmp-module搭建流媒体服务器实现直播 ding
接下来我就简单跟大家介绍一下利用nginx来搭建流媒体服务器. 我选择的是腾讯云服务器 1.下载nginx-rtmp-module: nginx-rtmp-module的官方github地址:http ...
- 31. ExtJs4回车事件监听
转自:https://710542316.iteye.com/blog/2148542 监听表单字段事件: Ext使得对用户某个动作的监听特别简单,诸如单击某个元素或者按下某个键盘上的键. 一个经常性 ...
- openssh常用命令记录
command description date ssh [user@]hostname[:port] 登录远程机器 2017-03-21 scp <local_file> <use ...
- LoadRunner监控Linux配置教程
LoadRunner监控Linux资源时弹出如下错误: Monitor name :UNIX Resources. Cannot initialize the monitoring on 192.16 ...
- [笔试面试题] 10-C和C++区别相关
1 C和C++有什么不同? 机制不同:C是面向过程的(但C也可以编写面向对象的程序):C++是面向对象的,提供了类.但是,C++编写面向对象的程序比C容易. 适用领域不同:C适合要求代码体积小的,效率 ...
- 二分搜索 POJ 3258 River Hopscotch
题目传送门 /* 二分:搜索距离,判断时距离小于d的石头拿掉 */ #include <cstdio> #include <algorithm> #include <cs ...
- DataGridView 动态绑定 CheckBox
下面演示如何在 DataGridView 中动态绑定 CheckBox: public class Test { /// <summary> /// 构造器 /// </summar ...
- JSP/Servlet Web应用中.properties文件的放置与读取
本地项目 在本地类库中,我经常使用当前目录来放置.properties文件,这时调用方只要引用我的jar,并且将我的.properties放在他的classpath里面即可,比如: p.load(ne ...