- Create the following directories in your home directory:
% cd
% mkdir -p cs898n/cgi-bin
- Change the permissions of some directories:
% cd
% chmod 711 .
% chmod 711 cs898n
% chmod 711 cs898n/cgi-bin
- Write your first CGI program in directory ~/cs898n/cgi-bin
% cd ~/cs898n/cgi-bin
% cat > hello
#!/usr/bin/perl
$date = qx (date);
print << "EOT"
Content-type: text/html
<html>
<body>
<center>
<h1>Hello World!</h1>
The current time is $date
</center>
</body>
</html>
EOT
ctr+D <--- type control+D here
% chmod 755 hello
- Open a netscape browser window, and type the following URL in
location line:
http://kira:8888/cgi-bin/cs898n/xyz/hello
where xyz is your account name. Type the return key
and you will see the "hello world" string displayed on the
screen.