Phoebe 1,
2, 3,
4 Catalogs
'n Manuals
Hardening
| Chapter 9. Various & Sundry Administrative TasksLinux has proven itself to be extremely reliable during the over four years I have had it in service as an Internet server and requires very little hands-on administration to keep it running. Where possible, many repetitive or tedious administrative tasks can and should be automated through crontab entries and script files. However, to ensure that Linux continues to operate in a trouble-free manner, various quick checks can be done from time to time. These include: Checking Storage SpaceIt is important to check from time to time that adequate free space remains on the storage devices. Use the “df” command to get a report of available space. It will look as follows (information shown is from the Internet server at my place of employment):
These file-systems are pretty stable in that they have a fairly slow growth pattern. The “/” (aka root) file-system, mounted on /dev/hda1, contains the Linux kernel, device drivers, and other directories. It also is where user mail messages are stored (/var/spool/mail/) as well as log files (/var/adm/) but as mail messages are received and log files are recycled, the available capacity stays fairly stable (an estimated growth of about 1% per month). Log files are rotated and purged automatically on a weekly basis, so you'll always have about a month's worth of log information available to you.
The “/usr/” (aka user) file-system, mounted on /dev/hda2, contains user-installable (user meaning user-installed by system administrator) software, things like your web site pages, etc. This is the largest file-system, and is also fairly slow-growth. The log files for the web pages may also be stored here, and grow in size; check and trim them periodically as needed. On my machines, at the beginning of each month the current web log files are moved to month summary logs (eg. access_log.11 for November's log entries). At the end of the year these logs are all deleted and the cycle starts again (which means each January 1st should see a fair improvement in available space).
The “/home/” (aka user's personal home) file-system, mounted on /dev/hda3, contains all the user directories and personal files. Unless you are giving out shell accounts, most of these will be useless and inaccessible to the user (these directories are created when each users' accounts are created, and can later be used to forward the user's mail, etc.). However shell account users, as well as any non-shell accounts which have web pages (eg. personal web pages) will probably have them stored here. In addition, main server pages are stored here in the /home/httpd directory under Red Hat, while other distributions usually place them in the /usr file system (see the section called Web Server and HTTP Caching Proxy Administration in Chapter 7 for more information). This file-system is probably the slowest growth unless you are offering a lot of shell accounts.
I also have an “/archive/” (aka archive files) file-system, mounted on /dev/hdb1, which is a spare 1.02 Gb hard drive that can be used for any purpose (eg. data files, software kits, etc.) I am using a good portion (approximately 70%) of this drive for disk-to-disk full current backups of the system). Generally speaking you can add your own devices and mount them as you wish. I also have a CD-ROM drive, mounted as “/mnt/cdrom/” on /dev/scd0, which is a 24X-speed SCSI CD-ROM device that can read any ISO9660 formatted CD. It is used primarily for software installation, but DOS/Windows CD's can be mounted and then accessed from Windows 3.x/95/NT network shares as needed via a Samba service (see the section called Windows-style File and Print Services with Samba in Chapter 7 for details). The “rm” command will delete a file. Usage is ``rm filename''. If you want confirmation of deletion, use the “-i” option (eg. ``rm -i *''). You would then be asked to confirm each file before it is deleted.
Be careful you don't make a silly typo with this command -- particularly when logged in as “root” -- because you may end up regretting deleting the wrong file. |