A million questions part 1

Aloha folks,

I am pondering the move from a shared reseller environment to VPS and Linode seems the most likely choice. I have plenty of experience from the html side, but little real experience with linux/server administration … but am a pretty good learner. I had some newbie questions and would appreciate feedback, recommendations from folks currently on Linode. I have seen some similar questions posted, but usually for other website needs, so I hope I am not duplicating too much.

The websites to be hosted are all pretty low traffic, the busiest sees only a couple hundred visitors per day. While the hope is that this will increase with time, the apparent ease of upgrading the package doesn't seem to make that an issue. The current crop of websites is (all 5 are separate domains):

Wordpress (single user install)

Wordpress (multi-user install, set-up for sub-domains, currently only 5 blogs/users)

Three html/php/MySQL websites (php used primarily for text inserts and a couple of database calls for product data per page)

One of the html/php/MySQL uses SSL, none of the others do.

First I am wondering about email inbound/outbound. I have explored the web a bit and get conflicting views as to difficulty of installing and maintaining, but what about server resources ? Will having an email server onboard require jumping up a notch in memory ? Or is outsourcing the best path using something like Google ?

If email is outsourced, but we need sendmail capability for forms on the website and newsletters via PHPList, does that again require a full email server package or can I get a send only set-up ? One of the forms uses GnuGP for encrypting the data sent via email.

Linux distros and servers … our current host package is CentOS/Apache. Based on our needs above, will one of the lower resource usage servers like nginx, lighttp or litespeed work or will replacing the htaccess commands (WP rewrites and apache handlers) be a royal pain for a noob like me ? Is there any advantage of CentOS or Ubuntu or ?? that would make one a better choice ?

Will a Linode 512 fly for us ?

Thanks for any help.

Tom

ps just kidding about 1 million questions … probably will only end up being about 850K. :wink:

8 Replies

I'd go with the 512, as you've stated, upgrading if you need to is very easy.

Apache, properly tuned, is not the evil resource eating monster that some people tout it as. I'd recommend following the guide in the Linode Library to setup Apache with mpm-worker and php-cgi, and use a reasonable apache.conf, and you'll be fine.

For email, Google is your friend. It's very simple, lets you outsource something that would be very difficult for you, and it's free. I do it myself and have no complaints.

It's easy to setup send-only exim, just follow the guide in the Library.

I personally run Ubuntu 10.10, and have no complaints. Ubuntu has the benefit of a huge community, so most noob problems have been asked and solved a million times, and an answer is a google search away. If super high stability is a must, I might lean towards Ubuntu 10.04 LTS, or even Debian 5, but I've never had any issues stability-wise with 10.10

Keep in mind that I'm a fan of Ubuntu/Debian and their variants, so if you roll a Centos Linode and it works for you, go for it. Distros these days, for the most part, are a matter of preference.

I agree with akerl on all points, however I would recommend ubuntu 10.04 lts since it has a 5 year support period which saves upgrading every 18 months.

Also check that your apps are php5.3 compatible since 10.04+ use php 5.3 if you need lower either go for debian lenny or ubuntu 8.04lts.

Thanks for the replies. Guess I may well start easy using Apache instead of one of the others for simplicity and easy access to more online info.

akerl …. you mentioned "properly tuned" … any resources or HowTos you can point me to with tuning instructions/explanations for total noobs.

obs … no worries on the php5.3 aspect, our in-house php code is very mickey mouse, simple page component includes (pseudo-templating) and basic database queries/echo results … and I assume the the folks at WP will keep their code up-to-date.

Basically, the first step is using mpm-worker instead of prefork. This requires setting up php-cgi instead of just installing mod_php, but dramatically decreases the load on your server. This link has guides for installing such a setup on a variety of linux distros.

The second step is tweaking your apache2.conf file. It's located in /etc/apache2/, and it contains the basic settings for your server. If you find the section, those are the values you want to look at. Mostly, you'll be tweaking your MaxClients. You can tweak the others as well, but I'd recommend reading up on the documentation at the apache site before altering them.

The general idea is that you want to setup your server so it uses the maximum available resources, without moving into swap space. So you want to tweak your MaxClients to the point that, under heavy load, your server is under almost full, but stable, load. Too high a setting, and you start swapping. Too low, and you're wasting the full potential of your server. I'd recommend starting low, around 30 or so, and possibly benchmarking your server (check out "ab", which has some fairly straightforward options).

php-cgi is notoriously slow since it has to load the php process on every request.

Try using php-fcgi via spawnfcgi (see the nginx guides in the linode library, the same approach applies to apache) or if you feel a little more daring you can use php-fpm.

For the amount of traffic you're talking modphp won't hurt, I run more than that on modphp.

For email I prefer Citadel, easy, self-contained. The web based UI is ugly but I only use it for admin, the users use various emails clients.

Citadel is in the Ubuntu repository and has been in generally continuous development since the 80's.

Of course I prefer Ubuntu for the server.

I wouldn't touch Apache+Worker+FastCGI with a 10 foot pole. There's nothing wrong with the first two, but Apache's FastCGI support is way more fragile and complicated that of other web servers. (Or at least that was what I had to deal with 2-3 years ago; things may have changed.) Anyway, I'd recommend that you stick with prefork & mod_php for now, and later switch to lighttpd or nginx if resource usage becomes a problem.

Citadel is a excellent email server, but as others have said, it would be a better idea to outsource your email to Google Apps. It's way more reliable, and you'll still have access to email when something goes wrong with your web server.

For send-only mail servers, I prefer Postfix. It's a simple two-liner:

apt-get install postfix
postconf -e "inet_interfaces = loopback-only"

Just press Enter when the installation process asks questions.

Nah, worker + fastcgi is quite easy to set up… assuming you mean modfastcgi and not the default modfcgid. This serves me well for over a year now.

(Also, exim is ligter than postfix. But hey, a matter of personal taste. ;))

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