====== MediaTemple Magento Installation Guide - Dedicated-Virtual Server ====== =====Important Note:===== Media Temple's DV servers now support PHP5, and this article is now somewhat outdated, with the exception being the SSH instructions for downloading and untarring Magento to your server. =====Prerequisites===== 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 [[http://www.magentocommerce.com/wiki/mediatemple_installation_guide_-_grid_service|How to install Magento on Media Temple (mt) Grid-Service (gs) tutorial.]] **If your (DV) server has Plesk installed, you must disable "CGI support" in the domain setup section of Plesk or you will receive a 404 error.** =====Download Magento===== **Please note:** Before you start, please make sure you replace the version number to the latest version in the commands shown below. wget http://www.magentocommerce.com/downloads/assets/1.0.19870/full/magento-1.0.19870.tar.gz tar -zxvf magento-1.0.19870.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: http://www.magentocommerce.com/support/php5cgi/php5-cgi **Note**: you will need root access on your DV account to accomplish this part of the installation. To enable root access, you'll need to open a support ticket in your account center, per this MT Knowledge Base article: http://kb.mediatemple.net/article.php?id=625 cd /var/www/ chmod 755 cgi-bin cd cgi-bin wget http://www.magentocommerce.com/support/php5cgi/php5-cgi 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: 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. [[http://www.magentocommerce.com/images/uploads/media-temple/gs/20-configuration-enlarged.gif|{{how-to:20-configuration.gif|}}]] ===== Create an administrator account ===== [[http://www.magentocommerce.com/images/uploads/media-temple/gs/23-create-admin-account-enlarged.gif|{{how-to:23-create-admin-account.gif?300}}]] ===== Enjoy using Magento! ===== [[http://www.magentocommerce.com/images/uploads/media-temple/gs/24-magento-clean-homepage-enlarged.gif|{{how-to:24-magento-clean-homepage.gif|}}]] [[http://www.magentocommerce.com/images/uploads/media-temple/gs/25-magento-order-success-enlarged.gif|{{how-to:25-magento-order-success.gif|}}]]