western willow ventures inc.

eye on the net
  • Home
  • Contact
  • Web
  • Graphics
  • ARDi
  • Samples
  • Terms of Service
  • Fun
  • Privacy

Search

Home | Blogs | Franco's blog

Building a Ubuntu 8.10 Drupal Virtual Appliance

Sun, 2009-06-21 01:05 |  Franco

Download and install VirtualBox - http://www.virtualbox.org/wiki/Downloads
Start with Ubuntu server 8.10 cdrom in the drive (or ISO) - http://www.ubuntu.com/getubuntu/download-server
Create a new Vbox VM Ram to 512, disable floppy, enable cdrom passthrough, turn on PAE/NX
set vrdp to on, accept the default port
set network to bridged and choose a working NIC/Wireless in your host.
on boot choose minimal virtual machine (f4)
on install turn on Postgresql, LAMP, Tomcat and OpenSSH
After boot:
Choose install Guest Additions in the Vbox Gui for the VM
then on the vm:

sudo apt-get install mc build-essential linux-headers-`uname -r` acpid unzip php5-pgsql php5-gd
mount /dev/cdrom
cd /media/cdrom
sudo ./VBoxLinuxAdditions-x86.run
sudo update-alternatives --config editor

You can now shut down the VM with ACPI Powerbutton event in GUI or use:

sudo shutdown -r 0

Add the Virtualbox program folder to the path on windows
You can now start the VM headless from a command prompt with :

VBoxHeadless -s name_of_your_vm -v on

You can now connect to your VM with:
Putty - http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
WinSCP - http://winscp.net/eng/download.php
Windows Remote Desktop - START>>PROGRAMS>>ACCESSORIES

log in with putty

lets remove mysql:

sudo apt-get remove mysql-server mysql-client php5-mysql

Now lets set up postgres
sudo su postgres -c psql template1
ALTER USER postgres WITH PASSWORD 'passwordofyourchoice';
\q
sudo passwd -d postgres
sudo su postgres -c passwd

enter the same password
sudo mc -e /etc/postgresql/8.3/main/postgresql.conf

Change the line

#listen_addresses = 'localhost'

to
listen_addresses = '*'

and also change the line

#password_encryption = on

to
password_encryption = on

now do
sudo mc -e /etc/postgresql/8.3/main/pg_hba.conf

comment out all active lines and add the following, then customize last line
#----------------------------------------------------------------
# If you change this first entry you will need to make sure that the
# database
# super user can access the database using some other method.
# Noninteractive
# access to all databases is required during automatic maintenance
# (autovacuum, daily cronjob, replication, and similar tasks).
#
# Database administrative login by UNIX sockets
local all postgres ident sameuser
# TYPE DATABASE USER CIDR-ADDRESS METHOD

# “local” is for Unix domain socket connections only
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5

# Connections for all PCs on the subnet
#
# TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
host all all [ip address] [subnet mask] md5

restart the servers

sudo /etc/init.d/postgresql-8.3 restart
sudo /etc/init.d/apache2 restart

lets make apache clean-url compatible

sudo  a2enmod rewrite
sudo mc -e /etc/apache2/sites-available/default

change this:
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>

    <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

to this:

        <Directory />
                Options FollowSymLinks
                AllowOverride All
        </Directory>

   <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>

restart apache

sudo /etc/init.d/apache2 restart

Enable the root account - Switch to root and create a root password:

sudo su
passwd

You can now connect to postgres remotely with PG Admin III and create the drupal database in UTF8
You can also now connect to the VM with WinSCP as root and install the drupal files in /var/www
Add modules and themes
Create settings.php make it writable
create /sites/default/files and make it writable

You can now enable clean URLs in Drupal
Essential Drupal Theme: Rootcandy as an admin theme
Essential Drupal Modules (Should be included in every drupal deployment even if not enabled)

  • Views - http://drupal.org/project/views
  • Rules - http://drupal.org/project/rules
  • Admin Role - http://drupal.org/project/adminrole
  • CCK- http://drupal.org/project/cck
  • Calendar - http://drupal.org/project/calendar
  • Date - http://drupal.org/project/date
  • Devel - http://drupal.org/project/devel
  • Content taxonomy - http://drupal.org/project/content_taxonomy
Franco's blog |  Login to post comments |  358 reads |  Tags: drupal, ubuntu, virtualbox

Popular content

Today's:

  • Contact
  • Animation
  • Raven Lovers

All time:

  • Contact
  • Web
  • ARDi - Aerial Research Drone One

Last viewed:

  • ARDi - Aerial Research Drone one
  • Blues Rockin' Daddyz - Thrill of the Chase
  • Recursive search for files with specific content using GREP

Navigation

  • Login
  • Album photos
  • Contact form
  • Feed aggregator
© 2010 Western Willow Ventures Inc.

Designed by Heidi Selzler.