-
Notifications
You must be signed in to change notification settings - Fork 50
Setting up an ec2 ubuntu map server
-
Log in at console.aws.amazon.com
-
Go to alestic.com and choose Ubuntu 11.10 Oneiric EBS boot (us-east-1)
-
Choose instance type Medium and availability zone us-east-1d.
-
Choose your keypair.
-
Create a security group called [clientname]. Open ports: 80, 22, 443, and 8133.
-
Launch your instance
-
Log into the server with:
ssh -i your-keypair-full-path ubuntu@public-dns
-
sudo apt-get update
-
sudo apt-get upgrade --fix-missing
-
sudo apt-get install git --fix-missing
-
Get package tools
sudo apt-get install python-pip
-
sudo apt-get update
-
Go to https://github.com/mapnik/mapnik/wiki/UbuntuInstallation
To install the stable version of Mapnik 2.x: sudo add-apt-repository ppa:mapnik/nightly-2.1 sudo apt-get update sudo apt-get install libmapnik mapnik-utils python-mapnik
-
Get TileStache set up:
sudo easy_install -U gunicorn sudo apt-get install python-imaging sudo pip install -U modestmaps sudo pip install -U tilestache sudo pip install -U cssutils sudo pip install -U cascadenik sudo apt-get install python-psycopg2 python-shapely
-
sudo apt-get install postgresql-9.1 postgresql-server-dev-9.1 postgresql-contrib-9.1 postgresql-9.1-postgis
-
CONFIGURE THE POSTGRES DATABASE:
Test you can log in to the database with:
sudo -u postgres psql
Background reading: https://help.ubuntu.com/11.10/serverguide/C/postgresql.html
Edit the access permissions (or pico)
sudo vim /etc/postgresql/9.1/main/pg_hba.conf
Made this section all have
trust
at the line ends:# Database administrative login by Unix domain socket local all postgres trust # TYPE DATABASE USER ADDRESS METHOD # "local" is for Unix domain socket connections only local all all trust # IPv4 local connections: host all all 127.0.0.1/32 trust # IPv6 local connections: host all all ::1/128 trust # Allow replication connections from localhost, by a user with the
Then restart Postgrest so that takes effect:
sudo /etc/init.d/postgresql restart
-
Set up your PostGIS template
Read: https://github.com/nvkelso/geo-how-to/wiki/PostGIS
Alternatively: http://wygoda.net/blog/postgis-template-database-ubuntu-1110/
-
sudo apt-get install apache2-mpm-prefork
-
sudo a2enmod userdir
Note: "a2enmod" == "apache2 enable module"
-
Make sure you have a public_html dir inside your usr dir.