Различия
Здесь показаны различия между двумя версиями данной страницы.
| Предыдущая версия справа и слева Предыдущая версия Следующая версия | Предыдущая версия | ||
|
dev:postgresql:notes [2015/04/22 10:21] denis [disable password for locals] |
dev:postgresql:notes [2015/05/15 20:36] (текущий) denis [error messages in english] |
||
|---|---|---|---|
| Строка 2: | Строка 2: | ||
| - [[http://www.postgresql.org/download/|Download]] | - [[http://www.postgresql.org/download/|Download]] | ||
| - [[http://www.postgresql.org/docs/9.4/static/index.html|Documentation 9.4]] | - [[http://www.postgresql.org/docs/9.4/static/index.html|Documentation 9.4]] | ||
| + | - [[https://www.valentina-db.com/en/download-valentina-studio/current|Valentina Studio]] | ||
| + | - [[http://www.dbvis.com/download/|Db Visualizer]] | ||
| + | |||
| + | ===== install ===== | ||
| + | |||
| + | // sudo gedit /etc/apt/sources.list.d/pgdg.list //: | ||
| + | deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main | ||
| + | |||
| + | wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | ||
| + | sudo apt-get update | ||
| + | apt-get install postgresql-9.4 postgresql-contrib pgadmin3 | ||
| ===== set password for the postgres user ===== | ===== set password for the postgres user ===== | ||
| Строка 9: | Строка 20: | ||
| \q | \q | ||
| | | ||
| - | ===== disable password for locals ===== | + | ===== authentication ===== |
| - | * open ''/etc/postgresql/9.4/main/pg_hba.conf'' | + | /etc/postgresql/9.4/main/pg_hba.conf: |
| - | * change from peer from ''peer'' to ''trust'' | + | local all all trust |
| + | host all all 0.0.0.0/0 md5 | ||
| + | |||
| + | ''/etc/postgresql/9.4/main/postgresql.conf'': | ||
| + | listen_addresses = '*' | ||
| + | |||
| + | sudo service postgresql restart | ||
| + | |||
| + | ===== create another superuser ===== | ||
| + | sudo -u postgres createuser --superuser denis | ||
| + | createdb denis | ||
| + | psql | ||
| + | ===== install adminpack ===== | ||
| + | psql | ||
| + | create extension "adminpack"; | ||
| + | |||
| + | ===== change data folder ===== | ||
| + | passwd postgres | ||
| + | type password for unix-postgres user | ||
| + | |||
| + | mkdir /media/store/asutp/promauto/db/pgdata | ||
| + | sudo chown postgres:postgres /media/store/asutp/promauto/db/pgdata | ||
| + | sudo chmod 700 /media/store/asutp/promauto/db/pgdata | ||
| + | |||
| + | su - postgres | ||
| + | /usr/lib/postgresql/9.4/bin/initdb -D /media/store/asutp/promauto/db/pgdata | ||
| + | exit | ||
| + | sudo service postgresql stop | ||
| + | |||
| + | // /etc/postgresql/9.4/main/postgresql.conf //: | ||
| + | data_directory = '/media/store/asutp/promauto/db/pgdata' | ||
| + | |||
| + | sudo service postgresql start | ||
| + | psql | ||
| + | \password | ||
| + | type password for db-postgres user | ||
| + | |||
| + | ===== no cluster problem ===== | ||
| + | Check [[dev:ubuntu:setupsvr#locales|locales]] first. | ||
| + | pg_createcluster 9.4 main --start | ||
| + | |||
| + | ===== error messages in english ===== | ||
| + | |||
| + | // C:\Program Files\PostgreSQL\9.3\data\postgresql.conf //: | ||
| + | lc_messages = 'en_US' | ||
| + | |||
| + | ===== client windows dll ===== | ||
| + | libeay32.dll | ||
| + | libintl.dll | ||
| + | libpq.dll | ||
| + | ssleay32.dll | ||