码迷,mamicode.com
首页 > 其他好文 > 详细

CentOs 7 kong 2.3.X oss 部署安装

时间:2021-04-21 12:50:51      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:https   conf   database   red   localhost   账号   info   rap   img   

PostgreSQL 9.6部署

参考:https://www.cnblogs.com/shhnwangjian/p/14680679.html

 

Kong 2.3.x部署

技术图片

https://docs.konghq.com/install/centos/

1、添加RPM

https://bintray.com/kong/kong-rpm/download_file?file_path=centos/7/kong-2.3.3.el7.amd64.rpm

2、yum安装

yum install kong-2.3.3.el7.amd64.rpm --nogpgcheck

3、pg添加Kong账号

# 创建postgres数据库账号
su postgres
psql
CREATE USER kong; CREATE DATABASE kong OWNER kong;
ALTER USER kong WITH PASSWORD ‘123456‘;
\q

4、配置Kong DataSource

创建配置 cd /etc/kong;cp kong.conf.default kong.conf

vim /etc/kong/kong.conf
# 修改数据库配置
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 = 123456            # The password to authenticate if required.
pg_database = kong              # The database name to connect to.

5、迁移Kong (在数据库Kong中创建需要的表)

kong migrations bootstrap -c /etc/kong/kong.conf

6、启动kong

kong start -c /etc/kong/kong.conf

7、验证

curl -i http://localhost:8001/

技术图片

 

CentOs 7 kong 2.3.X oss 部署安装

标签:https   conf   database   red   localhost   账号   info   rap   img   

原文地址:https://www.cnblogs.com/shhnwangjian/p/14680693.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!