Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Start Synaptic by going to the System menu, then clicking the Administration sub-menu, then Synaptic Package Manager.
  2. Search Synaptic for postgresql, then scroll down the list of results and select the following packages:
    1. postgresql-8.2
    2. pgadmin3
      Note

      Various dependencies will be auto-selected; postgresql-8.2 is a meta-package, so it is comprised entirely of dependencies. If you need to test with other versions, select their meta-packages instead.

      Note

      pgadmin3 is not explicitly required for testing, but it makes it much easier to manage PostgreSQL databases and tablespaces.

  3. Click Apply to commence package installation.
  4. When the packages are done installing, open a terminal by going to the Applications menu, then clicking the Accessories sub-menu, then Terminal.
  5. Start the PostgreSQL server with this command:
    Code Block
    sudo /etc/init.d/postgresql-8.2 start
    
  6. Type this command into the terminal to change to the postgres user:
    Code Block
    sudo su postgres -c psql template1
    
  7. You'll end up in the psql terminal. psql is the PostgreSQL command line utility, much like mysql is for MySQL. Type this in to set the postgres root password:
    Code Block
    ALTER USER postgres with PASSWORD 'password';
    
    Note

    This will set the postgres user's password to password, which suits our internal testing purposes. Please change this to a secure password for production systems.

  8. Now type \q to quit the psql command line environment.
  9. Next you need to set the postgres system user's password. This is not the same user as the internal postgres root user that you just set. The PostgreSQL database server must run on its own system user account. In this case, as is customary, PostgreSQL runs as a user named <b>postgres</b>. Type this in to set the password:
    Code Block
    sudo passwd postgres
    
  10. You will be prompted for a user password for postgres. Again, for testing purposes, enter <b>password</b> for the password.

...