Linux Lab #9 (50pts)
Due Wednesday June 15
Use the script command to make a log of your activities. The log should be named Lab9.HOSTNAME.DATE where HOSTNAME is your hostname (fetched from an environment variable or inline execution) and DATE is the current date and time in the format MMDDYY (fetched with inline execution). (E.g. "Lab9.LINFORD3040.052305")
In answering direct questions below (as marked by the question-mark '?'), use a shell comment to give your answer. For example, if I say: "What is the command to give you the system time?" You should type, at the command prompt, "# date is the command" or something to that effect. The important part is the hash-mark '#' which causes the shell to ignore everything behind it.
I strongly recommend that you use two terminals: one to run the script command and one to test your commands before executing them under script. It's also a good idea to use shell comments to say which part of the assignment the following commands are for.
Do not run any program which generates lots of escape- and meta-characters inside a terminal running the 'script' command. This includes man, vi, and pico.
Install Apache 1.3 from Source
- Make sure you are not root
- Copy /public_3040/apache_1.3.33.tar.gz from my laptop to the current user's home directory
- Use gunzip to decompress the archive. Notice that the ".gz" is removed from the archive
- Use tar to list the archive's contents
- Use tar to verbosely extract the archive
- Enter the apache source directory
- Configure the apache source tree with the following options:
- The destination installation directory is /usr/local/apache13
- The server will run under UID wwwrun
- The server will run under GID www
- All modules are enabled by default
- Disable the following modules:
- Build the source tree
- Become root
- Set your umask to 022
- Install the newly-built apache
- Use ln to make a symbolic link from /usr/local/apache13/bin/apachectl to /etc/init.d/apache13
Configure Apache 1.3
- Make sure you are root
- Change to the configuration directory for the new Apache 1.3 installation
- Make a backup copy of the Apache 1.3 configuration file with filename httpd.conf.DATE.bak where DATE is the current date with the format string "+%m%d%y-%H:%M.%S"
- Configure Apache 1.3 to...
- Listen on port 80
- List the administrator's e-mail address as your e-mail address
- Alias /home to "userfiles". Why is this a bad thing to do?
- Use diff to show your changes
Test Apache 1.3
- Start Apache 1.3
- View the apache manual
- Use the security hole made by aliasing /home to show kenny's personal shell settings
- Show the apache access log
When finished, type exit or press ^D until you get a message like "Script done, file is Lab9.HOSTNAME.DATE". To turn in the assignment, scp the logfile to 192.168.0.100:/public_3040 as user "cs3040"