install kong
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
- 修改配置文件pg_hba.conf
sudo vim /etc/postgresql/9.5/main/pg_hba.conf
host all all 0.0.0.0/0 md5
- 重啟postgres
sudo service postgresql restart
- 修改口令
安裝過程中,系統(tǒng)已經(jīng)添加了postgres的用戶,并且這個用戶的環(huán)境變量都設(shè)置好了,命令行工具很豐富.
sudo passwd postgres
然后切換到用戶,修改postgre數(shù)據(jù)庫的密碼
su - postgres
修改密碼
postgres@vos2016062102:~$ psql postgres
psql (9.5.3)
輸入 "help" 來獲取幫助信息.
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ù)庫,并給用戶授權(quán)
create database "kong";
GRANT ALL PRIVILEGES ON DATABASE "kong" to kong;
postgres相關(guān)處理:
修改postgresql 默認用戶postgres密碼,生成一個用戶(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 無反應(yīng):將kong.conf關(guān)于端口的注釋關(guān)閉