zoukankan      html  css  js  c++  java
  • centos7下安装kong

    参考:https://www.cnblogs.com/duanxz/p/10364783.html

     一、安装

    1、已经安装好postgresql,可以参考这个博客

    https://www.cnblogs.com/stulzq/p/7766409.html

    2、碰到的问题

    2.1 如果报错

    错误: 函数 to_regclass(unknown) 不存在 (12)
    参考 https://www.lijiaocn.com/%E9%97%AE%E9%A2%98/2018/09/29/kong-usage-problem-and-solution.html, postgresql版本升级就可以。
    sudo yum install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-1.noarch.rpm
    #sudo yum install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm

    kong migrations bootstrap
    2.2 kong migrations up -c /etc/kong/kong.conf.default  
    执行这个的时候"Ident 认证失败"可以用参考网址的方法
    我用的是postgresql10版本,
    sudo vim /var/lib/pgsql/10/data/pg_hba.conf
    修改对应的地方为password

    2.3 kong start -c /etc/kong/kong.conf --vv
    执行这个的时候报没有权限,就用sudo执行
    sudo /usr/local/bin/kong start -c /etc/kong/kong.conf --vv

    2019/10/22 17:38:44 [debug] starting nginx: /usr/local/openresty/nginx/sbin/nginx -p /usr/local/kong -c nginx.conf
    2019/10/22 17:38:47 [debug] nginx started
    2019/10/22 17:38:47 [info] Kong started

    安装成功了!  本人qq: 575654643
    
    
    二、修改配置
    默认只能localhost查看界面

    curl -i http://localhost:8001/
    不能主机外访问,需要修改admin_listen
    admin_listen = 0.0.0.0:8001, 0.0.0.0:8444 ssl

    修改之后重启
    sudo /usr/local/bin/kong restart -c /etc/kong/kong.conf --vv


    三、使用kong

    。。。。。。




  • 相关阅读:
    Hibernate事务代码规范写法
    关于hibernate插入数据时的乱码问题
    搭建hibernate环境(重点)
    接口测试概念以及用postman进行接口测试
    Atom编辑器之加快React开发的插件汇总
    如何搭建git服务器
    phpstorm 配置 xdebug调试工具
    linux 获取指定行范围文本内容
    odoo 创建一个qweb
    linux nohup 使用
  • 原文地址:https://www.cnblogs.com/qq575654643/p/11721015.html
Copyright © 2011-2022 走看看