Drupal Association members fund grants that make connections all over the world.
Ubuntu's Drupal Package
There is a Drupal package in Ubuntu, so Drupal install on Ubuntu is just this line
sudo apt-get install drupal6
The Drupal libraries are placed in the file system, as used to be in Linux:
Most of the Drupal staff is here, the rest are symlinked to this directory, so it's the Drupal root directory
The /files directory
The .htacces, /sites and /profiles directories
A symlink is here, pointing to Drupal root (/usr/share/drupal6)
As this directory layout structure is not the recommended one from the Drupal community, use this install scenario just for testing Drupal, but please note: any updates will be difficult. See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=526970
Or use Drupal in virtual machines, and it's a quick way to get Drupal up and running.
Then - at the time of writing this post - some more steps are necessary to get Drupal running:
- enable the rewrite module and restart Apache:
- change the rewrite base in /etc/drupal/6/htaccess
- optional: increase PHP memory:
- optional: if you want to access Drupal over the network, then edit your DNS settings or add this line to /etc/hosts on your client:
- open your browser and start the install process of Drupal:
sudo a2enmod rewrite sudo /etc/init.d/apache2 restart
from this one:
# RewriteBase /drupal
sudo sed -i 's/# RewriteBase \/drupal/ RewriteBase \/drupal6/' /etc/drupal/6/htaccess
sudo sed -i 's/memory_limit = 16M/memory_limit = 64M/' /etc/php5/apache2/php.ini
sudo su echo "192.168.2.10 www.example.com" >> /etc/hosts
where change 192.168.2.10 to the IP address of your Drupal machine
XAMPP in Ubuntu
As an alternative to Ubuntu's Drupal package, you can also use XAMPP to run Drupal locally (which should allow you to do Drupal updates in the normal way).
- Download the latest XAMPP for Linux version from the XAMPP website.
- Follow the Ubuntu forum's directions on setting up XAMPP in Ubuntu for installing, starting, testing, file location, stopping, and closing the security holes.
- Download the latest version of Drupal from http://www.drupal.org. Place it into the /public_html directory that you created with the Ubuntu forum directions.
- From Ubuntu, open up the terminal (Applications>Accessories>Terminal). Go to the /public_html directory in the terminal:
- Unpack the Drupal archive:
tar xvfz drupal-6.15.tar.gz
Open up the /public_html folder in Ubuntu's graphic interface (Places>Home Folder, and browse to /public_html). Rename the unpacked “drupal-6.15” folder to “drupal”.
- If XAMPP is not already running, start it in terminal:
sudo /opt/lampp/lampp start
- Open up your web browser and go to
http://localhost/yourusername/drupal. An install screen should appear.
Note: At the time of writing, the PHP 5.3 in XAMPP was not compatible with Drupal 6 (although Drupal 7 will be), and this creates an error here, "
Deprecated: Function ereg() is deprecated in /home/username/public_html/drupal/includes/file.inc on line 902". If you have this problem, solutions are listed in the Drupal forums here and here.
As per these comments, you can fix this error by navigating to /public_html/drupal/ and editing Drupal's .htaccess file (you may have to select View>Show Hidden Files in Nautilus to see .htaccess if you are doing this graphically). Add in the line
php_value error_reporting 4096and save the file. Navigate into the public_html/drupal/sites/default folder and open default.settings.php.
ini_set('error_reporting', 4096);underneath all the other
ini_setentries in default.settings.php. Save, and navigate to
http://localhost/yourusername/drupalagain—it should now bring up the install screen.
- Click install, and follow the directions that Drupal gives you (copying /sites/default/settings.default.php to /sites/default/settings.php, then changing its Properties->Settings to allow read & write by others; and adding a /sites/default/files/ folder, also with read & write permissions for others).
- When the Drupal installer asks you for information on your database, create a database as per the directions in the basic install. If you prefer a graphical user interface, you can use phpmyadmin for the database creation instead.
Enter the details of the database into the Drupal installer, then continue with the installer's directions. Once the installer is done, you should be ready to use your Drupal site.
Note: If you find you cannot access phpmyadmin (
http://localhost/phpmyadmin) with your mysql root password after patching XAMPP's security, try logging in with your XAMPP pages username (lampp) and password first, and then entering your phpmyadmin username (root) and password (mysql root password) after that.
Additional post-installation note if you are creating a copy of a live site and putting it onto your local XAMPP install: After you create an export and import the live site's database into your local Drupal installation's database, you will need to run update.php (
http://localhost/yourusername/drupal/update.php) in order to make the local site work with the new database (plus transfer the modules, themes, and files too).