Install Postgres and Postgis
sudo apt-get install postgresql-9.1 pgadmin3 postgresql-contrib postgis postgresql-9.1-postgis
Set password for user Postgres
sudo su postgres
psql
\password postgres
\q
sudo su postgres
psql -c "create role gisgroup;"
createdb -E UTF8 template_postgis
createlang -d template_postgis plpgsql
psql -d template_postgis < /usr/share/postgresql/9.1/contrib/postgis-1.5/postgis.sql
psql -d template_postgis < /usr/share/postgresql/9.1/contrib/postgis-1.5/spatial_ref_sys.sql
psql -c "alter table geometry_columns owner to gisgroup;" template_postgis
psql -c "alter table spatial_ref_sys owner to gisgroup;" template_postgis
psql -c "create user usernamewhatever with password 'itsasecret';"
psql -c "grant gisgroup to usernamewhatever;”
createdb -T template_postgis -O usernamewhatever yourdbname
sudo apt-get install osm2pgsql
cd /usr/share
sudo wget http://svn.openstreetmap.org/applications/utils/export/osm2pgsql/default.style
Import australia.osm into postgis
osm2pgsql -H 'localhost' -d 'yourdbname' -U 'usernamewhatever' -W australia.osm
Install Mapnik2 from source
Gist
svn export http://svn.openstreetmap.org/applications/rendering/mapnik
Download World Boundaries
cd mapnik
wget http://tile.openstreetmap.org/world_boundaries-spherical.tgz # (50 MB)
wget http://tile.openstreetmap.org/processed_p.tar.bz2 # (357 MB)
wget http://tile.openstreetmap.org/shoreline_300.tar.bz2 # (46 MB)
wget http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/10m-populated-places.zip # (1.5 MB)
wget http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/cultural/110m-admin-0-boundary-lines.zip # (38 KB)
tar xzf world_boundaries-spherical.tgz
tar xjf processed_p.tar.bz2 -C world_boundaries
tar xjf shoreline_300.tar.bz2 -C world_boundaries
unzip 10m-populated-places.zip -d world_boundaries
unzip 110m-admin-0-boundary-lines.zip -d world_boundaries
./generate_xml.py --host localhost --user 'usernamewhatever' --dbname 'yourdbname' --port 5432 --password 'itsasecret'