Postgres: Difference between revisions
From Bashlinux
Jump to navigationJump to search
Content deleted Content added
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
__NOTOC__ |
__NOTOC__ |
||
= PostgreSQL = |
|||
| ⚫ | |||
| ⚫ | |||
<pre><nowiki> |
|||
| ⚫ | |||
</nowiki></pre> |
|||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
CentOS |
|||
<pre><nowiki> |
|||
| ⚫ | |||
| ⚫ | |||
Ubuntu |
|||
| ⚫ | |||
# apt-get install postgresql |
|||
| ⚫ | |||
| ⚫ | |||
</nowiki></pre> |
|||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
<pre><nowiki> |
|||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
</nowiki></pre> |
|||
| ⚫ | |||
| ⚫ | |||
Revision as of 03:23, 3 June 2015
How to install and initialize postgres
- Install postgresql packages
CentOS
# yum install postgresql postgresql-server
Ubuntu
# apt-get install postgresql
- Initialize the DB
# mkdir /var/lib/pgsql/data # chown postgres /var/lib/pgsql/data # su - postgres > initdb -D /var/lib/pgsql/data
- Start postgres
# pg_ctl -D /usr/local/pgsql/data -l -logfile start