(These notes are mostly unchanged from Spring 2009. They should be very close to being correct, but they may need some minor changes.)
These notes will walk you through installing the programs you need to work from home in CSE 444:
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 and Adapting the PostgreSQL instructions sections.Download and install the Java SDK 6, update 13 from Sun. This version of the Java SDK is consistent with the version currently on the Lab machines. Update 14 is also available and should work, but you will need to modify paths in the shell launcher script to use it, and you might need other similar, minor changes.
Follow these steps:
C:\Program Files\PostgreSQL\8.3\bin\psql.exe
and
C:\Program Files\psqlJDBC\postgresql-8.3-604.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 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 and shut down along with the computer, so you don't need to start it explicitly.
The second exception is the way you log in to the database system. On Lab machines (when following the suggested procedure for creating a data folder), you are not normally asked for a username or password when connecting to the database. This is because your PostgreSQL username is the same as your Windows username (the default username for PostgreSQL client tools and libraries), and PostgreSQL automatically trusts all connections from the local computer, so any local user can connect using any PostgreSQL username without providing a password.
By default, however, PostgreSQL installed using the Windows installer will prompt you for a
username and password; you will need to use postgres
for the username and the
"database superuser password" you previously set for the password. There are two ways to work
around this problem:
net stop pgsql-8.3
), then
run it manually using a data folder created with initdb
, as you would do on a Lab
computer.initdb
.
This is a two-step process:
C:\Program Files\PostgreSQL\8.3\data\pg_hba.conf
.# IPv4 local connections: host all all 127.0.0.1/32 md5 # IPv6 local connections: host all all ::1/128 md5by changing "md5" to "trust", so they read:
# IPv4 local connections: host all all 127.0.0.1/32 trust # IPv6 local connections: host all all ::1/128 trust
> net start pgsql-8.3
> createuser -U postgres -s "%USERNAME%"
This command creates a PostgreSQL user with administrative privileges (-s
),
and the same name as your Windows username (value of the environment variable
USERNAME
), using the authority of the existing database superuser (-U
postgres
).