Toolkit & Habits for Linux Network & System Administration [closed]

1

monitor business critical processes [ eg - is database running and responding to simple queries ], basic parameters of operating system [ free disk space, load average ]. you can use nagios or zabbix for instance.

2

gather statistics to establish some baselines. in the future this will be useful for capacity planning. you can use munin, zabbix, cacti etc.

3

run scheduled automatic backups, store some of them offline, offsite. monitor if they succeeded, from time to time check manually if you can recover critical data. you might want to use backupninja to orchestrate them or Zmanda, but there are much more useful tools..

4

document. for your own good. dont think that lack of documentation increases your job security. first one who will suffer because of lack of it is you, you'll probably forget things quite quickly.

5

from other random things:

learn some scripting language - maybe you know one aldready? perl/python/php can be used for automating tasks and in many cases are better suited than bash for more complicated tasks

learn your tools - it's endless list... ssh comes into mind probably first. check out this and that.


The Practice of System and Network Administration, by Limoncelli, et al, is where you should start. Technologies will come and go (and can be easily Googled as required), but the information in that book is timeless (and priceless).


A Few Basic Tools To Start With

Google. No seriously. Google is a system administrator's dream come true. There is no finer way to harness the vast amount of information on the internet. And don't limit yourself to just searching for "linux for beginners"; if you have a specific task you're trying to accomplish, Google for that specific thing. You'll often find way more info than you need, and as a beginner a lot of it will seem like another language, but learning through doing is a good way to pick things up quickly.

Tab-completion. The Linux command line allows for tab-completion of all commands, directory trees, directory names, and file names.

Man pages. Every command, and many system config files (/etc/fstab, /etc resolv.conf, etc.) have Man pages. Just type "man command_name" or "man file_name" to see if what you're looking for has one. Oh and "q" exits a man page.

SSH. One of the best ways to access a Linux system. Probably the best way if you don't have physical access to the system.

Screen. Screen is a fantastic little application that lets you turn one terminal into many, lets you get things out of your way/into the background, and lets you leaves things running so that you can come back to them later.

Nano. You mentioned above that you already use this, but I just thought I'd throw in my two cents and say that I agree. Vi and Vim and all those are fine and all, but it's the simplicity of Nano that I love. It's like the Notepad of the Linux world.

Find and Grep. Find is great for searching for files, Grep is great for searching in files. Both of them can be used in very simple ways, and both of them can be used in very complex ways, but both are quite useful either way.

Sudo. Lets you act like root, without being root. Very useful.

Plus a few other tools that I will mention in the context of the next section...

The Kinds Of Things You Need To Do Regularly

Monitor your system. Monitor your disk usage (df is a useful command, and du as well for specific directories), monitor your running processes and tasks (via the ps command and top commands), monitor the users logged into your systems (the users and who commands will tell you this), and monitor your network usage (apps like cacti are good for that). If you happen to have access to an X Windows environment, I always found GKrellM to be a very useful all-in-one system monitoring tool.

Backups. For the love of Tux, backups. Backup config files, backup home directories, backup application data. Backups. Even if all you're doing is straightup copying the data from the server to a CIFS/NFS share on another box and an external harddrive. And yes, you should keep two copies of each backup, and never on the same media/system. Think of it as backups of your backups.

Check your backups. Routinely check to make sure you can restore data from your backups onto your systems. Empty/corrupt/incomplete backups are as useless as the day is long.

Use your log files. Dmesg, /var/log/messages, and really pretty much anything in /var/log period. If something isn't working right and you don't know why, the logs may not have the answer but they can definitely help you find it. And the logs and directories in /var/log are sensibly named so finding the right log shouldn't be hard. You won't need to constantly monitor every log file, but keeping an eye on them will help you keep your system healthy and secure.

Keep your system updated. Don't let your software go for months and months without being updated, because it can result in a lot of headaches and breaking things when config file syntax or dependencies change. Different distros have different update programs (apt-get, yum, etc.) but whichever one you use, learn it and use it regularly.

Keep your system secure. Use things like iptables, PAM, hosts.allow/hosts.deny and similar to prevent unwanted access to and use of your system.

Never stop learning. To continue with something I said earlier (learning through doing), something you should look into is virtual machines. Download VirtualBox (or if you have VMWare licenses even better) and make yourself a Linux virtual machine. You can pick any distro you want really but obviously it probably makes the most sense to go with one you're using in your environment. Play around in the VM.. use it like a sandbox. Set stuff up, break things, investigate, learn. The beauty of a sandbox VM is that it doesn't matter what happens to it. If you totally hose it, just make a new one. Or keep a backup copy of the original after you get it setup, and reuse that whenever you need to.

As some of the other posts in this thread have mentioned and alluded to, these lists could really be nearly infinite, but hopefully this gets you off to a good start.