How to install Drupal 7 on ubuntu
June 26, 2012 in CMS
How to install Drupal 7 on Ubuntu Part 5:
Create database and install Drupal
Now everything is ok and we can start installing Drupal.
Open a browser and navigate to “http://localhost/drupal“, you can now see the first page of drupal installation. Before we continue we have to create a database so Drupal can save your site contents. To do that, open a new browser and navigate to “http://localhost/phpmyadmin“. You should now be able to see PhpMyAdmin login page. For username enter “root” and for password enter (the password you selected when we install PhpMyAdmin).
Ok now we are ready to create a new empty database:
Click on “Databases” and then under the “Create new Database” type a name for the database and click Create. you should get a message telling you that database has been created.
Go back to Drupal installation browser and click from “Select an installation profile” “Standard”. Click “Save and continue”
Next choose language and click “Save and continue”
On the next step you may find some “Requirements problems”. DON’T PANIC!!!!! those are just permissions problems. Let’s fix them. open a terminal and type:
sudo chmod 777 /var/www/drupal/sites/default
sudo cp /var/www/drupal/sites/default/default.settings.php /var/www/drupal/sites/default/settings.php
sudo chmod 777 /var/www/drupal/sites/default/settings.php
Now go back to Drupal installation page and refresh the page. If all was ok you should now see “Database configuration”
Database Name: (the name you enter when you create the database with PhpMyAdmin)
Database username: “root”
Password: (the password you enter for MySQL root user when you were installing lamp)
Click “Save and continue”
Now write info’s about your site
Site name: Choose a name for your site
Site e-mail address: Give your email here
Username: Create a username for the administrator of this site
E-mail address: Administrators email adreess goes here (you have the same as Site e-mail address )
Password: A password for administrator
Default country: Choose a country
Default time zone: Choose a time zone
Click “Save and continue”
Now you are done enjoy your new Drupal website
Here is a Bash script to make your life easier.
Important!!!RUN THIS SCRIPT AT YOUR OWN RISK!!!
# This is an installation of Drupal from a clean Ubuntu O.S.
echo “This is script for lazy boys and girls from allaboutlinux.eu”
echo “Use this script only if you have a clean installation of Ubuntu”
echo “More can be found at allaboutlinux.eu”
echo “Note allaboutlinux.eu has no responsibility run this script at your own risk!!!!”
echo “Please write the version of drupal you want to install ex:’7.14′”
echo “NOTE! Must be a valid version!!!”
read VER
cd ~/Downloads
wget http://ftp.drupal.org/files/projects/drupal-$VER.tar.gz
echo “WRITE YOUR PASSWORD AND HIT ENTER”
sudo apt-get update
sudo apt-get install tasksel -y
sudo tasksel install lamp-server
sudo apt-get install phpmyadmin -y
sudo cp drupal-$VER.tar.gz /var/www
cd /var/www/
sudo tar -xvf drupal-$VER.tar.gz
sudo mv drupal-$VER /var/www/drupal
sudo chmod 777 /var/www/drupal/sites/default
sudo cp /var/www/drupal/sites/default/default.settings.php /var/www/drupal/sites/default/settings.php
sudo chmod 777 /var/www/drupal/sites/default/settings.php
firefox http://localhost/drupal
firefox http://localhost/phpmyadmin
You can also download it from here
Here is a video tutorial using the script
Thank-you for the tutorial, the video and the script. It went almost without glitches. I have now my first drupal website sitting on my laptop! Youhou!