APIgateway之kong安装
kong安装:
下载指定版本rpm:
wget bintray/kong/kong-community-edition-rpm/download_file?file_path=centos/7/kong-community-edition-0.12.arch.rpm yum install epel-release
yum install xxx.rpm
kong数据库安装:
kong⽀持2种数据库存储(postgreSQL 和 Cassandra )
安装postgreSQL:
yum install /pub/repos/yum/9.4/redhat/rhel-7-x86_64/arch.rpm
yum install postgresql94
yum install postgresql94-server
/usr/pgsql-9.4/bin/postgresql94-setup initdb
修改postgreSQL配置⽂件:
vim /var/lib/pgsql/9.4/f
修改为:listen_addresses = '*'
vim /var/lib/pgsql/9.4/data/f
修改为:host    all            all            127.0.0.1/32            trust
启动postgreSQL:
systemctl enable postgresql-9.4
systemctl start postgresql-9.4
创建kong需要的库、授权并把相关的数据写⼊库:
#su - postgres
centos安装vim命令
-bash-4.2$ psql
postgres=# CREATE USER kong; CREATE DATABASE kong OWNER kong;
postgres=# \
# kong migrations up
启动kong:
# cp /etc/f.default /etc/f
# kong start
# curl -i -X GET localhost:8001/
HTTP/1.1 200 OK
Date: Thu, 10 May 2018 07:43:18 GMT
.
...
安装kong-dashboard:
安装kong管理⼯具的环境依赖  nodejs 及 npm
curl --silent --location desource/setup_9.x | sudo bash -
yum install -y nodejs
npm install -g kong-dashboard
nohup kong-dashboard start --kong-url 0.0.0.0:8001 &
也可以基于basic 认证,在登录是要求输⼊密码
nohup kong-dashboard start --kong-url 0.0.0.0:8001 --basic-auth admin=123456 &

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。