Building a Ubuntu 8.10 Drupal Virtual Appliance
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 editorYou can now shut down the VM with ACPI Powerbutton event in GUI or use:
sudo shutdown -r 0Add 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 onYou 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-mysqlNow 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 passwdenter the same password
sudo mc -e /etc/postgresql/8.3/main/postgresql.confChange the line
#listen_addresses = 'localhost'to
listen_addresses = '*'and also change the line
#password_encryption = onto
password_encryption = onnow do
sudo mc -e /etc/postgresql/8.3/main/pg_hba.confcomment 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] md5restart the servers
sudo /etc/init.d/postgresql-8.3 restart
sudo /etc/init.d/apache2 restartlets make apache clean-url compatible
sudo a2enmod rewrite
sudo mc -e /etc/apache2/sites-available/defaultchange 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 restartEnable the root account - Switch to root and create a root password:
sudo su
passwdYou 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
Popular content