This article is intended to provide a general approach to installing ExpressionEngine on a Rackspace Cloud Server running Linux.
In our sample, we’re working with a server running Ubuntu. Other Linux operating systems should be pretty similar, and you can get OS-specific instructions at the Rackspace Cloud Knowledgebase (http://cloudservers.rackspacecloud.com/index.php/Main_Page).
The process of installing ExpressionEngine on the Rackspace Cloud involves several tasks, from installing the LAMP stack to setting file permissions in ExpressionEngine. These topics are covered more comprehensively on other blogs, so this article is really just a documented process that references those other blogs with a few comments of my own. That said, let’s get started.
1. Basic Setup
The first part of the process is to get your Linux server ready with your user accounts and firewall rules. Rackspace provides a procedure for each Linux OS. Find yours on the list, and complete the steps outlined therein. Here’s their list:
Since we are running Ubuntu, we performed the procedures here:
To make a terminal connection to your server, you can use a client application or the console interface provided by Rackspace. To access the console, follow these steps:
Login to the Rackspace Cloud to access your account, and click on “Cloud Servers”.
2. Install the LAMP Stack
Next, we’re going to install Apache, PHP and MySQL with one command, as documented here:
sudo apt-get install lamp-server^
Be sure to include the caret (^). The command will not work without it.
sudo /etc/init.d/apache2 restart
Refer to the blog article linked above if you need more detailed information.
3. Install phpMyAdmin
sudo apt-get install libapache2-mod-auth-mysql phpmyadmin
Test it all out by opening phpMyAdmin at http://YOUR-IP/phpmyadmin/
4. Enable FTP Connections
Here is the command, but refer to this post for more detailed information:
sudo iptables -I INPUT 1 -p tcp --dport 21 -j ACCEPT
5. Install FTP Server
I used vsftpd (https://help.ubuntu.com/10.10/serverguide/C/ftp-server.html), but you can use whatever you prefer. Be sure to follow FTP software documentation to ensure proper security!
sudo apt-get install vsftpd
6. Set the permissions on the web directory
The user created in step 1 (Rackspace Server Setup) should have their home directory set to /var/www. Use this command:
sudo usermod -d /var/www yourusername
Now set this user as the owner:
sudo chown yourusername /var/www
sudo chgrp yourusername /var/www
7. Secure Web Server
I can’t give specifics on this, as each environment is unique, as are the security needs for your website. However, you should look into disabling directory listing and the like. This is a pretty good post about that:
10 things you should do to secure Apache
8. Enable mod_rewrite
In some instances, you may need to enable mod_rewrite. This is necessary if you want friendly URLs, as documented here: Remove index.php From URLs
To enable mod_rewrite, use this command:
sudo a2enmod rewrite
We’ll be following the ExpressionEngine installation instructions found here, http://expressionengine.com/user_guide/installation/installation.html. But note that our step 4, “Set Base Permissions” is needed after uploading the ExpressionEngine files.
1. Create the MySQL database
Login to phpMyAdmin at http://YOUR-IP/phpmyadmin/ to create the database that you intend to use for ExpressionEngine. You will need to create a database user (it’s not good security to use the root account). Note the database name, user and password. You’ll need it during the ExpressionEngine installation.
2. Download ExpressionEngine
Download your copy of ExpressionEngine, and rename the “system” folder as noted in Step 2 here:
3. Upload ExpressionEngine Files
Upload the ExpressionEngine files to your web server via FTP.
4. Set Base Permissions
Ensure that the files that you uploaded to your website root have 755 for permissions, including sud-directories.
sudo chmod 755 /var/www/*
5. Set the ExpressionEngine File Permissions
As documented in “Step 4, Set File Permissions” of the ExpressionEngine Installation process, set the permissions for specific directories. You can do this through FTP or sudo chmod.
6. Run the Installation Wizard
We’re now ready to run the installation wizard, as documented here:
You should now have ExpressionEngine running on your Rackspace Cloud site!
Need some help with your project? Learn more about Pedrera’s ExpressionEngine Developer services.