On this page
- Drupal CMS On An ISPConfig Server Within 10 Easy Steps
- STEP 1 - Create a website:
- STEP 2 - Create a Administator user for the website:
- STEP 3 - Create a MySQL database for the website:
- STEP 4 – Download/extract the packages and remove the tar.gz files:
- STEP 5 - Move the Drupal folder contents your web and delete the empty Drupal folder:
- STEP 6 – Change the .htaccess file in your web:
- STEP 7 – Download your Drupal site MySQL database for Drupal:
- STEP 8 - MySQL database for Drupal:
- STEP 9 – Connecting Drupal:
- Step 10 – Visit your Drupal website:
Drupal CMS On An ISPConfig Server Within 10 Easy Steps
Version 1.0
Author: <hans> [at] bb-hosting [dot] org>
Drupal is a nice CMS, which is easy to use but it requires some special server settings. I wrote this “how to” for those who want to run this CMS on their ISPConfig server. Probably you can setup Drupal in different ways but I prefer the way descibed here.
In this how to, I will use just as an example:
- Drupal version 4.7.3. for a single drupal site configuration.
If you need multiple Drupal sites, I refer to this page: http://drupal.org/node/260
- I assume also that this is your first Drupal setup!
- Websitenumber within ISPConfig: web1
- Your webs are stored under /var/www
- MySQL database: web_db1
- MySQL username: web1_u1
- MySQL password: mysqlpassword
Here we go:
STEP 1 - Create a website:
In ISPConfig, create a website via “New site” in the main menu.
On the tab called “Basis” use www for the hostname and mydrupalwebsite.tld for the domain name. Enable MySQL and PHP scripts for this website but disable PHP Safe Mode.
In the Apache directives field you enter these lines:
<Directory /var/www/mydrupalwebsite.tld/web/> Options +Includes +FollowSymlinks -Indexes AllowOverride All Order allow,deny Allow from all <Files ~ "^\.ht"> Deny from all </Files> </Directory>
STEP 2 - Create a Administator user for the website:
In ISPConfig, create an Administrator user, so you can upload/download the website later via FTP:
In the main menu select “ISP Manager”, select your new website called mydrupalwebsite.tld in the structure tree and press the tab “User and Email”.
Press “new” and define a new user and its email address. Give this user administrator rights and press “Save”.
STEP 3 - Create a MySQL database for the website:
Click on the tab called “Options” and create a new database for the website.
ISPConfig will show you:
Database name: web1_db1
Database user: web1_u1
Then you define a password for the database user and press “Save”.
STEP 4 – Download/extract the packages and remove the tar.gz files:
Logon into your webserver as root and navigate to your Drupal web:
cd /var/www/web1/web/
Download the latest Drupal version, which is version 4.7.3. at this moment.
wget http://drupal.org/files/projects/drupal-4.7.3.tar.gz
tar -zxvf drupal-4.7.3.tar.gz
Unpack the downloaded files:
tar -zxvf drupal-4.7.3.tar.gz
Remove the tar.gz files:
rm *.tar.gz
STEP 5 - Move the Drupal folder contents your web and delete the empty Drupal folder:
cd drupal-4.7.3
mv * ../
mv .htaccess ../
cd ../
rmdir drupal-4.7.3
STEP 6 – Change the .htaccess file in your web:
Replace the .htaccess file in your web, which is provided by Drupal with a .htaccess file with the following contents:
<IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA] </IfModule>
STEP 7 – Download your Drupal site MySQL database for Drupal:
Download your Drupal website, using your favourite FTP-client.
URL: ftp://mydrupalwebsite/web
Username and password as defined at STEP 2.
STEP 8 - MySQL database for Drupal:
In the database directory within your Drupal folder - which is now on your local desktop - you will find several sql files.
The sql-version you need is depends on the MySQL server you are running.
In this example, I’ll use the sql-file database.4.1.mysql as I am running MySQL 4.1.11.
You can use this sql file to create the tables of the mySQL database.
In this example, I do this with phpMyAdmin.
You can access your database via your Internet browser via URL http://webmail.yourhostingcompany.tld:81/phpmyadmin/
If you do not have phpMyAdmin installed, you can download it at http://www.ispconfig.org/downloads.htm
Login into phpMyAdmin with the mySQL user account as mentioned/defined at STEP 3.
In phpMyAdmin:
- select your database
- select the SQL icon to start a query
- choose your sql file In the mySQL directory in the databasefolder and press “Start”
- You can exit phpMyAdmin
STEP 9 – Connecting Drupal:
In your Drupal file folder on your local desktop, you’ll find the file sites/default/settings.php.
Within this file find the line which says:
$db_url = 'mysql://username:password@localhost/databasename';
Change it into:
$db_url = 'mysql://web1_u1:mysqlpassword@localhost/web1_db1';
Save the file sites/default/settings.php after your modification and upload it to your web via FTP, using your FTP-account as defined in STEP 2.
Step 10 – Visit your Drupal website:
In your favourite browser, point to http://mydrupalwebsite.tld where you will see the Drupal setup screen. Follow the instructions as shown.
More information about the Drupal Content Management system: