Wednesday, June 20, 2007

Installing Drupal on your locahost

Here's a guide on how to install Drupal. I used my (main) Kubuntu Desktop.

Make sure you have Apache2, MySQL5, and PHP5 installed before attempting to install Drupal. First, download the package here and extract them on your system.

Then copy the extracted files to your /var/www folder. Since my system is used for training purposes, I installed it on a different folder, /var/www/dax.

After that, create a schema and a user. Assign privileges and you're all set. In my case (again) I used MySQL Administrator, you can use also use PHPMyAdmin.

Now go ahead and try to surfing to the said directory. http://localhost/dax for my system.

Of course, we'll have some errors on the first try. Change permission and assign all groups (Owner, Group, and Others) to have Read/Write access to all the files. This might pose security risk but we need it.

Now try surfing to the Drupal installation page again.

Here's my setup. Database type is set to mysql, Database name is testing, and Database username is dax, and of course the password. This has been setup using MySQL Administrator (see above).

Click on the Advanced Options link to expand it. Database host is set to localhost, and Table prefix is set to dpl_. You may opt not to use a prefix, but if your database would use 2 or more CMS, then I suggest you use a prefix. We don't want other CMS overwriting tables used by Drupal.

Congratulations, it's all setup. Now we only need to remove Read/Write access to /sites/default/settings.php

This is the initial Home page. It's asking you to create an Administrator account. Do this right after setting up Drupal, if not, then anyone can just create an account and use your Drupal.

At first, Drupal would assign you a random password, go ahead and change it.

After this, go to your Administrator's page and check on the Status Report.

According to this page, I have 2 problems.

Fix the Cron Maintenance Tasks by clicking on run cron manually.

Fix the File System problem by changing the directory's permission to Read/Write. Do take note the at first, this directory is owned by www-data. You have to issue the Chown command to change it's ownership before you can change its permission.

Also make sure you create a tmp directory. This is where all uploaded files would initially stay.

Check the Status Report again to check for any errors or problems.

All set. Now create a page and promote it to front page. This is required to remove the setup instructions which poses, again, security risks.

Now you can configure your site.You can change the theme, add modules, build your site. etc. from the Administer page.


Blogged with Flock