Introduction

All of the programs and documents that you write during the course of the semester should be made available to the public on the WWW. This means that, at some point, you will need to move them to one of the university UNIX machines such as hats or arizona. You need not develop on these machines, but everything that you do must work on them.

Creating Your Home Page/Directory

If you don't already have one you will need to create a home page for yourself (details).

Creating a CGI Directory

OIT does not allow us to access the CGI directly from hats or arizona (for security reasons). Instead, we have to access it on campuscgi.princeton.edu. To get setup, you need to register with OIT (see their pages on CGI programming at Princeton).

Getting Ready for ORF401

  1. Create a CampusCGI account.
  2. Connect to hats or arizona via SSH (details).
  3. Copy and paste the following command into the SSH window. This will retrieve the setup script for the first lab and take you through a series of prompts to get you started. Read through each prompt and type y or n depending on the information provided.
    wget http://orfe.princeton.edu/courses/orf401/labs/lab1/setup.sh ; chmod u+x setup.sh ; ./setup.sh
  4. If you have run the script previously you will be asked if you wish to backup your exisiting files in order to run the script from scratch a second time.
  5. You will be asked if you wish to reset permissions on your home directory. Type y so that permissions will be changed to 711, allowing your public_html directory to be viewable from the web.
  6. The necessary files will then be copied to two locations, the public_html folder in your home directory as well as /usr/campuscgi/$USERNAME.
  7. Finally, you will be asked if you wish to reset permissions on the recently copied files. Type y and the files will also be viewable from the web.