I want to learn setting up and maintaining a Linux server.
February 9, 2006 1:46 PM   Subscribe

I want to learn setting up and maintaining a Linux server.

I am thinking of setting up a Linux server for fun and to get more intimate with Linux.

I imagine the server hosting a website (probably a Wordpress blog or something -- nothing fancy) on my DSL using Apache (with PHP for scripting and MySQL for database purposes) and managing email with what... Postfix?

1) What would be the minimum hardware requirements for this?

2) What distro should I use? (I am currently running SUSE 10 with Gnome on my desktop box.)

3) What firewall should I use? Should I be paranoid about security?

4) Can you think of anything else I might have fun having the server do if I'm setting it up anyway? (I'm thinking FTP, Bittorrent tracker, ...)

5) Any other good advice?

I am kind of a Linux newbie although I have been using Linux as my primary desktop OS for a while now.
posted by sveskemus to Computers & Internet (15 answers total) 1 user marked this as a favorite
 
If I were you I'd get a linode. That's what I did after asking this question. It's a great way to get a modern system setup without dealing with the hardware or even the distro. $18/mo for a root shell on a machine with a really fast internet connection, and my own IP.

You can install Debian or several other distros right from their web administrator, and then set everything else up via SSH.

Bonus is that if you ever create a moderately popular website you don't have to worry about dealing with moving or fixing your box if you ever move or it breaks (truly pains in the ass, in my experience)
posted by delmoi at 1:54 PM on February 9, 2006


For my linode, the default install of debian was only 50mb or so (thats why I chose it), and everything else I installed with apt-get.
posted by delmoi at 1:55 PM on February 9, 2006


1) none.
2) You should use SUSE 10 with Gnome. (Since you already are familiar with it, there's no good reason to change. Why add learning a new distro to your learning curve?)
3) Most Linux distros come with most services switched off these days. Also, you are likely to be using a home NAT router of some sort, which inherently limits the incoming connections to only those which you forward to the new server. There is very little need for specialized, extra firewalls for Linux machine; just be aware of what is running on the machine.
4) You can start with just your desktop machine - forward a port from the outside world to your machine, run a service of some sort on that port, and boom, now you're running a server. YOU think about things you find interesting, and play around setting them up - there's no penalty for failure except your time spent. Apache is easy for basic configurations, can be challenging for advanced ones. FTP (use vsftpd) is easy, though some FTP servers are insecure. SSH is easy. Telnet is easy. Finger is easy. NTP is easy. SUSE should provide packages for all of these...
posted by jellicle at 2:02 PM on February 9, 2006


There are some great articles on howtoforge.com I've listed below. This will at least get you started. Learn VIM, but in the meantime PICO is a good simple editor for linux newbies. Once you start using a package manger like apt you'll wonder why you ever messed with anything else.

Perfect Ubuntu Setup

Perfect Debian Setup

Perfect Fedora Setup
posted by blueplasticfish at 2:09 PM on February 9, 2006 [1 favorite]


I'd go with what jellicle says: just use your SuSe desktop as a server. Get a dedicated machine later, if you want.

Email: I prefer exim.

Firewall: you really only have once choice: the packet filter built into the kernel (I forget if it's still called iptables). Learn that. Sure, there are wrappers around the system calls, but you might as well learn the packet filter. (I did it with a bash script years ago back when I was still a Linux newb -- it ain't that hard).

Checking kernel driver support on new hardware is a MUST, as odinsdream suggests.

You should be mildly paranoid about security as a matter of course. Use something like logcheck, tripwire, and chkrootkit regularly.

Have fun. Note, that while setting up such a server can be a great learning resource, the reality is that if your node ever becomes popular, you're going to need hosting.

So something like what delmoi mentioned should be seriously considered. (The electrical cost of running your own machine 24/7 alone takes a considerable chunk out of the cost of hosting).
posted by teece at 2:18 PM on February 9, 2006


1) What would be the minimum hardware requirements for this?

Maybe a P2 166, and maybe 64 megs of ram if you wanted it to run ok, and boot-up relatively quick. Small linux webservers can run on almost anything (I used to run a small one off an Audrey when I was hacking around with that thing...)

2) What distro should I use? (I am currently running SUSE 10 with Gnome on my desktop box.)

Eh, I'm partial to Red Hat, but it really doesn't matter. Maybe Mandrake, er, Mandriva Linux? Really anything that will run Apache and you feel comfortable playing around with...

3) What firewall should I use? Should I be paranoid about security?

If you've got a hardware router, just use that. I wouldn't be too concerned about security if you're just beginning to try and learn the LAMP platform, and you're not keeping anything sensitive on the machine.

4) Can you think of anything else I might have fun having the server do if I'm setting it up anyway? (I'm thinking FTP, Bittorrent tracker, ...)

I learned a lot of linux webserver/networking basics by writing my own web interface to control my mp3 collection remotely through a web-browser or WAP enabled phone (similar to Andromeda, but more hacked together...)

It was fun...
posted by SweetJesus at 2:26 PM on February 9, 2006


Why on earth would you choose Linux over a BSD?

OpenBSD has had one security hole in its default installation over the past umpteen years. FreeBSD is reasonably secure by default, too.

I don't think the same can be said of Linux.

Also, the BSDs are actually well-managed, well-planned, cohesive products. Their directory structures are logical and consistent. In contrast, Linux has a hodge-podge of directories and silliness.

IMO, Linux is a mistake.
posted by five fresh fish at 3:24 PM on February 9, 2006


Yeah... postfix is probably what you want for a mailserver.

... but as for the other stuff, you get your choice. Personally, I really dig running debian on my servers just because it's so darn easy to keep it up to date. There are (obviously) many many people with other opinions. Frankly, there ain't nothing wrong at all with SuSE.

Setting up a server is probably the best way to get to know linux... and really, once you get the hang of it, it's not too bad at all. Choose a project... by the time you get it all up and running you'll find that you pretty much know the system.

Also good, depending on where you live, is joining the local linux user's group. Meetings are... well, pretty nerdy... but the mailing list might prove to be a valuable resource if you have little questions and problems.
posted by ph00dz at 5:31 PM on February 9, 2006


Any distro with apt will make you very happy. Yum is trying to be apt for redhat, and is pretty good, but I still prefer apt.

I run Fedora at work, but have been running a LAMP setup (and my mail server, and ftp space for friends) using Debian on a PIII 500 dell desktop over DSL for about 4 years without issue.

That said, I would heartily recommend Knoppix. Fully functioning distro that runs off of the CD, and the amount of hardware supported out of the box is insane. If you like it, you can install it to the hard drive. Then you basically have a Debian style machine.

The machine can act as its own firewall using ipchains, which I think is turned by default in Knoppix.
posted by team lowkey at 5:54 PM on February 9, 2006


Oh, wait, I meant I think iptables is on by default. ipchains isn't used so much any more. Pretty much the same thing.
posted by team lowkey at 6:07 PM on February 9, 2006


When I started out, a learned the most on Slackware, which basically forced me to setup and update everything by hand. I don't really have that kind of time these days though. But really, you already run SuSe? Why not just keep with it? If you learn another distro, you'll probably just switch too it on your main as well. Go with SuSe since it's already there. If you want a change, go with Debian or Gentoo.

While I've been using Linux for nearly a decade, I never really left the newbie stage. I've tried Slackware, SuSe, Mandrake, Red Hat, Debian, and Gentoo. I like Gentoo the most, it's totally me to compile everything and get the most effecient system possible. I like emerge alot better then apt. I got a bit confused with apt as to what was going on and how to get things. And with Gentoo...you don't have to compile everything. I don't bother with Open Office and stuff like that anymore. Gentoo is all about choices, which I like.

I can't offer any firewall advice or security tips. But you really don't need much in the way of hardware. I used to run a small webserver / fileserver on a P133 with 24M of RAM. It would even run a half-life game server, but it would be super slow with more then 4 players. I've always installed Linux on older computers, and have never had any hardware compatibility issues. My current is a Dual P3-500 Xeon system. Which was cool many years ago, but it's a piece of junk these days.
posted by Phynix at 6:14 PM on February 9, 2006


Why on earth would you choose Linux over a BSD?

Maybe he has a mainframe he wants to run it on.
posted by delmoi at 9:41 PM on February 9, 2006


Response by poster: Thanks for all your comments.

I think I'll buy a cheap used computer and use it as a dedicated server so that I can fsck it up (look, mommy, I'm a sysadmin!) and not have to worry about messing up the data or configuration on my main box.

That way I can also try some different distros and see what suits me the best.

As to why choose Linux over BSD well I have no idea. I never really considered BSD to be honest. I will look into it.

Thanks again, and please keep commenting if anything comes to you.
posted by sveskemus at 10:12 PM on February 9, 2006


Another good word for BSD, OpenBSD can be a bit tough to install if you don't know what you are doing but FreeBSD is a joy, and the ports and packages make software installation very easy.
posted by hardcode at 1:13 AM on February 10, 2006


SweetJesus writes "Maybe a P2 166, and maybe 64 megs of ram"

Yep. Our lab server is an old Dell, with almost those exact specs. Works fine. On a slightly newer P3 500mhz, it flies.

If you really want to learn Linux then I'd say Slackware. It's really lightweight if you only want command line access. The new slackpkg tool does a great job of upgrading things. I used RedHat 8 and 9 but wish in retrospect that I had started with Slack. I compiled my first kernel and built my first packages in Slack 10... until I started using it, I was pretty GUI-dependent, but over the last few years have moved to doing all of my server admin via SSH/PuTTY.

If you want an old computer to muck with ask your friends or check a University salvage/resale lot. You can usually pick one up for free or for dirt cheap if you're willing to put a bit of time into fixing some minor issues. Heck, my office and lab servers were free pickups from University salvage, and the three towers rotting in my basement were acquired free from friends and family for parts. The only computers I actually paid for are my laptop and home system.
posted by caution live frogs at 6:49 AM on February 10, 2006


« Older Help me, I've Broken Out   |   Why does my kitten suck at life? Newer »
This thread is closed to new comments.