Changes between Version 1 and Version 2 of sysadminPostgreSQLConfiguration


Ignore:
Timestamp:
Jun 23, 2009, 2:40:37 PM (13 years ago)
Author:
risard
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • sysadminPostgreSQLConfiguration

    v1 v2  
    11= Installing Postgres =
    22
     3----
    34== Overview ==
    45
     
    78The assumption being made in this documentation, is that the database server is separate from the open-ils server.
    89
     10----
    911== Installing the Software ==
    1012
     
    1719If postgres is already installed, apt will say so and make no changes, otherwise it will be installed with default settings.
    1820
     21During installation,a postgres user will be added to the local system (ie the computer).  This is a standard linux user account and it's permissions are created during setup.  '''Do not change the permissions of this user! '''  This user runs the postgres processes and should have only the permissions necessary to do that.  Also created during installation is a db role called postgres.  This is internal to postgres and has nothing to do with the operating system.  The postgres role provides complete access to all databases created on that db server.  It's important to change the passwords for both the postgres account and postgres role for security purposes.
     22{{{
     23    $sudo passwd postgres
     24}}}
    1925
     26You will be prompted to change postgres's password.  After doing so, you can check that it worked by trying:
     27{{{
     28    $su postgres
     29}}}
     30
     31You should gain access to the postgres account with the password you entered.  If not, you likely made a mistake and can try again with the passwd command.
     32
     33You change the db role via psql.  Switch users to postgres:
     34{{{
     35    $su postgres
     36}}}
     37
     38and log into psql:
     39{{{
     40    $psql
     41}}}
     42
     43Run the following:
     44{{{
     45    ALTER ROLE postgres WITH ENCRYPTED PASSWORD 'mypassword';  #include the quotes around mypassword
     46}}}
     47
     48----
     49== Initializing The Database Server ==
     50
     51Postgres uses the term "database cluster" to describe the directory it uses to store data.  During the apt install, a default directory is created, usually at: /var/lib/postgresql/8.3/main.
     52
     53  '''NOTE: ''' our servers have been partitioned to best serve the needs of Evergreen.  The default cluster location is not usually on a partition that has been sized appropriately for the db.  Generally, you will ''' not ''' be using the default install directory.
     54
     55You will need to find the appropriate partition and install the appropriate files there.  This is usually:
     56{{{
     57    /data/postgresql/8.3/
     58