These notes will walk you through installing the programs you need to work from home in CSEP 544:
We assume here that you're using Windows. If you're using Mac OS X or Linux, please help us out by contributing notes for your OS.
Please remember that we only support CSE Instructional Lab-supported computers. If you are having trouble getting your assignment running at home, please try running it on a Lab machine.
C:\Program Files
to
C:\Program Files (x86)
in the "Installing PostgreSQL" section, and download the
updated shell launcher script to set the classpath correctly on your system.Download the Java SDK 6, update 7 from Sun. This is a slightly older version of the Java SDK, so the updater may nag you unless you turn it off. However, it is consistent with the current Java SDK on the Lab machines.
Follow these steps:
C:\Program Files\PostgreSQL\8.4\bin\psql.exe
and
C:\Program Files\psqlJDBC\postgresql-8.4-701.jdbc4.jar
exist.Follow these steps:
C:\Program Files\Microsoft SQL Server 2005 JDBC Driver
C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_2.0\enu\sqljdbc4.jar
exists.With two major exceptions, the PostgreSQL instructions for Lab machines still apply to working from home.
The first major exception is that you can completely skip the sections titled "Creating a data folder" and "Starting and stopping PostgreSQL". The installer already created a data folder, so you don't need to create one yourself, and it set up PostgreSQL to start on system startup, so you don't need to worry about that either.
The second major exception is the username and password you use to access the database.
On Lab machines (when following the suggested procedure for creating a data folder),
your PostgreSQL username is the same as your CSE login name, and you are not
asked for a password because PostgreSQL automatically trusts all connections from the
local computer. Neither is true on a home installation.
Specifically, you must use as your PostgreSQL username the database superuser's name, which (unless you changed it
in the installer) is postgres
. Your password is thus the database superuser's password.
This has two consequences:
-U
option
to most commands,
before other arguments; hence
> createdb customer
becomes
> createdb -U postgres customer
You will then be prompted for the password for user postgres
; use the database
superuser password you established earlier. Alternatively, for psql
only,
you can specify the username after the database name and omit -U
:
> psql customer postgres