sudo apt-get install postgresql-9.1-postgis
sudo su postgres
bash <(curl -s https://raw.github.com/gist/18660599/create_template.sh)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP USER testdb; | |
CREATE USER testdb; | |
ALTER DATABASE testdb OWNER to testdb; | |
CREATE TABLE companys ( | |
id SERIAL PRIMARY KEY, | |
name TEXT | |
); | |
CREATE TABLE users ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
#This will set up your machine for using django 1.4 | |
sudo add-apt-repository -y ppa:pitti/postgresql | |
sudo add-apt-repository -y ppa:git-core/ppa | |
sudo add-apt-repository -y ppa:bchesneau/gunicorn | |
sudo add-apt-repository -y ppa:nginx/stable | |
sudo add-apt-repository -y ppa:natecarlson/haproxy # For Load Balancing | |
sudo apt-get update -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
#This will set up your machine for using django 1.4 | |
sudo add-apt-repository -y ppa:pitti/postgresql | |
sudo add-apt-repository -y ppa:git-core/ppa | |
sudo add-apt-repository -y ppa:bchesneau/gunicorn | |
sudo add-apt-repository -y ppa:nginx/stable | |
sudo add-apt-repository -y ppa:natecarlson/haproxy # For Load Balancing | |
sudo apt-get update -y |