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进 ...
随机推荐
- sql%found sql%notfound sql%rowcount sql%isopen
原文引入:http://blog.csdn.net/mh942408056/article/details/6949325 sql%found sql%notfound sql%rowcount sq ...
- SYSUCPC2017 1007 Tutu’s Array II
题目大意:有A个0和B个1,每次取两个出来进行{XNOR,NAND,NOR}操作生成一个新的0/1,直到只剩一个元素.问最后是否可能剩下一个0,是否可能剩下一个1. XNOR 比较特殊 a XNOR ...
- easyui图标对照
转自:https://blog.csdn.net/qq_34545192/article/details/78250816 原作者文章地址: http://www.cnblogs.com/timeme ...
- emma中文显示乱码问题解决(ubutnu)
vim -/.emma/emmarc 找到 db_encoding=latin1 改为 db_encoding=utf8 然后重新运行emma,此时发现还是乱码,不要着急,在执行所有的sql语句 ...
- bzoj 1734: [Usaco2005 feb]Aggressive cows 愤怒的牛【二分+贪心】
二分答案,贪心判定 #include<iostream> #include<cstdio> #include<algorithm> using namespace ...
- StackOverflow 创始人关于如何高效编程的清单
这是 StackOverflow 联合创始人 Jeff Atwood 注释的十戒.程序员普遍有很强的自尊心,都应该看看本文,打印下来时刻提醒自己. “无我编程”发生在开发阶段,表现为技术团队经常通过同 ...
- http升级https(转)
让你的网站免费支持 HTTPS 及 Nginx 平滑升级 为什么要使用 HTTPS ? 首先来说一下 HTTP 与 HTTPS 协议的区别吧,他们的根本区别就是 HTTPS 在 HTTP 协议的基础上 ...
- [Usaco2007 Mar]Gold Balanced Lineup 平衡的队列
Description N(1<=N<=100000)头牛,一共K(1<=K<=30)种特色,每头牛有多种特色,用二进制01表示它的特色ID.比如特色ID为13(1101),则 ...
- 图论 HDOJ 5348 MZL's endless loop
题目传送门 /* 题意:给一个n个点,m条边的无向图,要求给m条边定方向,使得每个定点的出入度之差的绝对值小于等于1. 输出任意一种结果 图论:一个图,必定存在偶数个奇度顶点.那么从一个奇度定点深搜, ...
- 项目需求会__前端er定位的思考~
一.页面展示-----针对前端部分:后台的东西(功能.样式)不考虑! 二.动态效果------能不能实现! 三.接口数据------怎么传数据! 四.兼容性--------兼容到哪个版本浏览器! 五. ...