api gateway kong的安裝與使用

install kong

https://konghq.com/install/

wget -O kong-community-edition-0.13.1.xenial.all.deb https://bintray.com/kong/kong-community-edition-deb/download_file?file_path=dists/kong-community-edition-0.13.1.xenial.all.deb
sudo apt-get update
sudo apt-get install openssl libpcre3 procps perl
sudo dpkg -i kong-community-edition-0.13.1.*.deb

install postgresql

sudo vim /etc/postgresql/9.5/main/postgresql.conf 
search :/listen
listen_addresses = '*'
password_encryption = on
  1. 修改配置文件pg_hba.conf
sudo vim /etc/postgresql/9.5/main/pg_hba.conf
host all all 0.0.0.0/0  md5
  1. 重啟postgres
sudo service postgresql restart
  1. 修改口令
    安裝過(guò)程中,系統(tǒng)已經(jīng)添加了postgres的用戶,并且這個(gè)用戶的環(huán)境變量都設(shè)置好了,命令行工具很豐富.
sudo passwd postgres

然后切換到用戶,修改postgre數(shù)據(jù)庫(kù)的密碼

su - postgres

修改密碼

postgres@vos2016062102:~$ psql postgres 
psql (9.5.3)
輸入 "help" 來(lái)獲取幫助信息.

postgres=# alter user postgres with password 'your password';
ALTER ROLE
postgres=# 

5. create database for kong

先創(chuàng)建用戶

CREATE USER kong WITH PASSWORD 'kong';
(wtever :遇到kong.conf kong migrations pgsql  auth fail; alter user kong with password 'kong'; )

創(chuàng)建數(shù)據(jù)庫(kù),并給用戶授權(quán)

create database "kong";

GRANT ALL PRIVILEGES ON DATABASE "kong" to kong;

postgres相關(guān)處理:

修改postgresql 默認(rèn)用戶postgres密碼,生成一個(gè)用戶(kong)for kong database;
su - postgres
psql
alter user postgres with password 'your password';      
get:ALTER ROLE
CREATE USER kong WITH PASSWORD 'kong';

postgresql如何允許外界連接: http://lazybios.com/2016/11/how-to-make-postgreSQL-can-be-accessed-from-remote-client/

QAQ:
1.安裝之后 virtualHost:8000 無(wú)反應(yīng):將kong.conf關(guān)于端口的注釋關(guān)閉

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容