Introduction

This tutorial is a description of how to install Drupal on a virtual or dedicated host with root access.
This document presumes you are reasonably comfortable with the command line of your operating system and Drupal in general. It also assumes you already have a working base install of your operating system.

Instructions

  1. Upgrade the operating system to the latest version.
  2. Install the LAMP stack. Depending on your server, you might have to install apache server, php, mysql server, php-mysql, php-mbstring, php-gd.
  3. Install control panel of choice if desired. Webmin is a popular choice.
  4. Enable the Apache and mysql daemons to start at boot. You can do this in Webmin. Remember that Webmin runs in its own Apache process.
  5. Create a regular user. You may want to change ownership of /var/www/html (assuming that is the directory Apache uses on your system) files and directories to this owner. If it is the only user, you might wish to set the /var/www/html direcotry as the home directory.
  6. Edit the httpd.conf file as needed.
  7. Create any virtual hosts desired in Apache. This can be done in the httpd.conf file or with Webmin.
  8. Create a mysql database for Drupal.
  9. Download and unpack Drupal.
  10. Change Drupal permissions as desired. You may want to change the file ownership to your ftp user and the group to apache or nobody or whatever user (not process) you have apache running as. You can then add a files directory as /sites/default/files if desired. Then you can change the permissions for the directory /sites/default giving Apache ownership and make it belong to your user's group if desired. Chmod the /sites/default directory to make sure it is writeable by your Apache server. Something like 775 would probably be fine at this point.
  11. Install Drupal from your browser and make sure it changes the permissions of your default folder and settings.php file to something secure. If Drupal has permission, it should do this automatically.