Join 3,433 readers in helping fund MetaFilter (Hide)


Looking for tips and resources for learning how to run a webhost on a linux virtual machine
January 24, 2007 10:20 AM   Subscribe

I’m planning on getting a linux virtual machine (something like linode) for webhosting, but I could use some tips and resources for getting started.

My only experience of administrating a linux server is through a control panel program (like cPanel) on a typical shared-host setup. My question therefore, is what do I need to know to:

1. Get my virtual machine set up with all the stuff needed for web hosting (installing/configuring apache, php, mysql, mail server, ftp, dns, security etc.), basically so its kitted out in a manner similar to the shared hosting service I'm familiar with.

2. Handle ongoing administration.

I’m looking for any good information; tips, links, tutorials, books, anything useful really.

Thanks!

(Distro-wise, I'm leaning toward Debian because I'm informed its fairly light and simple. Also, I've seen these questions, but they're not entirely useful. )
posted by MetaMonkey to Computers & Internet (5 answers total) 2 users marked this as a favorite
 
Debian is simple because many different software packages have been created for you and are easily available. It's easy not because it's easy, but because it changes only slowly and there are lots of other people using it, so help is easy to find.

So, Google.

"debian how to install packages"

"debian install apache2"

"debian install php5"

"debian install mysql"

SSH will almost certainly be installed already. Then you can try:

"debian configure apache2"

"debian configure mysql"
posted by jellicle at 10:48 AM on January 24, 2007


You can of course install a control panel type program on your Debian system — dtc is only an "apt-get install dtc" away for instance (not that I've ever used it...)
posted by pharm at 10:56 AM on January 24, 2007


Most of the good vhost web hosts will sell a 'Cpanel' service along with the vhosts. It's either included, optional, or costs extra depending on the host. Between CPanel and WHM, the 'superuser' side of CPanel, you should be able to do everything you do with your current webhost... without ever once having to shell in.

I personally manage *my* CentOS 4 server with the shell, but I've also got about seven years experience with redhat.
posted by SpecialK at 1:09 PM on January 24, 2007


I have to tell you if you're not actively reselling domains or completely unwilling to learn the first thing about server administration, cpanel is entirely more trouble than it's worth. I'm of the opinion that most of the one-size-fits-all web frontends are useless, but that's definitely only my opinion.

I can also happily ramble on about this stuff for hours days so I'll try to keep it brief-ish.

Debian is a very good choice. Redhat/centos is more well supported if you're a company, but for an individual I'd definitely recommend debian. On my personal linode I run ubuntu, which is debian wearing a different hat.

One of the verynicethings about going with Debian/ubuntu is that most if not all of the nitty gritty setup stuff is done for you. So, in your order:

installing/configuring apache: apt-get install apache2

php: apt-get install php

mysql: apt-get install mysql phpmyadmin (if you want)

mail server: somewhat of a different beast, it depends on how you want to handle it. As books have been written about this step, I'll just throw my $.02 in and say Postfix is probably your best bet and there are plenty of tutorials out there for more specifics. Email is hard.

ftp: Don't. Get filezilla and use SSH as your transport.

dns: Similar to email, this is a big topic. I'll mostly just cheat and foist you off to another howto but I will say that hosting both primary and secondary DNS servers on one machine is a Bad Idea. I use EveryDNS as a backup nameserver (4 actually) for my personal domains and the companies I admin for mostly outsource their DNS. It's not really something you want to do in-house unless you have a compelling need.

security etc. : Really this should have been #1 but I'll let you slide :) Broken record time, this is a big subject. Basically, if you login every week or so and apt-get update; apt-get upgrade you should be safe from some huge percentage of bugs. You can setup a cron job for this but it's always good to login and poke around every so often. I'd strongly recommend a firewall, Shorewall is well documented. Other security bits and bobs: don't ever, EVER login as root. Disable it in /etc/ssh/sshd_config. Do everything through sudo.

Gmail in profile if you'd like to chat off-site about any of this, or I'm happy to elaborate here.
posted by Skorgu at 1:36 PM on January 24, 2007 [2 favorites]


Much thanks for the help everybody. I'm starting to think that I may have been overthinking the matter a little, since y'all make it sound fairly straightforward. I should probably just take the plunge and work the rest out as I go.

Many thanks Skorgu for your offer of further assistence and detailed answer, I think you've told me pretty much what I need to know to get going. If I have any other little questions, I'll try to resist the temptation to email you ;)
posted by MetaMonkey at 8:54 AM on January 25, 2007


« Older I just accidentally ate part o...   |  One of the few benefits of smo... Newer »
This thread is closed to new comments.