参考资料:

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源码安装的更多相关文章

  1. 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 - ...

  2. 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 ...

  3. centos 6.4 源码安装php5.4 mysql5.5 apahce2

    centos 6.4 源码安装php5.4 mysql5.5 apahce2 博客分类: php   参考:http://blog.csdn.net/simpleiseasy/article/deta ...

  4. centos精简系统 源码安装客户端git

    CentOS的yum源中git版本比较低,需要最新版本git,只能自己编译安装,现在记录下编译安装的内容,留给自己备忘. 对于精简型的centos系统,会缺少很多依赖包和插件,要源码安装客户端git, ...

  5. CentOS 6.4 源码安装MySQL 5.6

    1.安装前准备工作 1.1 必备的包 gcc/g++ :MySQL 5.6开始,需要使用g++进行编译.cmake :MySQL 5.5开始,使用cmake进行工程管理,cmake需要2.8以上版本. ...

  6. 阿里云centos postgresql9.4源码安装 精简步骤、问题解答

    阿里云centos环境源码安装postgresql9.4 本文的安装步骤主要来源于http://www.cnblogs.com/mchina/archive/2012/06/06/2539003.ht ...

  7. RedHat7下PostGIS源码安装

    本文介绍在RedHat7环境下安装使用PostGIS的流程. 1. PostgreSQL 1.1 yum安装PostgreSQL 这个比较简单,直接使用yum安装即可. $ sudo yum inst ...

  8. debian下如何源码安装tmux

    一.源码安装ncurses库 1.1 获取源码 wget https://invisible-island.net/datafiles/release/ncurses.tar.gz tar xvf n ...

  9. Linux(CentOS或RadHat)下MySQL源码安装

    安装环境: CentOS6.3 64位 软件: Mysql-5.6 所需包: gcc/g++ :MySQL 5.6开始,需要使用g++进行编译.cmake  :MySQL 5.5开始,使用cmake进 ...

随机推荐

  1. bzoj 1604: [Usaco2008 Open]Cow Neighborhoods 奶牛的邻居【切比雪夫距离+并查集+multiset】

    参考:http://hzwer.com/4361.html 坐标开long long,inf开大点 先曼哈顿转切比雪夫(x+y,x-y),距离就变成了max(x',y'): 先按x排序,维护两个指针, ...

  2. [App Store Connect帮助]五、管理构建版本(3)在您提交以供审核前选择构建版本

    在提交 App 至“App 审核”前,请(从您为该版本上传的所有构建版本中)选择您想要提交的版本.一个 App Store 版本仅可关联一个构建版本.但是,在提交该版本至“App 审核”之前,您可以任 ...

  3. robotframework - Edit编辑器

    1.测试项目&套件 提供的Edit编辑器 2.在 Edit 标签页中主要分:加载外部文件.定义内部变量.定义元数据等三个部分. (1):加载外部文件Add Library:加载测试库,主要是[ ...

  4. mui 文件上传注意问题

    1. mui 文件上传 key对应后台接收参数名,但对对于多文件上传就没办法了,addFile 的key不能重复 task.addFile( "_www/a.doc", {key: ...

  5. EditText(4)常用属性详解

    常用的属性: 显示密码 通过设置EditText的setTransformationMethod()方法来实现隐藏密码或这显示密码. editText.setTransformationMethod( ...

  6. 连接oracle出现的问题以及解决办法

    连接oracle出现过的问题: 1,ORA-12514::监听程序当前无法识别链接描述符中请求的服务 1)重启服务,看是否解决 2)测试网络监听是否能监听成功,监听不成功的话,查看下面几个点:服务名( ...

  7. 【转】rpm包和源码包安装的区别

    转自:https://blog.csdn.net/junjie_6/article/details/59483785 建议在安装线上的生产服务器软件包时都用源码安装,这是因为源码安装可以自行调整编译参 ...

  8. .Net实战之反射操作篇

    1.上一讲中描述了反射中常见的类,仅仅是描述类与反射之间的关系.   但是实际是对数据的操作,  在反射中,数据如何操作? [MyTable("T_UserInfo")] publ ...

  9. re.S解析

    转自:https://www.cnblogs.com/xieqiankun/p/re-sinpython.html 在Python的正则表达式中,有一个参数为re.S.它表示“.”(不包含外侧双引号, ...

  10. Tornado引入静态css、js文件

    一.静态路径 template_path=os.path.join(os.path.dirname(__file__), "templates") 这里是设置了模板的路径,放置模板 ...