Installing Drupal on Ubuntu Dapper

Although Synaptic has a drupal, it's very old!


To go with the latest version, I first went with the pre-fork Apache 2, PHP 5 and MySQL 5.

Downloading Drupal

I then downloaded the latest stable drupal version (since I am interested in developing a software engineering platform and personal development environment capable of being moved to a shared hosting environment).

$ wget
=> `drupal-4.7.3.tar.gz'
Connecting to||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 484,988 (474K) [application/x-gzip]

484,988 81.56K/s ETA 00:00

17:22:24 (76.13 KB/s) - `drupal-4.7.3.tar.gz' saved [484988/484988]

Installing the files for Apache 2

I then copied everything into (in this case) /var/www/drupal-4.7.3, then made the symbolic link (see Drupal Clean URL's on Ubuntu Dapper Laughing ):

# ln -s drupal-4.7.3 drupal 

The ./drupal/INSTALL.txt suggests a simpler, more straightforward way, but I want the symbolic link so as to be able to update my installations more painlessly.

Drupal database creation and preparation

Next step, following right along with the INSTALL.txt guidelines, is to create and prepare the drupal database, which can be done in phpmyadmin or other gui; in this case we'll do it from the command line, as per instructions in INSTALL.mysql.txt, both for creating the drupal database and user, and for loading the required tables and data using the appropriate sql script (the one marked 4.1 (for 4.1 and higher, as in my case)).

After using the command line, it didn't hurt to use phpmyadmin just to have a look see and make sureLaughing.

Next, I updated the sites/default/settings.php file with the database connection info, as per INSTALL.txt.

Additional configuration tasks

Create a "files" subdirectory (for uploaded media, etc.) readable and writeable by the server process (which in my case is the Apache 2 current default "www-data".

root@mentor:/var/www/drupal# mkdir files
root@mentor:/var/www/drupal# chown www-data:www-data files

We can now point our browser to our local development environment drupal installation: http://localhost/drupal

Create non-first user admin

By default, the first user created (we'll call it "owner") has all rights and privileges; it should not be used on a day-to-day basis, any more than one would use "root" on a system. So we create an admin role and user, and give all rights and privileges to that new day-to-day admin user.

First I headed over to adminster » users » add user, and created my new user.

Second, I went to administer » access control » roles, created an admin role; and then over to administer » access control » permissions, and checked on all permissions to role admin.

We have now installed drupal on our Ubuntu Dapper local development wonderbox.

Logged in as my new admin user, I am now ready to use my brand-new drupal site.