Install a new drupal instance on Ubuntu (apache2, php and mysql already installed)

iKnow-IT banner

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

       <VirtualHost *:8066>
       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

       ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
       <Directory "/usr/lib/cgi-bin">
               AllowOverride None
               Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
               Order allow,deny
               Allow from all

       ErrorLog /var/log/apache2/error.log

       # Possible values include: debug, info, notice, warn, error, crit,
       # alert, emerg.
       LogLevel warn

       CustomLog /var/log/apache2/access.log combined

   Alias /doc/ "/usr/share/doc/"
   <Directory "/usr/share/doc/">
       Options Indexes MultiViews FollowSymLinks
       AllowOverride None
       Order deny,allow
       Deny from all
       Allow from ::1/128

       Note: The line that changes AllowOverride None to AllowOverride All is  required if you want to enable URL re-writes through a .htaccess file.
$ sudo a2ensite <SITENAME>                (change the row in)
      localhost site1

$ sudo /etc/init.d/apache2 reload

If you use another as port 80 you can add the port to the ports.conf file
NameVirtualHost *:8066
Listen 8066

$ sudo vi /etc/apache2/ports.conf

$ sudo a2enmod vhost_alias rewrite

$ sudo /etc/init.d/apache2 reload

$ cp drupal-7*.tar.gz /volume/web/<SITENAME>

$ cd /volume/web

$ gunzip drupal-7*.tar.gz

$ tar xvf drupal-7*.tar

$ cd drupal-7*

$ mv * ../<SITENAME>

$ mv .h* ../<SITENAME>

$ mv .g* ../<SITENAME>

$ cd ..

$ rmdir drupal-7*

from the browser:


create database e.q. drupal
 - select the "drupal" database
 - under this database create a new user account and password with all privileges
 - sign off (=>Exit)