Install Drupal 6 in Ubuntu 11.10 brief

Here is the direct and brief version on how to install Drupal 6.22 in Ubuntu Desktop 11.10.

1) Install LAMP server

i) Open command line terminal.
ii) Type: sudo su
iii) Provide password.
iv) Type: tasksel
v) Choose 'lamp server' to install.
vi) Start apache server: service apache2 reload
vii) Add virtual site: cp /etc/apache2/sites-available/default /etc/apache2/sites-available/website-name-directory
viii) Enable new website:
- cd /etc/apache2/sites-available/
- a2ensite website-name-directory

2) Drupal installation.

i) Create database for drupal (in mysql).
ii) Download drupal and extract it.
iii) Copy to /var/www/your-website-directory
iv) Open web browser and begin drupal installation.
v) All should be well accept 'cron' and 'GD library'.

3) Install GD library. Type: apt-get install php5-gd

4) Restart web server. Type: service apache2 reload

5) For cron, just 'run cron manually' or use poormanscron module.

6) Reload drupal 'status report' page to confirm.

7) Enable clean URL:

i)Check rewrite_module: apache2ctl -M

ii) Enable rewrite_module: a2enmod rewrite

iii) Restart web server: service apache2 reload

iv) Set directory permission: vim sites-enabled/website-name-directory

Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all

Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

AllowOverride All
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all

v) Set directory permission: vim sites-enabled/000-default

Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all

Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

AllowOverride All
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all

9) Restart apache again:
service apache2 reload

10) Troubleshooting

1) Included in .htaccess:

RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

# Note:
# Change 'RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]' to 'RewriteRule ^(.*)$ website-directory-name/index.php?q=$1 [L,QSA]' sometimes work on some system depends on configuration.
# Change 'RewriteBase /' to 'RewriteBase /website-name-directory' depends on configuration.

2) Check RewriteBase in /etc/apache2/sites-enabled/website-name-directory and .htacess:

# RewriteBase website-name-directory

or

# RewriteBase /

Remove comment (#) based on your configuration.

Add new comment