Setup and configure Drupal 6 in Slackware Linux tutorial
This is a basic guide on how to setup and configure Drupal 6 in Slackware Linux. Many beginner webmaster out there still haven't heard of Drupal.Here is a little information. Drupal is an open source Content Management System like Joomla. It has been awarded The best open source content management system (CMS) for a couple of years already. The official Drupal website is drupal.org. You can read more about drupal in the Drupal founder's personal website, Dries Buytaert - Personal website and see for yourself who's using Drupal.
Basically, we need to setup web server, Mysql and PHP in Slackware before begin setting up Drupal. When you got all those servers running then it's time to begin the Drupal installation. See user guides below on how to setup and configure Drupal in Slackware Linux:
Get latest Drupal 6 released
Download latest Drupal 6 released from official drupal website. You can also using wget command from Linux command line terminal to download Drupal package. See example below:
root@slackware:~# wget http://ftp.drupal.org/files/projects/drupal-6.13.tar.gz
--2009-07-06 03:57:04-- http://ftp.drupal.org/files/projects/drupal-6.13.tar.gz
Resolving ftp.drupal.org... 64.50.238.52
Connecting to ftp.drupal.org|64.50.238.52|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1080373 (1.0M) [application/x-gzip]
Saving to: `drupal-6.13.tar.gz'
100%[======================================>] 1,080,373 113K/s in 12s
2009-07-06 03:57:16 (91.2 KB/s) - `drupal-6.13.tar.gz' saved [1080373/1080373]
root@slackware:~#
|
Change directory to the Slackware web server directory. The default location is /var/www/htdocs. See example below:
root@slackware:~# cd /var/www/htdocs/
|
Extract Drupal 6 package here.
root@slackware:/var/www/htdocs# tar zxvf /root/drupal-6.13.tar.gz
drupal-6.13/
drupal-6.13/includes/
drupal-6.13/includes/actions.inc
drupal-6.13/includes/batch.inc
drupal-6.13/includes/bootstrap.inc
drupal-6.13/includes/cache-install.inc
drupal-6.13/includes/cache.inc
...
...
...
|
If Drupal package has been extracted without any error, then we can rename the extracted directory as the website name. See an example below:
root@slackware:/var/www/htdocs# mv drupal-6.13/ testdrupal
|
Rename /testdrupal/sites/default/default.settings.php as /testdrupal/sites/default/settings.php. Give all permission to settings.php file. See command example below:
root@slackware:/var/www/htdocs/testdrupal# mv sites/default/default.settings.php sites/default/settings.php root@slackware:/var/www/htdocs/testdrupal# chmod 777 sites/default/settings.php |
Create a new directory named files in sites/default directory. Give permission to all. See example step below:
root@slackware:/var/www/htdocs/testdrupal# mkdir sites/default/files root@slackware:/var/www/htdocs/testdrupal# chmod -R 777 sites/default/files/ |
Create database for the new drupal cms
We already installed Mysql and now it's time to create a database for Drupal cms. Login into mysql and create a new database with privilege user. You can also use Phpmyadmin if you have it in your Slackware. See step by step example below:
Create a new database for the drupal website:
root@slackware:~# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 63
Server version: 5.0.67-log Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> CREATE DATABASE drupal;
Query OK, 1 row affected (0.00 sec)
mysql>
|
Create a new Mysql user:
mysql> CREATE USER 'drupal'@'localhost' IDENTIFIED BY 'password'; Query OK, 0 rows affected (0.00 sec) |
Give the new user privilege for the drupal database and run flush privileges command. See example below:
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON drupal.* TO 'drupal'@'localhost' IDENTIFIED BY 'password'; Query OK, 0 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) |
Edit Apache httpd server configuration file
Open /etc/httpd/httpd.conf file using text editor. Change AllowOverride None to AllowOverride All enable Drupal clean-url.
<Directory "/srv/httpd/htdocs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
#AllowOverride None
AllowOverride All
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
|
Add the following lines to the httpd.conf file:
RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Restart httpd service:
root@slackware:/etc/httpd# /etc/rc.d/rc.httpd restart
Drupal 6 installation and configuration
Open Mozilla Firefox and type drupal website url.
Install drupal - Choose language
Choose installation language that you prefer.
Install drupal - Verify requirements
We already created a file named settings.php and a new directory named files in /sites/default/ directory. There should be no problem here.
Install drupal - Database configuration
Enter Database name, Database username and Database password for drupal 6. Click 'Save and continue' when you are done.
Error:
Fatal error: Trying to clone an uncloneable object of class mysqli in /var/www/htdocs/linuxbasicconfig/includes/install.mysqli.inc on line 36
To fix this, set "zend.ze1_compatibility_mode = off" in Apache's php.ini file.
root@slackware:~# vim /etc/httpd/php.ini |
Refresh or reload the page.
Install site
When you are done, please change the permission of 'settings.php' file back to the way it was.
All necessary changes to ./sites/default and ./sites/default/settings.php have been made, so you should remove write permissions to them now in order to avoid security risks. If you are unsure how to do so, please consult the on-line handbook. |
That's all. Good luck!
Popular content

Comment On:
I really do hope that you are going to be elaborating more on this issue. I would like a little more information.
I am getting this error when
I am getting this error when restarting httpd
Syntax error on line 487 of /etc/httpd/httpd.conf:
RewriteBase: only valid in per-directory config files
httpd not running, trying to start
Any ideas?
Where, exactly, in the
Where, exactly, in the httpd.conf file do I insert:
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Thank you.
Rob.
I am getting a security
I am getting a security error on the configuration files because of the location of the files folder in ./sites/default which I created above in this tutorial. ./sites/default has to be writeable to get to the writeable /files folder. If I make ./sites/default not writeable, then Drupal wants to start the installation all over again. Thoughts? TIA.
In my case (Slackware64
In my case (Slackware64 13.0, drupal 6.15, mysql 5.0.84-x86_64) Drupal installation did not go beyond "Database configuration" screen until I did:
root@slackware:/var/www/htdocs# chown -R root:root testdrupaland copied *instead* of renaming settings.php file, so:
root@slackware:/var/www/htdocs/testdrupal# cp sites/default/default.settings.php sites/default/settings.phpas described here: http://drupal.org/getting-started/6/install/set-permissions
(by the way, "chmod 666" is sufficient for .php files)
Probably just the second command is really necessary, but the un-gzipped drupal folder had user and group "1080" instead of "root", so I preferred to change this.