YUMのインストール
1.
2.
rpm -ivh pgdg-centos96-9.6-1.noarch.rpm
3.
yum -y install postgresql96-server postgresql96-devel postgresql96-contrib
4.
/usr/pgsql-9.6/bin/postgresql96-setup initdb
/usr/pgsql-9.6/bin/postgresql96-setup initdb --locale=C
/usr/pgsql-9.6/bin/postgresql96-setup initdb --no-locale
5.
systemctl start postgresql-9.6
systemctl enable postgresql-9.6
6.
FireWall
APTのインストール
sudo apt-get update
sudo apt-get install postgresql postgresql-contrib
sudo passwd postgres これは、OS(CentOS7など)のユーザーです。
dbログイン用は
psql
postgres=# alter role postgres with password 'Passwd643';
が必要です
vi gedit
/etc/postgresql/9.5/main/pg_hba.conf
/etc/postgresql/9.5/main/postgres.conf
/etc/rc.d/init.d/postgresql restart
-------------------------------------------------------
sudo apt-get install postgresql-9.5
sudo passwd postgres
vi gedit
/etc/postgresql/9.5/main/pg_hba.conf
/etc/postgresql/9.5/main/postgres.conf
/etc/rc.d/init.d/postgresql restart
-------------------------------------------------------
Ubuntuではデフォルトで
ファイアウォールが有効になってない?
gufw インストール
-------------------------------------------------------
sudo nautilus
find ~/ -name post*.conf
find / -name "hogehoge" -print
-------------------------------------------------------
yum -y install http://yum.postgresql.org/9.5/redhat/rhel-7.3-x86_64/pgdg-centos95-9.5-2.noarch.rpm
yum install postgresql95-server postgresql95-contrib
(/usr/pgsql-9.5/bin/initdb --no-locale -E UTF-8)
(/usr/pgsql-9.5/bin/postgresql95-setup initdb --no-locale -E UTF-8)
/usr/pgsql-9.5/bin/postgresql95-setup initdb
systemctl start postgresql-9.5
-------------------------------------------------------
CentOS Version確認
cat /etc/redhat-release
PostgreSQLバージョン確認
cat /usr/local/aipo/postgres/data/PG_VERSION
psql --version