VPS (almost-)virgin making plans

Hi all,

I'm liking the set up and community here at Linode, and I'm thinking I'll set up my first proper VPS here at the UK data centre. (I did sign up at another VPS provider which was recommended to me by a friend, but it doesn't have the disk imaging/distro features that Linode has, which should be handy for me.)

I was hoping for some general guidance at this stage. I use Ubuntu for my web design/build work, but I'm no expert in Linux. I've got a test web server set up on the box I use as my LAN "server" using XAMPP, and know setting up a proper web server will be new territory for me, but I'm hoping the guides will get me through.

What I want

1. Web server with PHP, MySQL, URL rewriting (need to host Magento, Wordpress and other PHP software)

2. Ruby on Rails (solely to run Redmine, at least at this time)

3. FUSE to make updating my data files easy

3. Possibly the ability to use Python in the future

4. Possibly a Left4Dead 2 server that could occasionally be used by a small group of friends (not a priority)

My questions

Bearing in mind I usually use Ubuntu, what distro would you recommend? I'm no command line wizard and am more used to WHM/cPanel, but am getting more used to tinkering and am usually able to follow instructions from a guide/tutorial. A friend of mine highly recommends CentOS for servers. I'm wondering if I stick with a Debian-derived distro whether or not it may as well be Debian itself rather than Ubuntu.

Will Ubuntu 10.04 LTS be an option soon after it's released?

Should I consider using something other than Apache?

I understand that upgrading the VPS is easy so will probably start with a 360.

Many thanks.

14 Replies

As long as you stick to well-known Linux distributions, the choice of a distro is largely a matter of personal preference and specific requirements. I haven't seen any evidence that CentOS is "generally better" than Debian or vice versa, although some third-party tools such as cPanel do seem to prefer CentOS. If you don't need proprietary control panels and you are familiar with Ubuntu, there's no reason to switch to some other distribution just because someone says it's better. (If you feel like learning another distro, that's another matter. Go ahead.)

You can either upgrade your Ubuntu yourself (see instructions on Ubuntu.com) or wait for Linode to release a 10.04 disk image. It usually doesn't take that long; I've seen new Ubuntu images become available less than 24 hours after the official release. But keep in mind that Ubuntu tends to ship with quite a few bugs initially, due in part to its tight release schedule. Some people wait a few weeks after each new release, to allow the most annoying bugs to be ironed out. Debian usually doesn't have that problem.

Linode distribution stats: http://www.linode.com/about/

Start with Apache, there's nothing wrong with it as long as you keep an eye on MaxClients. You can get more community support for Apache than for any other web server out there. Rewriting is trivial, just stick an .htaccess file anywhere you want. Most tutorials for Rails and Django also assume Apache, so it's trivial to get help in that area as well. Once you learn how Apache works and your site grows to a point where a lightweight web server would help, lighttpd and nginx are just a simple apt-get away.

Thanks for the helpful reply.

@hybinet:

Once you learn how Apache works and your site grows to a point where a lightweight web server would help, lighttpd and nginx are just a simple apt-get away.

That sounds like the way forward for me.

What kind of impact would running Apache and one of those webservers have on system requirements? Could it be possible to run two on a 360 Linode, when one of them is being used for Ruby on Rails?

From experience, it's usually easier to just keep using Apache because of url rewriting issues (and/or .htaccess rules, etc.) and that most applications are written expecting an Apache installation.

I use nginx and I love it. But occasionally, I end up wanting to install something I see and it breaks because of the url rewriting - that is, I either Google for a ready solution and if none (satisfactory), I have to sit down and write them myself. It's a pain, occasionally.

RoR is a pain, because you have to run another server though Redmine is cool. I never tried installing it before but I remember my nightmare days with trac. Give mtrack a try: http://bitbucket.org/wez/mtrack/wiki/Home

I use Ubuntu and I like it. It's simple enough for upgrades and I don't have to tackle with it all that much except the occasional system upgrades.

Just my 2 cents~

@melz:

From experience […]

Apache it is for general stuff, then. :)

@melz:

RoR is a pain, because you have to run another server […]

Can PHP and RoR not share a single Apache webserver?

@melz:

Give mtrack a try

Thanks - hadn't seen mtrack before, and it looks good. I'm still thinking I'd like to try Redmine, though.

@melz:

I use Ubuntu and I like it. It's simple enough for upgrades and I don't have to tackle with it all that much except the occasional system upgrades.

As I understand things, Debian would be similar/the same to use from the command line but less cutting edge/more stable. Is that about right, in a generalising kind of way?

@BrightEyesDavid:

What kind of impact would running Apache and one of those webservers have on system requirements? Could it be possible to run two on a 360 Linode, when one of them is being used for Ruby on Rails?

Neither lighttpd nor nginx should use more than 10-20MB of memory when properly configured, so it's perfectly okay to run one of those side-by-side with Apache. But remember, only one of them can listen on port 80 at a time. You can add an IP ($1/mo) and bind each web server to each IP, or use one of them as a backend to another. A common way to run both nginx and Apache on a single IP is to use nginx as a reverse proxy in front of Apache. Any domain that needs .htaccess rewrite rules (mostly PHP, I guess) would be delegated to Apache; other domains (static files or Rails) would be served by nginx. This method also has the benefit that it's easy to transition from a pure-Apache setup to this one.

Lets see….Apache, PHP, MySQL, a handful of PHP scripts, Wordpress, Magento, RoR, FUSE, Python, and a GameServer, oh and probably another webengine, all in a 360.

Did I leave anything out. Perhaps a control panel, maybe some backup scripts, streaming video, maybe a chatbox or three, better throw in a remote desktop GUI just to be safe.

With such a "light" load, maybe you could find someone to share a 360 with you to cut back on expenses.

Personally, I find it WAY easier to start big, then size DOWN as I find out exactly how much resources I actually need under load and after I've done my best in tweaking all my config's.

@hybinet:

A common way to run both nginx and Apache on a single IP is to use nginx as a reverse proxy in front of Apache. Any domain that needs .htaccess rewrite rules (mostly PHP, I guess) would be delegated to Apache; other domains (static files or Rails) would be served by nginx. This method also has the benefit that it's easy to transition from a pure-Apache setup to this one.
Many thanks - will look into that when the time comes.

@vonskippy:

Lets see….Apache, PHP, MySQL, a handful of PHP scripts, Wordpress, Magento, RoR, FUSE, Python, and a GameServer, oh and probably another webengine, all in a 360.

Did I leave anything out. Perhaps a control panel, maybe some backup scripts, streaming video, maybe a chatbox or three, better throw in a remote desktop GUI just to be safe.

With such a "light" load, maybe you could find someone to share a 360 with you to cut back on expenses.
I'm not familiar with exactly what requirements different services tend to need, hence my posting here for advice. Sorry if I offended you by giving the impression I'm expecting everything for next to nothing.

@vonskippy:

Personally, I find it WAY easier to start big, then size DOWN as I find out exactly how much resources I actually need under load and after I've done my best in tweaking all my config's.
Thanks for the tip. I reckon I'll be starting off slowly anyway.

@BrightEyesDavid:

As I understand things, Debian would be similar/the same to use from the command line but less cutting edge/more stable. Is that about right, in a generalising kind of way?
It's probably a bit over-generalized, but it's a commonly quoted summary, which likely still has a bit of accuracy at its core. It does depend heavily on whether you are choosing the latest Ubuntu release or its LTS version, and for Debian if you stick strictly with stable or not. But yes, the packaging systems match between the two so most tools for managing the system are common.

Debian 4 stable was "stuck" for quite a long time, and if you stayed only with stable you could be quite a bit behind Ubuntu in terms of package versions, but when they released 5.0, they actually jumped ahead of Ubuntu LTS for may packages, for example, but since then the mainline Ubuntu is probably ahead a bit.

It is true that Ubuntu aims for timed releases, and takes packages as of that point (often for those still in Debian testing) when packaging. So at the point of release Ubuntu may be riskier, even for LTS. But LTS moves much more slowly after that, and for 8.04 LTS, for example, out for several years now, and still three more years of support (for the server version), I think it's as stable as Debian 5 stable. Also, with Debian you may find yourself wanting something from testing in order to get a desired feature and once you start mixing and matching you increase risks of issues. So I find that nowadays it's hardly clear cut.

For myself, I was (and am) using Ubuntu 8.04 LTS on my servers and decided to compare against Debian 5 stable recently (figuring I hardly needed bleeding edge for my stuff, not that LTS is bleeding edge either). After some experimentation, I stuck with Ubuntu LTS. Interestingly, what did it for me was the management of Ubuntu backports. While the vast majority of stuff I use is pure LTS, for a few packages, I need something a bit more recent, and selectively pull those in from backports. Being able to pull a more recent package in a way that minimizes the ancillary packages that also need updating is important in such cases.

I had a secondary item that I'm likely to be using Ubuntu at remote locations where much more current drivers (including some from restricted) are needed, so it's a little less of a hurdle keeping everything Ubuntu than mixing with Debian on the servers.

Debian has backports too, but it "feels" a little less mainstream, and best I worked out, it's primarily a single backport repository aimed at stable - and there's a tough discontinuity when stable changes. Ubuntu maintains clear, multiple, backport repositories per release that appear easier to maintain across an upgrade.

Of course, someone more familiar with Debian backports will probably correct me, but in the end there's more similarly between the two distributions than not, and it's easy enough to try both and see which "fits" better. If you keep your partitioning clean (in my case, all the core operational stuff aside from a few configs in /etc reside beneath /srv) you can actually boot alternately between two root disk images for comparison or testing.

– David

@BrightEyesDavid:

Sorry if I offended you by giving the impression I'm expecting everything for next to nothing.
No worries - I just wanted to express my doubt at being able to cram all those apps & services into a 360.

Although there are many ways to optimize your server - no matter how well you can do that (and it's a mix of science and art in my opinion) there is a hard limit to how much performance you can wring out of a finite set of resources.

@db3l:

It's probably a bit over-generalized, but it's a commonly quoted summary, which likely still has a bit of accuracy at its core. It does depend heavily on whether you are choosing the latest Ubuntu release or its LTS version, and for Debian if you stick strictly with stable or not. But yes, the packaging systems match between the two so most tools for managing the system are common.

[…]

Very interesting insights - thanks.

@vonskippy:

No worries - I just wanted to express my doubt at being able to cram all those apps & services into a 360.

Although there are many ways to optimize your server - no matter how well you can do that (and it's a mix of science and art in my opinion) there is a hard limit to how much performance you can wring out of a finite set of resources.

Appreciate the heads up. I'm very new to this so need all the advice I can get! :)

Centos uses old but reliable, time-tested packages. Mysql 5.0 and php 5.1 for instance. http://distrowatch.com/table.php?distribution=centos

Ubuntu updates every six months with upgraded packages. Ubuntu has Mysql 5.1 and 10.04 will have php 5.3 in their repos. http://distrowatch.com/table.php?distribution=ubuntu

If you're the kind that likes to use the latest and greatest for possible optimizations and speed, then Ubuntu. If you don't care about new features and want it to be backed with years of production time, go with Centos.

I recently upgraded my Ubuntu 9.10 server from php 5.2.11 to php 5.3.2 and I've had to patch several Drupal contrib modules to make them compliant. It can be a little extra work to be on the cutting edge. (but a nice integrated php-fpm package is worth it.)

@brianmercer:

Ubuntu updates every six months with upgraded packages. Ubuntu has Mysql 5.1 and 10.04 will have php 5.3 in their repos. http://distrowatch.com/table.php?distribution=ubuntu
Note that this is only if you keep tracking the main releases. Sticking with Ubuntu LTS won't change package versions that rapidly, though it does get regular bug fixes and security updates. Of course, when LTS is initially released it will have packages current as of that point in time.

In the current (well, prior now I guess since 10.04 is just out) 8.04 Ubuntu LTS, mysql is 5.0.51 and php is 5.2.4, and they won't change major versions during the next 2 years (3 for server) of support.

– David

About the game server, if you want to be able to run it with anything else running, you NEED a 720. Otherwise, you would have to shut everything off, except maybe ssh and syslogd to prevent it from swapping and killing the left 4 dead 2 server. I run one on my 720, along with a basically idle apache2 and have about 100mB ram to spare.

@melz:

RoR is a pain, because you have to run another server

This is categorically incorrect. You can run RoR on Apache happily.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct