postgres設定 ポート開ける
CentOS 7にPostgreSQL最新版をインストール - 働きたくないゆとりの備忘録
postgres 初期設定
http://rina.jpn.ph/~rance/linux/postgresql/connect.html
telnet ip port
ss -an | grep 5432
vim /var/lib/pgsql/9.4/data/postgresql.conf
listen_addresses = '*'
systemctl restart postgresql-9.4
pg_hba.conf
vim /var/lib/pgsql/9.4/data/pg_hba.conf
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all peer
# IPv4 local connections:
#host all all 127.0.0.1/32 ident
# IPv6 local connections:
#host all all ::1/128 ident
host all all 0.0.0.0/0 trust
systemctl restart postgresql-9.4
phpinfo で確認
yum install php-pgsql --enablerepo=remi-php56
これがえらってた
apachectl configtest
systemctl restart httpd
新しくDB、テーブル作る
vim .env
DB_HOST= IP
DB_DATABASE=新しく作ったDB
DB_USERNAME=postgres