|
|
Administration & Server Software
Being 'root''root' is the most powerful account on a Linux system. Learn how to use it wisely and appropriately.
BackupYou should backup your personal files on a regular basis. Usually, each user saves his personal files in the user directory under the /home directory. All the global administrative configuration files are stored in /etc and can be written only by the root user. Tools for backup are:
Emergency RecoveryHow to cope with severe system errors.
Managing ProcessesAlmost everything going on in Linux is a process. Have a look at what they are and how to manage them.
MountingHow to handle file systems in Linux.
SchedulingHow to tell your computer to do certain things at a certain time.
System ServicesSystem services: what they are and how to control them.
Getting OrganizedConfig filesDo you ever have trouble remembering where the config files are for all those services you run?Then get organized. Create a /root/config directory, sub-directories for each service you run, and symlinks for those configuration files: For example, as root: mkdir /root/config cd /root/config mkdir samba apache dns network cups sasl rsynccd samba ln -s /etc/samba/smb.conf ln -s /etc/samba/smbusers ln -s /etc/lmhostscd /root/config/apache ln -s /etc/httpd/conf/httpd2.conf ln -s /etc/httpd/conf/commonhttpd.conf ln -s /etc/httpd/conf/vhosts/Vhosts.confcd /root/config/dns ln -s /etc/hosts ln -s /etc/resolv.conf ln -s /var/named/named.ca ln -s /etc/named.conf ln -s /etc/networks ln -s /var/named/localhostcd /root/config/network ln -s /etc/sysconfig/network-scripts/ifcfg-eth0 ln -s /etc/sysconfig/network-scripts/ifcfg-eth1 ln -s /etc/services Now everything will be in one place the next time you configure a service. If you use an editor that creates backup files, with the '~~' suffix, you won't have them all over your filesystems. Bash AliasesDo you ever get tired of typingtail /var/log/syslog
less /var/log/messages
Then get lazy1.1 Make yourself some aliases. Put these lines in /root/.bashrc. alias tslog='/usr/bin/tail /var/log/syslog' alias lslog='/usr/bin/less /var/log/syslog' alias tmsg='/usr/bin/tail /var/log/messages' alias lmsg='/usr/bin/less /var/log/messages' alias tauth='/usr/bin/tail /var/log/auth.log' alias lauth='/usr/bin/less /var/log/auth.log' alias tmail='/usr/bin/tail /var/log/mail/info' alias lmail='/usr/bin/less /var/log/mail/info' alias tkern='/usr/bin/tail /var/log/kernel/info' alias lkern='/usr/bin/less /var/log/kernel/info' alias thacc='/usr/bin/tail /var/log/httpd/access_log' alias lhacc='/usr/bin/less /var/log/httpd/access_log' alias therr='/usr/bin/tail /var/log/httpd/error_log' alias lherr='/usr/bin/less /var/log/httpd/error_log' alias thsacc='/usr/bin/tail /var/log/httpd/ssl-access_log' alias lhsacc='/usr/bin/less /var/log/httpd/ssl-access_log' alias thserr='/usr/bin/tail /var/log/httpd/ssl-error_log' alias lhserr='/usr/bin/less /var/log/httpd/ssl-error_log' alias tsmb='/usr/bin/tail /var/log/samba/log.smbd' alias lsmb='/usr/bin/less /var/log/samba/log.smbd' alias tnmb='/usr/bin/tail /var/log/samba/log.nmbd' alias lnmb='/usr/bin/less /var/log/samba/log.nmbd' alias urpmi='nice -n 15 urpmi ––split-level 10 ––split-length 8' alias rpm='nice -n 15 rpm' alias make='nice -n 16 make' These aliases will become new commands the next time you login. If you can't wait, type each one at the command prompt so they will also be availble in your current login session. Learn these new commands and system administration will be easier. |