Installing Drupal is a simple process. As with everything else in Drupal development there are more than a few ways to go about it. Following best practices will make your life easier in the long run. Below is a rough outline of the steps involved in getting your first Drupal installation ready for development.
- Download Drupal
- I find it easiest to ssh to the document root of my server and wget the files directly from Drupal.org. Not all shared servers allow you to use wget, but you can usually get permissions to use it if you ask. This saves the tedious step of downloading then FTP.
- It is probably best to stick with the latest full release, not the latest beta or even release candidate. A download link is easy to find from the drupal.org page at the top right.
- Untar the gzipped tarball
tar zxfv DRUPALFILE.tar.gz- This will extract into a drupal directory. Now move the contents of this drupal directory to your document root with a command like this
mv DRUPALDIR/* DRUPALDIR/.htaccess DOCUMENT_ROOT
- Create a files directory
- While in the document root...
mkdir filesand set that new files directory to be world-writable,chmod 777 files
- While in the document root...
- Create a site directory
- This is one of the neat features of Drupal, and there is a great handbook page explaining how you can use the site directory structure to handle multiple sites with one installation, but I can't find it at the moment.
- For the moment just create a folder within the sites folder that is named for the domain you are hosting the site on. For example if your site is mydomain.com then make a folder mydomain.com, if you are putting a site up as a subdomain then create a directory with the subdomain included like, sub.mydomain.com.
- You will see two folders already exist in the sites folder all and default. Copy the settings.php file from the default directory into your new sites directory.
cp default/settings.php mydomain.com/Now set that settings.php file to be writable.chmod 777 mydomain.com/settings.php - Drupal will match the domain name against names in the sites folder and use the most specific. Modules and themes installed in the mydomain.com directory will only be available for that domain and its subdomains. It is good practice to keep modules and/or themes in the all folder if you want them available to multiple sites.
- Create a database and a user for that database
- Run the install script
- If things are setup correctly so far point your browser to http://www.mydomain.com/ and you will be forwarded to the install script. This process is easy and sets a few settings in your settings.php file for your database connection
- Change permissions on your settings.php file
chmod 755 mydomain.com/settings.php
- Create your first account
- Go to http://www.mydomain.com
- You will see the basic Garland theme and instructions at the right. You will want to follow those instructions and create your first account for this site. This account will be your administrator account, so be careful what you name it and what email address you use
The process is that simple and after a few sites you'll find yourself going through these steps in minutes. The default installation of Drupal is useful right out of the box, but there are some standard settings and configurations you will run through on every site you set up. Later I will detail the process of creating reusable installation profiles to establish a basic state for your Drupal sites. First though, play around with Drupal and the hundreds of available modules and themes to get a sense of what is possible.
Comments
Post new comment