MediaTemple Magento Installation Guide - Dedicated-Virtual Server

Last modified by RoyRubin on Thu, June 24, 2010 15:27
Source|Old Revisions  

This is an old revision of the document!

MediaTemple Installation Guide - Dedicated-Virtual Server


This article is a quick step-by-step tutorial on installing Magento on Media Temple (mt) Dedicated-Virtual Server (dv) account. If you have a Grid Service (gs) account you’d read our How to install Magento on Media Temple (mt) Grid-Service (gs) tutorial.

Download Magento

Please note: Before you start, please make sure you replace the version number to the latest version in the commands shown below.

tar -zxvf magento-0.6.13160.tar.gz

Install PHP5 CGI binary

Media Temple does not yet provide PHP 5.2 or newer on their (dv) servers. As Magento is a PHP5-only application you will have to install PHP5 as a CGI binary and configure the web server to use it instead of the default PHP4.

It is possible to compile a PHP5 binary yourself, but for the purposes of this solution, we’ve provided one for you. You can download it here:

cd /var/www/
chmod 755 cgi-bin
cd cgi-bin
chmod 755 php5-cgi

After that you should get the following:

ll /var/www | grep cgi-bin
drwxr-xr-x  3 root      root 4096 Oct 26 12:25 cgi-bin
ll /var/www/cgi-bin/ | grep php5
-rwxr-xr-x  1 root root 18440550 Aug 31 11:15 php5-cgi

Modify the Magento .htaccess file

By default, the web server will want to run the Magento application using PHP4, which will not work. In order to point it to the new PHP5 CGI binary, you must modify the .htaccess file in the Magento top-level directory to look like this:

<IfModule mod_php5.c>
    php_flag magic_quotes_gpc off
    php_flag short_open_tag on

Action php5-cgi /cgi-bin/php5-cgi
AddHandler php5-cgi .php

DirectoryIndex index.php

RewriteEngine on

#RewriteBase /

RewriteCond %{REQUEST_URI} !^/media/
RewriteCond %{REQUEST_URI} !^/skin/
RewriteCond %{REQUEST_URI} !^/js/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule .* index.php

Set necessary permissions

Set up necessary permissions on files and folders. Ensure that the file magento/var/.htaccess, the directories magento/app/etc, magento/var, and all the directories under magento/media are writable by the web server

cd magento
chmod o+w var var/.htaccess app/etc
chmod -R o+w media

Create a MySQL database and user

Go to your database management interface, create a database, a MySQL user, and password that Magento will use.

Take note of the settings (including database hostname) - you will need that information while installing Magento.

Run the installation wizard

Use your web browser to surf to any Magento page (for example /install or anything) and you will be forwarded to the installation wizard.

Review the license and confirm that you agree on the first step.

Specify database connection and URLs

Enter the database connection data into the fields, check whether installation wizard correctly determined your web-host name and path.

Create an administrator account

Enjoy using Magento!