System administration refers to tasks that someone must perform to keep a computer system up and running properly. Now that almost all computers are networked, it’s necessary to perform another set of tasks to keep the network up and running. All these tasks are collectively called network administration. A site with many computers probably has a full-time system administrator who takes care of all system-administration and network-administration tasks. Really large sites may have separate system-administration and network-administration personnel. If you are running Linux on a home PC or on a few systems in a small company, you are probably both the system administrator and the network administrator.
Linux supplies all the basic commands and utilities you need for system and network administration. Chapters 12 and 20 briefly cover some of these commands. Chapter 6 describes some network-administration tools.
GNOME’s Nautilus graphical shell comes with many GUI tools that enable you to perform most system-administration and network-administration tasks without having to edit configuration files manually or type cryptic commands. However, you should always learn the key commands and be proficient with a plaintext editor such as vi, for those times when you must use a text-only login and the GUI tools are not available. Additionally, you need to understand the layout of the key configuration files. I cover this type of information throughout this book, even when describing GNOME and KDE, because they too depend on configuration files for correct operation.
As a system administrator, your tasks typically are the following:
Installing, configuring, and upgrading the operating system and various utilities. You learn how to install Red Hat Linux and other software packages in Chapter 2. Chapter 3 tells you how to install and configure the X Window System, and Chapter 21 shows you how to upgrade the operating system—the Linux kernel.
Adding and removing users. As shown in Chapter 18, you can use Nautilus’s Red Hat User Manager graphical tool or the useradd command to add a new user after you install Linux. If a user forgets a password, you can change the password from the Red Hat User Manager or can use the passwd command to change it.
Installing new software. For the typical Linux software, which you get in source-code form, this task involves using tools such as gunzip (to uncompress the software), tar (to unpack the archive), and make (to build the executable programs). For software, Red Hat distributes in Red Hat Package Manager (RPM) files, use the rpm command to install the software. Chapter 21 describes RPM.
Making backups. You can use the tar program to archive one or more directories and to copy the archive to a floppy disk (if the archive is small enough) or to a tape (if you have a tape drive). Chapter 20 covers backing up and restoring files and directories.
Managing file systems. When you want to read an MS-DOS floppy disk, for example, mount that disk’s MS-DOS file system on one of the directories of the Linux file system. Use the mount command to do this. You can also use mount an NT file system (NTFS) after installing a kernel module that supports NTFS. You also want to monitor the file system to ensure that users or some errant process have not filled them up.
Monitoring the system’s performance. You have to use a few utilities, such as top (to see where the processor is spending most of its time) and free (to see the amount of free and used memory in the system).
Monitoring the system’s integrity. You want to make sure that no one has tampered with key system files. You can use tools such as Tripwire to perform this task. Chapter 22 covers how to maintain system security.
Starting and shutting down the system. Although starting the system typically involves nothing more than powering up the PC, you do have to take some care when you want to shut down your Linux system. Use the shutdown command to stop all programs before turning off your PC’s power switch. If your system is set up for a graphical login screen, you can perform the shutdown operation by selecting a menu item from the login screen.
Typical network-administration tasks are the following:
Maintaining the network configuration files. In Linux (as well as in other UNIX systems), several text files hold the configuration information for the TCP/IP network. You may have to edit these files to make networking work. You may have to edit one or more of the following files: /etc/hosts, /etc/networks, /etc/host.conf, /etc/resolv.conf, /etc/HOSTNAME, /etc/hosts.allow, /etc/hosts.deny, and the scripts in the /etc/sysconfig/network-scripts directory. You can either edit these files manually or use the graphical Network Configuration tool to configure them.
Setting up PPP. You may use tools such as wvdial to set up and use PPP connections. You can also use the Red Hat Dialup Configuration Tool to set up PPP connections. Chapter 13 shows you how to work with PPP commands and configuration files.
Monitoring network status. You have to use tools such as netstat (to view information about active network connections), /sbin/ifconfig (to check the status of various network interfaces), and ping (to make sure that a connection is working).
Securing Internet services. If your system is connected to the Internet (or if it is on an internal network), you have to secure the system against anyone who might use one of many Internet services to gain access to your system. Each service—such as email, Web, or FTP—requires running a server program that responds to client requests arriving over the TCP/IP network. Some of these server programs have weaknesses that may enable an outsider to log in to your system—maybe with root privileges. Turn off services you do not need, and edit configuration files to restrict access to those services you are running. Chapter 22 covers network security and how to use commands such as chkconfig to turn Internet services on or off.