VPS! Getting Drupal up and running on a linode

[Be sure to see the more recent update to this article,
VPS! Getting Drupal up and running on a linode (revisited)]

Well, after realizing the limitations of shared hosting for Drupal development, I decided to go with the big boys and use a dedicated server or VPS solution, at least for development. So I can make a multisite install for the docs and I can make subdomains for each development site.

So after perusing various options, I decided for linode. After checking out the various plans, I decided on the Linode 300, and got 50% more disk space by paying for a year.

While I was waiting for my account to be ready (after all today is Thanksgiving: but it still took no more than 40 minutes), I mosied over to ZoneEdit (see excellent tutorial reference below) and signed up for DNS service and domain management (free for the first 5 domains that you add to your account).

When my account was ready, the first step was to log into the Member's area. After choosing a suitable geographic site to house my linode, I headed for the Distro Wizard and chose my friend Ubuntu (huge choice of distros, including three Ubuntu releases, including the most recent 7.10, which I chose). I used the maximum amount of disk space leaving myself with a 256 MB swap disk, typed in a root password and created the profile.

I went back to the Dashboard, which refreshed every ten seconds and soon told me that Linode Initial Configuration job, and the Disk Create from Distribution job and the Create Filesystem job were all done "Success". So... I clicked on boot and booted it! Soon found out that that job was a success too, and my Linode was Running (so said the Linode Status box).

Well, I had a domain name specified as my first free slot on ZoneEdit which already had the ZoneEdit nameservers pointing at it, so the only thing I had to do was to tell ZoneEdit to point that domain name to my new Linode. So back on my Linode Member's area page, I clicked on the Remote Access tab, copied the ip, and specified that on the ZoneEdit edit page for my domain name (textworks.com.ar). A quick ping showed that to be an instantaneous success.

Since this is going to be a relatively permanent setup, and I might want mail to work and everything, I decided to configure textworks.com.ar as the reverse DNS for my linode ip, so I clicked on the Utilities tab, and on the Reverse DNS Configuration link, typed in textworks.com.ar and clicked on Lookup, then confirmed I wanted to change the reverse DNS configuration to textworks.com.ar (which it had found since ZoneEdit nameservers were already working). The domain showed as the current reverse DNS for the linode IP address.

Next step was to ssh into my linode! So I did in the normal way, and there I was, ssh was snappy, too.

[edit:] Bring site up to date

# apt-get update
# apt-get upgrade

I changed the hostname

/bin/hostname textworks.com.ar
echo textworks.com.ar > /etc/hostname

and rebooted (by clicking Reboot where the Boot button had originally been on the dashboard); took about one minute. And I logged in through ssh again, and did:

uname -a

and there I was: textworks.com.ar

all set.

Configure package management and update system

root@textworks:~ # cd /etc/apt 
root@textworks:/etc/apt # ls -l
total 16
drwxr-xr-x 2 root root 4096 Oct 23 08:47 apt.conf.d
-rw-r--r-- 1 root root  779 Oct 23 08:42 sources.list
drwxr-xr-x 2 root root 4096 Apr 18  2006 sources.list.d
-rw-r--r-- 1 root root 1724 Feb  8  2006 trusted.gpg
root@textworks:/etc/apt # cp sources.list sources.list.ori

Then I edited sources.list and made sure universe and multiverse repositories were enabled. (What I actually did was uncomment the universe lines, copy them and stick in multiverse for universe in the copied lines; in any case these things are pretty well documented elsewhere; you can even copy in a sources.list from your own gui-infested desktop!)

Then I did update and upgrade:

apt-get update
Then a gutsy upgrade:
apt-get upgrade 

[a little aptitude: Now folks, as an Ubuntu user, one really misses synaptic in these cases (a gui to run package management under gnome desktop, for example); however, everything we do with apt-get here, we can also do with "aptitude": just like the first thing I did on the box was to go "apt-get install mc" for trusty old midnight commander (ahh!), you can also adopt aptitude for your "command line", that is, really, terminal package management: just type in "aptitude", and I'm clicking, I'm searching, I'm seeing what's installed.... I'm updating, I'm pointing and clicking! I used it to install phpmyadmin on the apache2 server (once LAMP was installed -- see below -- including a password for mysql root]

I changed the default shell to bash

root@textworks:/etc/apt # ls -lia /bin/sh
2268 lrwxrwxrwx 1 root root 4 Apr 22  2007 /bin/sh -> dash
root@textworks:/etc/apt # which bash
/bin/bash
root@textworks:/etc/apt # rm -f /bin/sh
root@textworks:/etc/apt # ln -s /bin/bash /bin/sh
root@textworks:/etc/apt # ls -lia /bin/sh
57 lrwxrwxrwx 1 root root 9 Nov 22 18:14 /bin/sh -> /bin/bash

Well, cool, now for LAMP!

First MySQL

root@textworks:/etc/apt # apt-get install mysql-server mysql-client libmysqlclient15-dev

I was asked if I wanted to set a password for MySql root, and I did.

Did some additional configuring in /etc/mysql/my.cnf to allow remote access to MySQL (this site is for development, anyway, right???) and after commenting the bind to localhost, restarted with the command:

root@textworks:~ # /etc/init.d/mysql restart

Then Apache 2

root@textworks:~ # apt-get install apache2 apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert 

Then PHP5

[edit: php5-json is part of php5-common, so removed from list (otherwise error)]
[edit: with Heron, php5-ps is no longer part of php packages (otherwise error)]
root@textworks:~ # apt-get install libapache2-mod-php5 php5 php5-common php5-curl php5-dev
php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt
php5-memcache php5-mhash php5-ming php5-mysql php5-pspell
php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl 

(well, this really is a kitchen sink approach, overkill for most people, underkill for some; but this is the command I used this time through)

Next, stuffed the following line into /etc/apache2/apache2.conf (near definition of user and group):

DirectoryIndex index.html index.htm index.cgi index.pl index.php
Then restarted apache server:
root@textworks: # apache2ctl restart

Now I tested the setup with an info.php file placed somewhere under the document root (/var/www):

root@textworks:~ # cat /var/www/info.php 
<?php phpinfo(); ?>
root@textworks:~ # 

And that worked, http://example.com/info.php nice purplish php info screen tells me I got PHP Version 5.2.3-1ubuntu6 running on Apache/2.2.4 (Ubuntu) PHP/5.2.3-1ubuntu6; cool or what?

Drupal clean url's on ubuntu

Now, what about clean url's on ubuntu. And something simpler than my more than one-year-old article on the subject? Basically, for Drupal clean url's to work, the .htaccess has to work. And if you use symbolic links for drupal directories, then you better make sure Apache can follow them too. So you need to install and enable mod-rewrite and do some configuration for the Apache server. Basically, that's it.


I configured /etc/apache2/sites-enabled/000-default.

Before (lines 10-18):

        <Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
...

After (changing AllowOverride None to AllowOverrideAll, essentially enabling .htaccess files):

         <Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
...

After doing the above configuration, I enabled the apache mod_rewrite module and restarted the apache server:

root@textworks:/etc/apache2/sites-enabled # a2enmod rewrite
Module rewrite installed; run /etc/init.d/apache2 force-reload to enable.
root@textworks:/etc/apache2/sites-enabled # apache2ctl restart

I installed and configured sendmail so Drupal will be able to... send mail

First I installed sendmail:

root@textworks:/etc/php5/apache2 # apt-get install sendmail

Then I edited php.ini:

root@textworks:/etc/php5/apache2 # vi php.ini

In this file I set the sendmail path for php around line 660:

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = /usr/sbin/sendmail -i -t

Then I restarted the apache server:

root@textworks:/etc/php5/apache2 # apache2ctl restart

Now Drupal will be able to talk to me!

I did an initial document root Drupal install

Well, in the next few exciting days, weeks, and months I am sure this procedure will become more refined, security conscious, multi-site, virtual hosts, subdomains, svn repos, what-have-you (it will have a multi-site proccess flow and tracker (agile approach documentation sites) install for all my current projects, for example). However, all we want to do right this second is to get Drupal up and running.

First, I downloaded drupal and unpacked it in the document root:

root@textworks:/var/www # wget http://ftp.drupal.org/files/projects/drupal-5.3.tar.gz
root@textworks:/var/www # mv drupal-5.3.tar.gz /tmp
root@textworks:/var/www # tar xvzf /tmp/drupal-5.3.tar.gz 
root@textworks:/var/www # cd drupal-5.3/
root@textworks:/var/www/drupal-5.3 # cp -r * ..
root@textworks:/var/www/drupal-5.3 # cp .htaccess ..
root@textworks:/var/www # rm -rf drupal-5.3/

Now, I did install phpmyadmin, and it's working great, so I could have just created the database and database user from there, but since we are in "rough and ready" "lean and mean" linode clean machine mode, and to make this narrative a little more complete, let's do it all from the command line! Fortunately, it's all there for you in the INSTALL.mysql.txt that comes with Drupal in the root directory, but here is what I did:

root@textworks:/var/www # mysqladmin -u root -p create dr_txtwrks  
Enter password: 
root@textworks:/var/www # mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 17
Server version: 5.0.45-Debian_1ubuntu3-log Debian etch distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE
-> TEMPORARY TABLES, LOCK TABLES
-> ON dr_txtwrks.*
-> TO 'dr_txtwrks'@'localhost' IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> quit;
Bye
root@textworks:/var/www #

So, that gave me the new database, and a new user with all the necessary privileges over that new database and over no other.

In preparation for the Drupal gui install procedure, I temporarily modified the permissions on the settings.php file:

root@textworks:/var/www # ls -l sites/default/settings.php 
-rw-r--r-- 1 root root 5976 Nov 23 06:37 sites/default/settings.php
root@textworks:/var/www # chmod 666 sites/default/settings.php  

I then pointed my browser at http://textworks.com.ar and ... installed Drupal!

(who afterwards reminded me to protect settings.php:

root@textworks:/var/www # chmod 644 sites/default/settings.php 
root@textworks:/var/www # ls -l sites/default/settings.php 
-rw-r--r-- 1 root root 5982 Nov 23 06:56 sites/default/settings.php
root@textworks:/var/www # 

That's it. It's alive! It's alive!

Just one more thing to do: reboot the machine to make sure the configurations are all in order:

root@textworks:~ # shutdown -r now

In a minute or two, everything was back up fine! Site up.

References

1. Ubuntu server guide: http://doc.ubuntu.com/ubuntu/serverguide/C/index.html

2a. The Perfect Setup - Ubuntu Feisty Fawn (Ubuntu 7.04): http://www.howtoforge.com/perfect_setup_ubuntu704

2b. The Perfect Server - Ubuntu Gutsy Gibbon (Ubuntu 7.10) http://www.howtoforge.com/perfect_server_ubuntu7.10

2c. Harry Sufehmi - Setting Up Linux Server - Fully Loaded

3. Addison Berry's Install a Local Web Server on Ubuntu: http://www.lullabot.com/videocast/install-local-web-server-ubuntu

(By using aptitude instead of the X-window synaptic, you could probably just use this great video to get the job done, with the exception of one or two linode specific things).

4. Using ZoneEdit for DNS Management http://www.4webhelp.net/tutorials/misc/zoneedit.php

(excellent, step-by-step, covers many aspects, some of which are necessary for multisite setup).

[update 17 Jan 2008]

5. Jeff Beeman has just written a couple of excellent articles on this same topic, which include some interesting stuff like MySql optimization I have not dealt with.

Just got rolling with a VPS on Linode (Part 1): http://www.jeffbeeman.com/node/23

Just got rolling with a VPS on Linode (Part 2): http://www.jeffbeeman.com/node/24

[update 12 Oct 2008]

6. 2bits excellent write-up on installing Ubuntu with Drupal 6 on a VPS or dedicated server:

http://2bits.com/articles/installing-a-dedicated-server-or-a-vps-with-ub...

Hi Victor! Thanks for this

Hi Victor! Thanks for this excellent write up. I'm looking at various VPS solutions for Drupal at the moment and this has been very useful.

Hosting multiple sites on Linode

Hi Victor,

Thanks for your write up. It was part of the information that made me sign for a 512 linode account. Currently i have a drupal websites on the account but i also want to run a wordpress blog on the same account with a domain name puirchased from GoDaddy. Is this possible or do I have to buy another linode account.

One, two, three many Drupal sites on the same Linode, of course

Let's suppose I want to make a staging or test site for example.com on my linode already running several other sites, including the default /var/www based site. Here's what I sometimes do:

1. Create a user (logged in as root)

# adduser example
...

2. Create a database for the example.com Drupal instance

3. If I am root, login as the user

$ su - example
$ drush dl drupal
Project drupal (6.20) downloaded to /home/example/drupal-6.20/.
$ mv drupal-6.20 public_html

4. Create Virtual Host (assuming Ubuntu as per this article) (logged in as root) by editing the file /etc/apache2/sites-available and placing the following lines of code in it:

<VirtualHost *>
  ServerName example.com
  DocumentRoot /home/example/public_html
  <Directory "/home/example/public_html">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
  </Directory>
</VirtualHost>
 
<VirtualHost *>
  ServerName <a href="http://www.example.com<br />
" title="www.example.com<br />
">www.example.com<br />
</a>  DocumentRoot /home/example/public_html
  <Directory "/home/example/public_html">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
  </Directory>
</VirtualHost>

5. Restart Apache

# apache2ctl restart

6. Point example.com to your Linode IP; or to a DNS service or the Linode DNS service if you prefer using those.

Presto!

You can also do the same for subdomains for a domain that is already set up on your Linode.

Another great alternative is to explore the http://www.aegirproject.org/

Saludos,

Victor Kane

I was fine with that but I

I was fine with that but I wanted to host several websites with Drupal using vhosts in Apache. It turns out, as best as I can tell that you can't use vhosts with web forwarding - again I don't know enough about this stuff to understand why, but it appears as if the headers don't carry the domain name like they do with the "A" record. At any rate I couldn't get it to work. Zoneedit says you can do both an "A" record and web forwarding and solve the problem but I found them to be mutually exclusive - turn one on and the other is wiped out. I sent them email about this but have received no response yet.

Hmm

I hope your experience can enlighten me further

Linode referral code?

What's your Linode referral code? I'm setting up a VPS and want to give you referral points.

Thanks LA dude!

My referral code is: a105db8a0cca040b67cc8221fe25ffc84d45e25b

My referral URL is: http://www.linode.com/?r=a105db8a0cca040b67cc8221fe25ffc84d45e25b

I work in hosting provider

I work in hosting provider company now and I can give you a few advices if you still need them.

Hi Victor, thanks for this

Hi Victor,
thanks for this excellent write up. I'm looking at various VPS solutions for Drupal at the moment and this has been very useful.
What do you think about the idea of doing a follow up post in a month or two about how it's all going?

Limitations of Zone Edit

Hi,

I just discovered that Zone Edit does not support favicons. I don't really understand this since it seems to me that a favicon is just another file. I see that some free/not-so-free dynamic DNS services do support them. Do you have any insight on this?

I also believe there are bandwidth restrictions on those 5 free accounts with Zone Edit. Do you know what they are?

I'm coming to the realization that running my own Dell box server right here at home (San Diego) with a Cox cable business internet connection (5 static IPs) makes more sense than a VPS. It's $80/mo (already pay $43/mo for basic internet) so it's only $37/mo more compared to a lot more for a VPS. For that I get 12MB/sec download and 1MB/sec upload speed. Not sure if there are any data volume restrictions however. With your own box you have local access and no need to use SSH which is not completely secure. You have to do your own backups and such but that's the same as a VPS anyway. Of course you have to have a spare Dell box - I bought this one a year ago for $700 and added hardware RAID - 1 for another $250. But I get to set it up the way I want!

I currently run a server on my home account, though the speed is only 6MB/.3MB - it's good enough for a small site. Technically the fine print doesn't allow running a server on the home account but they generally look the other way unless you abuse the bandwidth. I decided to dump Zone Edit as my IP has never changed in a year and I'd really like to have the favicons work. I could always pay DynDns.com $27/yr/domain for a custom DNS service.

Why did you need Zone Edit with a VPS? Doesn't Linode supply you with a static IP? Then you need only to setup the DNS server through your registrar with the numbers for Linode.

Incidentally I noticed you setup Sendmail. I wanted to avoid this for security reasons and didn't want to deal with the spam headaches so I used this Drupal module that sends mail to an SMTP gateway. I used Google for this for free. Gmail will give you thousands of free email accounts with your own domain name for free. You use Gmail's web interface as usual and you can even display your own logo instead of Google's. Can't beat it - especially since the spam filters are incredibily good.

...Jeff

Interesting points... my view

Jeff writes: 

I just discovered that Zone Edit does not support favicons. I don't really understand this since it seems to me that a favicon is just another file. I see that some free/not-so-free dynamic DNS services do support them. Do you have any insight on this?

Well, I am having no trouble at all with Drupal icons ("shortcut icon" specified in themes): http://textworks.com.ar/ 

Drupal themes insert the following kind of link tags into the head portion of the html document:

<link rel="shortcut icon" href="/sites/textworks.com.ar/themes/zenwebfactory/favicon.ico" type="image/x-icon" />

 You can see it's working.

I also believe there are bandwidth restrictions on those 5 free accounts with Zone Edit. Do you know what they are?

I have seen this restriction mentioned in relation to the five free accounts, associated with the statement "you get what you pay for". For my development sites, apart from load testing, this is not a restriction. For customer sites I plan on arranging payment to be made for the third nameserver, and/or whatever fees are necessary to either Zoneedit (they deserve my business) or another comparable service. 

I'm coming to the realization that running my own Dell box server right here at home (San Diego) with a Cox cable business internet connection (5 static IPs) makes more sense than a VPS. It's $80/mo (already pay $43/mo for basic internet) so it's only $37/mo more compared to a lot more for a VPS.

Well, certainly a valid option. What my main objective is, is to avoid that barrier between me and my server that you inevitably get with shared hosting. But I am paying around $20 for the VPS, by the way (See http://linode.com/). A dedicated server (in the neighborhood of $100 - $300) of course would be more. But the dedicated IP (which some customers use) is certainly an option, if you are always working in the same physical place. I mean, of course you can get into your box from anywhere, but the odds of there being any technical difficulties are much greater in one's home than in a commercial server rack.

For that I get 12MB/sec download and 1MB/sec upload speed.

Most of the time that would be fine. But on a VPS, of course, using an online version control repository, for example, is a lot snappier. But this is not such an important point.

Not sure if there are any data volume restrictions however. With your own box you have local access and no need to use SSH which is not completely secure.

Well, it can be made secure. And you will have to use SSH anyway if you access your box remotely. I don't travel a lot, but I do travel. And I need to access my boxes from different physical locations. 

You have to do your own backups and such but that's the same as a VPS anyway. Of course you have to have a spare Dell box - I bought this one a year ago for $700 and added hardware RAID - 1 for another $250. But I get to set it up the way I want!
I currently run a server on my home account, though the speed is only 6MB/.3MB - it's good enough for a small site. Technically the fine print doesn't allow running a server on the home account but they generally look the other way unless you abuse the bandwidth. I decided to dump Zone Edit as my IP has never changed in a year and I'd really like to have the favicons work. I could always pay DynDns.com $27/yr/domain for a custom DNS service. 

Why did you need Zone Edit with a VPS? Doesn't Linode supply you with a static IP? Then you need only to setup the DNS server through your registrar with the numbers for Linode.

OK. The reason is this: Linode does supply me with static IP, of course. But I don't want to install BIND on the same box. I want it to be up all the time, whereas my box may need to be rebooted from time to time, since it is for development. I could however, on a stable VPS just install bind. But using Zoneedit gives you much more reliable nameservers, even for the free account.

The other reason is that I live in Argentina, and while nic.ar is a great, FREE service (domains are free), nameserver changes can take 24 - 48 hours to take effect. If I go to, say, Godaddy or similar in the US, nameserver changes take effect almost immediately. So, what I do is point my Argentine registrar at Zoneedit, and then reroute the IPs as I need with near instantaneous changeover.

Incidentally I noticed you setup Sendmail. I wanted to avoid this for security reasons

On launched sites we compile Sendmail ourselves and tighten it, or use other alternatives. The GMail alternative has come to my attention before, and sounds like a cool way to deal with the whole mail server headache, however. I understood this was a paid service, to some extent, however, although perhaps well worth it.

and didn't want to deal with the spam headaches so I used this Drupal module that sends mail to an SMTP gateway. I used Google for this for free. Gmail will give you thousands of free email accounts with your own domain name for free. You use Gmail's web interface as usual and you can even display your own logo instead of Google's. Can't beat it - especially since the spam filters are incredibily good.

Thanks, Jeff, for your comments 

More on Vhosts, etc

Hi, and thanks for the clarifications.

As it turns out I was using web forwarding with Zoneedit and that's where favicons aren't supported - still not sure of the technical reasons why.

I was fine with that but I wanted to host several websites with Drupal using vhosts in Apache. It turns out, as best as I can tell that you can't use vhosts with web forwarding - again I don't know enough about this stuff to understand why, but it appears as if the headers don't carry the domain name like they do with the "A" record. At any rate I couldn't get it to work. Zoneedit says you can do both an "A" record and web forwarding and solve the problem but I found them to be mutually exclusive - turn one on and the other is wiped out. I sent them email about this but have received no response yet.

Here's what they have to say in their FAQs:

#23 How can I host multiple web sites on one IP Address?

You can set up as many domains as you want pointing to the same IP Address using DNS, just keep adding zones, and setting the IP addresses.

However, you need a web server that uses the 'host' header to route the different domains to different web instances.

* Apache Info: Using name-based Virtual Hosts
* Microsoft IIS Info: Using Host Header Names in IIS

#24 My ISP blocked port 80. How can I run a web server?

Don't worry, you can still run one!

1. Sign up and get started with ZoneEdit.
2. Make your web server listen on port number like "6000" or "5000"
3. Check to see if your web server works in a browser by using a URL: http://3.4.5.6:6000/. Use the port number that you're listening on and the real IP address of your machine.
4. Add the "IP Address" for your web server in ZoneEdit: "ww2.domainname.com" points to "ip address".
5. Add a Web Forward entry for your domain called "www.domainname.com" that points to http://ww2.domainname:6000/

We recommend turning cloaking off in this case, letting people know thay are going to http://ww2.domainname.com:6000 is usually OK, and it allows the browser to perform better.
----------------------------------

Everything works fine if you use Zoneedit and "A" records to point each domain to your IP, except for the minor little annoyance that my ISP blocks port 80. Ok, so why not just use another port like 8080? Because you can't make an "A" record with a port number appended. I can't figure a way around this so it looks like I'm going to have to cough up the dough and sign up for the "business" account for $80/mo or sign up for a VPS somewhere.

As for Zoneedit, yes it's useful for general DNS management (ya can't beat the price) but it seems to me that GoDaddy (my registrar) can do most of it anyway, except for the dynamic DNS stuff, and my IP never changes which will be moot with the new biz service.

The Google SMTP service is free. The branded webmail is also free, as are the other services like the online word processor and spread sheet. All of that gets branded with your logo. There is of course a paid upgrade; it's all explained here: http://www.google.com/a/help/intl/en/admins/editions_spe.html

I used PAIR.com for years and it was good because you can have unlimited websites on the same shared server for $30/mo and they use FreeBSD servers which I prefer to Linux (mostly because I've spent a fair amount of time learning it). But PAIR does not offer a VPS solution, so you're somewhat limited for root access related stuff. There are other limitations with some hosting services like for example the maximum PHP memory limit which is normally 8MB and Drupal often needs more (not an issue on a VPS, but overall RAM is unless you pay more). On my home box I've got 3GB of RAM and 250GB of RAID-1 dedicated to Drupal and MySQL and a large PHP memory limit.

Perhaps I'm naive but it seems running my own box would be better overall - it will be a great learning experience for sure, though I don't aspire to being a webmanager or a sysop. The security stuff will keep you up at night though, I'm afraid, always playing catch up with the bad guys. But then you'll have almost the same problems on a VPS. Some hosts will offer help if you get bombed but many won't and they'll just shut you down if you get invaded by a trojan who hijacks your mail server. I use the SMTP module so Drupal can send email.

If you run your own mail server you really need something better than sendmail that has known vulnerabilities, or so I've read. I've read that Qmail, Postfix and others are superior. In addition you should be probably be running a virus milter like ClamAV in conjunction with the mailer so you don't pass viruses on through to your clients if you run incoming mail and/or allow file uploading. That's the other reason I like Gmail for SMTP - all that goes away, and your incoming mail is all done by Gmail.

BTW, I came across a thread discussing security with Drupal and one guy recommended not putting the standard Drupal files in the webroot, but rather another directory. Then you symlink the stuff that needs to be exposed like images. Then you replace all of the PHP scripts like index.php, update.php, et al, with a dummy file that contains a chdir instruction in PHP. I finally got that to work and plan to write up a tutorial to put on the Drupal site at some point. The original discussion (http://justinhileman.info/blog/2007/06/a-more-secure-drupal-multisite-in...) is a little hard to follow as their are some errors in the way he did the symlinking as pointed out by another astute reader, as you'll see. If you're curious I can send you what I distilled from it all.

Thanks again for the help, Jeff

very interesting stuff, Jeff!

Will look into all of this, cool.

I just use A records and have a whole bunch of sites running off of a single IP through Zoneedit, some through Drupal multisite, and others through vhosts.

Will mull over and investigate some of the ideas you put forward, thanks again.

Victor

3 days in, things are still fine

Well,three days in, things are working out fine, with all my projects, nary a hitch so far.

I will post a report again in a few months.

speed

Hi,

I'm curious to here any updates on how your Linode is working out? I just signed up for one for my Drupal site. I'm very happy with it, except the speed of my Drupal site seems to be an issue on it. Compared to the previous VPS I was on, MySQL query's and page loads are taking much longer (devel reveals 1000ms of SQL and 6000ms of page execution time, compared to 200ms of SQL and 2000ms of page execution on the old system). I assume I must be doing something wrong. What are your experiences with the speed of your Linode?

Hope it's working well for you.

Objectives and resources

My objective on linode is to set up a development environment where I am in complete control, and to have better performance than on shared hosting.

To this end, the cheapest Linode package with something like 375 MB memory suite my needs.

I get much snappier performance out of the box.

However, since I wrote this, Jeff Beeman has written a couple of articles on this same topic (Linode & Drupal), and in his second part, speaks of MySql optimization and accelerators also. See resources newly edited in the above article.

Just though I would report

Just though I would report back and let you know that after optimizing my system and joining the Linode Xen beta my system performance there improved a lot. You might consider trying there Xen system. It seems very stable and I'm impressed with the speed.

Thanks again for the article.

Absolutely

That's certainly on my roadmap!

Boy, I'd love to organize/see

Boy, I'd love to organize/see a forum (organic group maybe) for linode users and Drupal, particularly multisite. Anybody else feel the same? sunni.freyer at gmail

Maybe on the linode site?

Let me know if you think it's a good idea.