您的位置:首页 > 其它

kong API gateway(一):安装

2017-10-20 10:50 197 查看
# 下载&安装
# git https://github.com/Kong/kong ---
wget https://bintray.com/kong/kong-community-edition-deb/download_file?file_path=dists/kong-community-edition-0.11.0.xenial.all.deb sudo apt-get update
sudo apt-get install openssl libpcre3 procps perl
sudo apt-get install nodejs npm
sudo dpkg -i kong-community-edition-0.11.0.*.deb

# 安装配置PostgreSQL数据库
---
sudo apt-get install postgresql     // 可指定版本
sudo service postgresql start       // 启动服务
sudo service postgresql status      // 检查状态

# 安装postgreSQL可视化工具(也可以使用命令行操作数据库)
---
sudo apt-get install pgadmin3
sudo su -s /bin/bash postgres       // 切换到postgre用户

# 添加用户和数据库
---psql命令--
CREATE USER kong;                   // 添加用户
CREATE DATABASE kong OWNER kong;    // 添加数据库
\q                                  // 退出
exit                                // 退出postgre用户

# 测试
---
kong version
0.11.0

# 安装Kong Dashboard
git https://github.com/PGBI/kong-dashboard ---
npm install -g kong-dashboard@v2    // 安装Kong Dashboard
kong-dashboard start

# 注
---
运行kong和kong-dashboard命令时我是没使用sudo的

# 访问 http://localhost:8080/[/code] 
文章来源:http://blog.csdn.net/qq_26656329/article/details/78293005
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: