Installation of Drupal 7 on Ubuntu 12 lts, apache2, php, mysql and phpmyadmin

iKnow-IT banner

This video shows the installation of apache2, php, mysql, phpmyadmin and Drupal 7 on Ubuntu 12 lts.

 $ sudo su -

1.    # apt-get install apache2

now we can test if apache 
       test your site http://localhost/

# apt-get install php5 libapache2-mod-php5  (-y)
       # /etc/init.d/apache2 restart
       # vi /var/www/testphp.php
      add the following line to this file:    <?php phpinfo(); ?>
       test your site: http://localhost/testphp.php

2.   #  apt-get install mysql-server

3.   # apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin  (-y)
               select apache2 !!!!! (with space bar)
               3x <pwd>
       # vi /etc/php5/apache2/php.ini
       Change this line:
               To look like this:
Create file /etc/apache2/httpd.conf
insert the line: ServerName localhost
       # /etc/init.d/apache2 restart

4. mysql -u root -p

Enter password: ....
mysql>create database drupal;
mysql> create user 'jasper'@'localhost';
mysql> update mysql.user set password=password('geheim') where user='jasper';
mysql> grant all privileges on drupal.* to 'jasper'@'localhost';
mysql> flush privileges;
mysql> show grants for 'jasper'@'localhost';
mysql> exit



Download&Extend   tab

Download Drupal 7.23 (latest version)


cp drupal-7.23.tar.gz /var/www
cd /var/www
tar xzvf drupal-7.23.tar.gz
mv drupal-7.23  jasper
chown -R www-data.www-data jasper


cd /etc/apache2/sites-available
cp default <SITENAME>
Edit the file to look like this (the changes are in bold).

       <VirtualHost *:8001>

       ServerAdmin webmaster@localhost
       ServerName <SITENAME>

       DocumentRoot /volume1/web/<SITENAME>
       <Directory />
               Options FollowSymLinks
               AllowOverride None
       <Directory /volume1/web/<SITENAME>>
               Options Indexes FollowSymLinks MultiViews
               AllowOverride All
               Order allow,deny
               allow from all


$ sudo a2ensite <SITENAME>               

$ sudo /etc/init.d/apache2 reload


If you use another as port 80 you can add the port to the ports.conf file

NameVirtualHost *:80
Listen 80
NameVirtualHost *:8001
Listen 8001

sudo vi /etc/apache2/ports.conf

sudo a2enmod vhost_alias rewrite

sudo /etc/init.d/apache2 reload