torsdag 4 juni 2009

Getting DSL: Setting up a full webserver (part 2)

In order to have a linux-based server up and running, you need a checklist of items that you need. This guide is generic, which means it doesn't matter if you'll run a server or a desktop-type computer, it will work for both.

1) A computer to install DSL on.
2) A linux-distribution (aka dist) on a removable medium (f ex a CD, or a USB-drive)

I will assume you already have the computer. I will also assume you'll burn a CD.

Getting Damn Small Linux:
You can download DSL here.
You can find DSL's website for further information here.
You can find a list of download sites on their download-page, located here.

In order to get DSL, from their FTP, to a CD, do the following:
1) Download DSL. Links are supplied mere centimeters above this sentence.
2) Burn it onto a CD. Most likely you had a burning-program supplied when you bought your CD-burner. If you need help with installing a CD-burning program, I suggest you google for a guide. Most Linux dists are supplied in an .iso form, which means it's a one-file copy of a CD. Most CD-burning programs have an option to burn this image as it is, if you don't know how to do this, there are countless of guides about this. Try to google something in the lines of "burning iso with x", where x is the name of your CD-burning program.

When you have the image on the CD, by which I hope you didn't burn the .iso-file as it is through Windows built-in burning feature (read: when looking what's in your CD all you see is a single .iso file = big no-no), you are ready to go. Simply put the CD into your server-to-be, and start it. When you get to the screen where you can input a command, type "install" (without quotes) and press enter.

I suggest you partition your harddrive by selecting the 10th option at the following screen. This creates a 200Mb system-partition, where the system is installed, another 200Mb partition that acts as a swap (a dedicated partition for the Linux equivialent to the Windows "Virtual Memory"), and the third partition is where you can put all your stuff in. The nice part of Linux is that no matter how many partitions you have, the system will "behave" (as in, what you see) as if you only have one partition. No need to supply different paths for different partitions as in Windows, with the C:\programs, D:\setupfiles, or E:\mysql, they'll all be accecible without the initial X:.

When you have partitioned your harddrive(s), by saving the settings in the partition-program and then exiting, you are returned to the previous list of options. This time, choose to do the hard drive install. During the install, you will be asked to use [g]rub or [l]ilo as bootloaders. From what I've gathered, Grub is the hands-down favourite, and is what I use myself. A bootloader is the nifty little program that displays a list of installed Operating Systems on the computer, and allows you to select what OS to load. It also allows you to use different type of "boot-codes" of the same OS, in case you want to load your Linux with different types of settings. One example can be if you want to get into the "Windows" and work on your programming, or if you simply want to boot the server as a server in CLI (Command Line Interface, like DOS for Windows). But this is extra features you don't have to know anything about in order to simply use Linux as a server.

When the install is done, you'll be asked to supply a password for "root", and for "dsl". "root" is the Administrator-account in DSL, and "dsl" is the standard-account you normally boot into. Why not only use "root" you ask? It's for security. Most Windows users are spoiled with logging in with all privilegies to their computer, but if you're going to run a server, you actually won't need more privilegies than you need. And there's no need to risk a potential attack which can render your system useless if they can't render it useless.

When it's all setup, you'll boot into the "Windows" (known as X-Windows), and voila, you're now a proud user of Damn Small Linux. If you're really into it, I suggest you take a look at their wiki. They list alot of answers and tutorials on most FAQ's, which is a very, very good spot to start at if you want to familiarize yourself with your new server-OS. The wiki can be found here.

Feel free to comment or ask questions. I'll do my best to answer them all.