Tool Setup Instructions |  |
PostgreSQL RDBMS for Windows, Version 8.0If the course you are setting up requires PostgreSQL 8.0, follow these instructions to set it up on the student and instructor machines. If you have questions, please contact your courseware vendor.
If an Earlier Version of PostgreSQL is Already Installed
If you have a version of PostgreSQL that is earlier than 8.0 or a beta version, you need to stop the PostgreSQL service before uninstalling it. To do this:
 |
Right-click on My Computer on your desktop. Choose Manage and click on the + next to Services and Applications. Click on Services. In the right-hand pane, scroll down to see if there is a service called PostgreSQL. If there is, then it stop the service.
|
 |
Now remove the previous version. Use Control Panel, Add or Remove Programs, and uninstall the older version of PostgreSQL.
|
 |
If the PostgreSQL installation folder is still remaining, then delete it. In the directory Documents and Settings, check for a user called postgres. If it exists, delete it.
|
New Installation of PostgreSQL
The installer link for PostgreSQL is located at:
 |
http://www.postgresql.org/ftp/
Click on the win32 link and download the postgresql-8.0.x.zip file. Unzip the file into a temporary directory and follow the installation instructions below. Pictures are included below for strategic decision points only.
|
 |
Right click on postgresql-8.0.msi and click Install.
|
 |
The installer will install PostgreSQL, and prompt for more information. When you see asked to select a language, make sure English/English is checked and click on Start.
|
 |
When you are prompted to read the installation notes, do read them carefully for further information, and then click on Next.
|
 |
When you asked to verify or change the installation options, you can use the defaults and click on Next. Optionally, the Npsql driver, ODBC driver, and OLEDB providers can be unchecked.
|
 |
You will need to make changes to the service configuration. Make sure the Account name is "postgres". The Account password should be "postgres" in order to work with the labs. When you click Next you will be asked if you want to create the postgres account. Answer Yes. You will then be asked if you want a randomly assigned password instead of a weak one. Answer No.
|
 |
When asked about database clusters, set the password to "postgres", then click on Next.
|
 |
Select the defaults for the next several steps and you will be prompted to install. Press Next. If you installed successfully, you should see the following dialog box:
|
 |
To test the installation, first check to see if the PostgreSQL service is started. To do this, right-click on My Computer on your desktop. Choose Manage and click on the + next to Services and Applications. Click on Services. In the right-hand pane, scroll and find a service called "PostgreSQL Database Server 8.0" and start the service if it isn't already.
|
 |
Next add the PostgreSQL bin directory to the executable path. If the default installation location was chosen, the path will be:
c:\Program Files\PostgreSQL\8.0\bin
Open a console and start the psql SQL console:
psql template1 postgres
When prompted for a password, enter "postgres". You should get a template1=# prompt. Connect to the pre-installed PostgreSQL database as shown below, and you should get the response shown. Then, disconnect and exit.
template1=# \l
List of databases
Name | Owner | Encoding
-----------+----------+-----------
template0 | postgres | SQL_ASCII
template1 | postgres | SQL_ASCII
(2 rows)
template1=# \q
You can use the PostgreSQL shortcuts to shut down or startup the PostgreSQL service or run the pgAdmin III administration tool.
|
 |
Be sure that the instructor is aware of the location of the PostgreSQL installation for in-class configuration and exercises.
|
|  |