Learning Linux in the Fast Lane

I was recently at a week long “boot camp” for a flavor of VoIP software that ran on a version of Solaris. Most of the people in the class were employees from many large Telco companies, some from different parts of the world as far away as . Only a few had a Systems Admin level of UNIX know-how. Later, I found out that the guy next to me was staying at the same hotel. After three days of mind numbing training, we decided to hit the hotel bar and kill a few more brain cells.

He asked if I knew a good way to learn UNIX fast and what flavor should he learn first. Since we were in training for software running on Solaris, I recommended that he try learning Solaris since it was immediately relevant to his job. Furthermore, all the distributions of both Linux and UNIX had a core concept of a base kernel code built on a UNIX file structure with very similar workings, but each used and handled the core and in some cases the file system as well, in a unique way. If he was working at a Redhat house and he liked his job, I would have told him to learn Redhat. Then he asked me how I learned about UNIX so I told him about the first Linux box I’d ever run about ten years ago.

It was a porn server. Quite honestly, that is the reason why I learned the hard basics of system administration so fast. It was not a commercial porn server so there was no money to be made with it. Starting out as just a place to host web and mail domains for me and my buddies, it didn’t take long to turn into something else. Once they figured out the power of having a server on the internet, more domains got hosted and uploads filled the hard drives. Yes, I said drives. Eventually, it became a real pain in the neck, but at the same time it made it much more fun than just babysitting my buddies’ files. They began to collude like a group of corporate users with a vested interest in keeping “the data” safe. This provided a little money to play with though most of it came from me.

The first thing I learned, of course, was the installation process. I chose a flavor of Linux called Slackware because it sounded cool. I had broken into the field as a Visual Basic programmer working with backend databases, but this was no Microsoft install. Even though all the software was free, it required online research into basic UNIX file structure, partitioning, and boot sectors. I learned that most (but not all) configuration files were stored in /etc, most (but not all) applications ran from /usr/local/bin and the hardware devices were even referenced as files in /dev. I read about keeping /var on its own partition because logs and other files which grew and shrank could potentially take the system down if it filled the disk and was on the same partition as the “root” (/) directory. Then came the realization that the Slackware Distribution wasn’t made for slackers, it was made by slackers. Any applications I wanted to install and run had to be compiled into an executable binary. Sometimes different compilers had to be installed first. Most of this I figured out just by reading the instructions and REAME files for the software I was installing. I found the Linux HOW-TO pages online that further expanded my knowledge of bind, sendmail and apache. Nowadays, most software comes in packaged binaries for the better known flavors of “nix” making it easier to get your software up and running.

When choosing a flavor of UNIX to work with, you might want to try several distributions before settling on the right one. You want to make sure the version you’re working with is suitable for your purpose. Workstation users generally like to have Graphic User Interface with applications at their fingertips. Server configurations are generally stripped down to run without a GUI environment and in some cases, “headless” (without a monitor) in order to conserve the system resources for functionality over ease of management. Are you going to be running a workstation that will spend most of its time crunching numbers or rendering high resolution graphics applications? Maybe you want to start just like I did with a file server on the internet providing the most basic of services like DNS, web hosting and email for more than one domain. Maybe you want to run a cluster of machines to crunch data for SETI. Whatever the application, do the research and choose the distribution and configuration that best suits these needs. In fact, it makes a tremendous difference in both performance and ease of use/maintenance when you run your system with no GUI environment. The command line can be a cold and ruthless teacher to the user who is accustomed to pointing and clicking to get what they want. Alternatively, some of the many GUI’s are really nice to look at (I really liked enlightenment) and the system management tools are far more intuitive than a command prompt with a blinking cursor. Keep this in mind when choosing how to set up your system as it could mean hours spent navigating the arcane places application configurations are stored.

Another great resource is built right in. Once everything was installed and running, I learned that the “man pages” were my new best friend. Typing “man syslogd” told me most of what I needed to know about the logfiles and the daemon that controls them. Typing “man tcsh” taught me to customize my shell environment. There is even a “man man” to teach you about man pages in general. Most of the built in commands in any distribution have a “man page” that you can call up by simply typing man command at the shell prompt.

Next was the maintenance and upkeep of my system. Since my main motivation for learning all this was to get my band’s website on the internet, I didn’t really care about what my friends were doing with their accounts. I was already very selective of who I gave them out to while still learning some basic admin tasks like shell scripting and cron jobs. Just as I was getting the hang of that, I noticed the system having performance and disk space issues using commands like “top”,”du” and “df -kh”. I was constantly trimming the data “fat” and learning to rotate logs until I just couldn’t handle the growth. I started checking how much space the users’ home directories were taking up. Most of the eaten space was there. So I asked some of my buddies what was it that was taking up so much space that they had to keep on my server and couldn’t keep on their own computer. The answer didn’t shock me but it clarified the situation. They were storing porn pictures and video clips. Most were accessing it from their home computers via the web and some were just continually uploading their favorites. Many files, especially some of the larger ones, were popular favorites duplicated several times over. This constant hammering of uploading and downloading drove up the CPU load on my small 486 with 32MB of RAM.

Thus, came the Age of User Management and Data Availability. I learned about quotas and restrictive web access. When the users started reaching their quotas, they decided to pool their funds to increase the server’s resources. Bigger hard disks and more RAM entered the equation. Things were looking good. That is, until some of my more savvy pals decided to hack root. Looking back, I’m glad it was them and not some of the other would be intruders that came later. No one wanted some right wing, fundie cracker ruining their hard found data. Now it was time to learn about data security and hardening the server against attacks and exploits. I learned the importance of patching software and keeping your versions up to date. Getting treated to a new type exploit every so often kept me on my toes. I began subscribing to software and security lists like BUGTRAQ at securityfocus.com, just to stay up on current exploit trends and new patches, all in the name of keeping the “data” secure and available to the users. With these concepts under my belt, I began to learn about other more difficult flavors of UNIX such as NetBSD and Solaris. While both are built on the basic concept of a core kernel, each has a unique personality all its own. Any questions I had about the discrepancies and differences, I literally clacked into Google to get my answers and still do to this day.

On that note, I take great pleasure in saying goodbye to the world of Windows administration and support. Ten years ago, I had no idea that my hobby would be my new career but I’m sure glad it turned out that way.

Leave a Reply

Your email address will not be published. Required fields are marked *


+ 9 = sixteen