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进 ...
随机推荐
- POJ 3100:Root of the Problem
Root of the Problem Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 12060 Accepted: 6 ...
- 【Beijing 2010】 次小生成树
[题目链接] 点击打开链接 [算法] 首先,有一个结论 : 一定有一棵严格次小生成树是在最小生成树的基础上去掉一条边,再加上一条边 这个结论的正确性是显然的 我们先用kruskal算法求出最小生成树, ...
- 洛谷P1297 单选错位——期望
题目:https://www.luogu.org/problemnew/show/P1297 读懂题后就变得很简单啦: 对于一个问题和它的下一个问题,我们考虑: 设上一个问题有 a 个选项,下一个问题 ...
- bzoj4264
哈希 cf原题...没见过的话真想不出来 将邻接表排序哈希,判断是否相同,但是会漏掉两点相邻的情况,于是再把自己加入自己的邻接表,然后再哈希判断. #include<bits/stdc++.h& ...
- Python基础 — Pandas
Pandas -- 简介 Python Data Analysis Library 或 pandas 是基于NumPy 的一种工具,该工具是为了解决数据分析任务而创建的. Pandas ...
- Django day 34 过滤课程,登录,redis,python操作redis
一:过滤课程, 二:登录 三:redis, 四:python操作redis
- 例题 3-5 谜题 uva227 Puzzle
A children’s puzzle that was popular years ago consisted of a × frame which contained small squares ...
- less新手入门(一) 变量、extend扩展
前景提要 个人在学习less时候的学习笔记及个人总结,主要是结合less中文网来学习的,但是说是中文网并不是中文呀,看起来很耽误时间,为了避免以后再次看的时候还要翻译思考,特意做此总结,方便以后查阅. ...
- 'latin-1' codec can't encode characters in position解决字符问题
当遇到这样的报错时,原因是: pymysql库在处理mysql语句时,默认的编码方式是'latin-1',这种编码方式能识别的字符是有限的 解决办法:找到\site-packages\pymysql\ ...
- Html 标签的事件绑定(转自 MSDN)
参考 MSDN 网页给 HTML 标签绑定 click 事件: function makeFoldersCollapsible(folderIcon, openFolderIcon, pathToIc ...