CentOS 7.1 离线安装API -kong过程(所需依赖包会上传))

1.先安装 epel :     rpm - ivh  epel-release-7-11.noarch.rpm

2 在安装kong-community-edition-0.14.1.el6.noarch.rpm 前    rpm -qa | grep perl  检查下是否安装perl 如果没有上传27个依赖包

  2.1      mkdir /opt/test    perl的27个依赖包上传到test下

  2.2      rpm -ivh *.rpm 即可

3.安装kong-community-edition-0.14.1.el6.noarch.rpm:       rpm -ivh kong-community-edition-0.14.1.el6.noarch.rpm

4.安装postgresql:                                         rpm -ivh pgdg-centos11-11-2.noarch.rpm

5.安装postgresql11所需依赖包:

  5.1      mkdir /opt/postgresql11    postgresql11所需三个rpm包上传到/opt/postgresql11下

  5.2      rpm -ivh *.rpm 即可

6安装postgresql11_server所需依赖包(三个)

  6.1      mkdir /opt/postgresql11_server    postgresql11_server所需三个rpm包上传到/opt/postgresql11_server下

  6.2      rpm -ivh *.rpm 即可

7 查看安装::     rpm -qa|grep postgres

                   得到如下结果则表示成功了!

                    Postgresql11-9.4.15-5PGDG.rhel6.x86_64

                    Postgresql11-server-9.4.15-5PGDG.rhel6.x86_64

                    Postgresql11-libs-9.4.15-5PGDG.rhel6.x86_64

                    Postgresql11-contrib-9.4.15-5PGDG.rhel6.x86_64

8 初始化,开机自启动,启动等操作

/usr/pgsql-11/bin/postgresql-11-setup initdb     初始化

systemctl enable postgresql-11                   开机自启

systemctl start postgresql-11                    启动

 

 

 

9 vi /var/lib/pgsql/11/data/postgresql.conf

修改为:listen_addresses = '*'

10 vi /var/lib/pgsql/11/data/pg_hba.conf

修改为:host    all             all         127.0.0.1/32         trust

 

11 systemctl start postgresql-11  重启

 

12创建kong需要的库、授权  并 把相关的数据写入库:

  su - postgres

  -bash-4.2$ psql

  postgres=# CREATE USER kong; CREATE DATABASE kong OWNER kong;

  postgres=# \q

  -bash-4.2$  kong migrations up

  exit

 

13启动kong:

 cp /etc/kong/kong.conf.default /etc/kong/kong.conf

 

 kong start

你可能感兴趣的:(API网关kong)