Installing and initializing PostgreSQL 8.2 on Ubuntu Linux
For testing purposes, you may have to install and initialize the PostgreSQL database on Linux. The instructions below were tested on Ubuntu Linux 8.04 x86, but if you are using a different Linux distribution, only the package installation instructions will differ for you, and you should be able to figure out how to change them to work with your package manager.
Installing the necessary packages
This will install the PostgreSQL 8.2 server, client, associated libraries and other dependencies, and the pgadmin graphical administration utility:
- Start Synaptic by going to the System menu, then clicking the Administration sub-menu, then Synaptic Package Manager.
- Search Synaptic for postgresql, then scroll down the list of results and select the following packages:
- postgresql-8.2
- pgadmin3
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.
pgadmin3 is not explicitly required for testing, but it makes it much easier to manage PostgreSQL databases and tablespaces.
- Click Apply to commence package installation.
- When the packages are done installing, open a terminal by going to the Applications menu, then clicking the Accessories sub-menu, then Terminal.
- Start the PostgreSQL server with this command:
sudo /etc/init.d/postgresql-8.2 start
- Type this command into the terminal to change to the postgres user:
sudo su postgres -c psql template1
- 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:
ALTER USER postgres with PASSWORD 'password';
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.
- Now type \q to quit the psql command line environment.
- 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 postgres. Type this in to set the password:
sudo passwd postgres
- You will be prompted for a user password for postgres. Again, for testing purposes, enter password for the password.
Your server should now be ready to go. Run the Pentaho scripts for creating quartz, hibernate, and sample user data, and commence testing.