









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










ITL WORKSHOP INSTALLING UNIX - PAGE 2 SPRING 2001
Hard disk space with at least 2GB space reserved for Linux; CD-Rom and floppy drive; Two Ethernet cards; Video card and Monitor; Keyboard and mouse; FDDI card (optional).
The following steps go through a RedHat7.1 Linux Installation from a CD-ROM. We assume that a copy of the RedHat7.1 CD-ROM distribution is available.
ITL WORKSHOP INSTALLING UNIX - PAGE 3 SPRING 2001
It is suggested to create a Linux swap partition. The size of the Linux swap partition depends on the amount of RAM on your machine, but not less than 16MB. It is recommended that
Size of SWAP = 2 x (Size of RAM)
Press "Ok" if the partitioning is finished.
Note : The default configuration file for LILO is /etc/lilo.conf. You can manually update this file as root and execute the command "lilo" to make the new configuration permanent for the following reboots.
ITL WORKSHOP INSTALLING UNIX - PAGE 5 SPRING 2001
ITL WORKSHOP INSTALLING UNIX - PAGE 6 SPRING 2001
The installation program described above creates a kernel with default settings. For the ITLab, the Linux installation needs to be customized, e.g., add FDDI card support, turn on IP forwarding. A customization of the kernel requires that the kernel be recompiled. For customized installations, the RedHat7.1 kernel source code package is needed. You can download the kernel source code package (named linux-2.4.5.tar.gz) from the website: http://www.kernel.org/pub/linux/kernel/v2.4/. The following steps describe how to compile the kernel using linux-2.4.5.tar.gz.
http://www.kernel.org/pub/linux/kernel/v2.4/ and put it on the directory /usr/src.
tar –zxvf linux-2.4.5.tar.gz A subdirectory /usr/src/linux will show up after installing the kernel package.
make menuconfig when the kernel configuration menu is popped up, select the required items:
main-menu ‡ Networking options ‡ [] IP: advanced router [] IP: verbose route monitoring (NEW) [] IP: multicast routing main-menu ‡ Networking device support ‡ Ethernet (10 or 100Mbit) ‡ <> PCI NE2000 and clones support (see help) main-menu ‡ Networking device support ‡ [] FDDI driver support <> Digital DEFEA and DEFPA adapter support (NEW) PPP (point-to –point protocol) support SLIP (serial line) support [] Fibre Channel driver support main-menu ‡ File systems ‡ <> DOS FAT fs support <> MSDOS fs support <> VFAT (Windows 95) fs support main-menu ‡ Console drivers ‡ [*] Video mode selection support
make dep make clean
ITL WORKSHOP INSTALLING UNIX - PAGE 8 SPRING 2001
In order for the RedHat7.1 system to have the required features, the system often needs to be reconfigured. This section describes various customization of the system that may be need for the ITL Labs.
IP forwarding must be enabled whenever a PC has to act as a router. The file /etc/sysconfig/network specifies whether a machine supports IP forwarding or not. If the machine acts as a router, this file includes a line:
FORWARD_IPV4=yes
If the machine is a host, the line does not exist or is set to FORWARD_IPV4=no.
Unfortunately, according to our experience, there is no system script file which reads and deals with the above configuration line during the initialization phase of the system. To ensure the system can process the configuration of IP forwarding function correctly, the following lines are added to the end of the script file, /etc/rc.d/rc.local.
. /etc/sysconfig/network if [ -d /proc/sys/net/ipv4 ]; then if [ ${FORWARD_IPV4} = "yes" -o ${FORWARD_IPV4} = "true" ]; then echo 1 > /proc/sys/net/ipv4/ip_forward else echo 0 > /proc/sys/net/ipv4/ip_forward fi fi
In RedHat7.1, suppose you have two Ethernet interfaces on the machine, there are two files which contain the network configurations of these Ethernet interfaces:
/etc/sysconfig/network-scripts/ifcfg-eth0 //for interface eth /etc/sysconfig/network-scripts/ifcfg-eth1 //for interface eth
The contents of ifcfg-eth0 may read like this: DEVICE=eth BOOTPROTO=static BROADCAST=10.0.14. IPADDR=10.0.14. NETMASK=255.255.255. NETWORK=10.0.14. ONBOOT=yes If the content of this file is modified, the updates will take effect during the next reboot of the machine.
The start-up static routing table is specified in the file:
ITL WORKSHOP INSTALLING UNIX - PAGE 9 SPRING 2001
/etc/sysconfig/static-routes, whose contents may be:
eth0 net 10.0.1.0 netmask 255.255.255.0 gw 10.0.13. eth0 net 10.0.6.0 netmask 255.255.255.0 gw 10.0.1. eth1 net 10.0.7.0 netmask 255.255.255.0 gw 10.0.13. eth0 default gw 10.0.11. When the system is booted, each line of the file static-routes is run as the parameters of the command "route".
In RedHat7.1, there is no "easy" way to change the hostname. The command, hostname host-name , just changes the hostname until the next reboot of the system. To permanently change the hostname, you need to edit the following files manually:
/etc/HOSTNAME /etc/sysconfig/network /etc/hosts //if necessary /etc/resolv.conf //if necessary
Lilo is a program which can send/receive information to/from the boot sectors. The configuration file of Lilo, /etc/lilo.conf, contains the data Lilo uses. Below is a typical example of lilo.conf:
boot=/dev/hda map=/boot/map install=/boot/boot.b prompt timeout= linear default=linux
image=/boot/vmlinuz-2.2.14-5. label=linux initrd=/boot/initrd-2.2.14-5.0.img read-only root=/dev/sda other=/dev/hda label=bsd The above setting is for a system with two operating systems, so-called dual-boot system. Here, Lilo lets you boot the computer with Linux (with boot label linux) or FreeBSD (with boot label bsd).
When the machine is booted, the prompt lilo, appears. You select one of the operating systems, by typing the label name followed by the Enter key. Pressing the "Tab" keep displays all label names managed by lilo.
ITL WORKSHOP INSTALLING UNIX - PAGE 11 SPRING 2001
There are several network tools or software used in the lab manual for the ITLab. All of them can be found on the Internet, and downloaded at no cost. We have downloaded the software required to run ITL Labs, and made it available at http://www.cs.virginia.edu/~itlab/software.
Below is a summary of the software packages, with summaries of the installation procedures.
The inetd server, also called superserver, is a network daemon program that manages incoming network connections. It monitors all network interfaces. The configuration file of inetd has information on the program to run when an incoming connection is received. For example, when receiving a telnet connection, inetd calls in.telnetd to deal with the request. As a exercise, you will install them manually.
Note: For security resons, you should close more network servers as possible, such as ftp, telnet, shell, login, exec, talk, ntalk, imap, pop-2, pop-3, finger, auth, etc. If a machine acts as a www and ftp server, only port 80, port 20 and port 21 need to be used for www and ftp services. All other unrelated ports should be closed.
ps –aux | grep "inetd"
inetd-0.16-4.i386.rpm telnet-server-0.16-6.i386.rpm wu-ftpd-2.6.0-3.i386.rpm finger-server-0.16-5.i386.rpm talk-server-0.16-4.i386.rpm rsh-server-0.16-12.i386.rpm
rpm –ivh inetd-0.16-4.i386.rpm To uninstall the above rpm format package, type:
rpm –e inetd
ITL WORKSHOP INSTALLING UNIX - PAGE 12 SPRING 2001
echo stream tcp nowait root internal echo dgram udp wait root internal discard stream tcp nowait root internal discard dgram udp wait root internal daytime stream tcp nowait root internal daytime dgram udp wait root internal #chargen stream tcp nowait root internal #chargen dgram udp wait root internal time stream tcp nowait root internal time dgram udp wait root internal
ftp stream tcp nowait root /usr/sbin/tcpd in.ftpd -l -a telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd
shell stream tcp nowait root /usr/sbin/tcpd in.rshd login stream tcp nowait root /usr/sbin/tcpd in.rlogind #exec stream tcp nowait root /usr/sbin/tcpd in.rexecd #comsat dgram udp wait root /usr/sbin/tcpd in.comsat talk dgram udp wait nobody.tty /usr/sbin/tcpd in.talkd ntalk dgram udp wait nobody.tty /usr/sbin/tcpd in.ntalkd #dtalk stream tcp wait nobody.tty /usr/sbin/tcpd in.dtalkd
#pop-2 stream tcp nowait root /usr/sbin/tcpd ipop2d #pop-3 stream tcp nowait root /usr/sbin/tcpd ipop3d #imap stream tcp nowait root /usr/sbin/tcpd imapd
#uucp stream tcp nowait uucp /usr/sbin/tcpd /usr/lib/uucp/uucico -l
#tftp dgram udp wait root /usr/sbin/tcpd in.tftpd #bootps dgram udp wait root /usr/sbin/tcpd bootpd
finger stream tcp nowait nobody /usr/sbin/tcpd in.fingerd #cfinger stream tcp nowait root /usr/sbin/tcpd in.cfingerd
ITL WORKSHOP INSTALLING UNIX - PAGE 14 SPRING 2001
10.0.12.1 root 10.0.12.2 root 10.0.14.1 root 10.0.14.2 root 10.0.23.1 root 10.0.23.2 root 10.0.45.1 root 10.0.45.2 root 10.0.56.1 root 10.0.56.2 root 10.0.36.1 root 10.0.36.2 root vintpc1 root vintpc2 root vintpc3 root vintpc4 root vintpc5 root vintpc6 root
Tcpdump, a powerful network monitoring and analyzing tool, is widely used in the ITLab manual. The following steps install tcpdump in /usr/local/bin.
http://www.cs.virginia.edu/~itlab/software
ITL WORKSHOP INSTALLING UNIX - PAGE 15 SPRING 2001