Skip to content

Instantly share code, notes, and snippets.

@markshust
Created July 7, 2012 11:11
Show Gist options
  • Save markshust/3065928 to your computer and use it in GitHub Desktop.
Save markshust/3065928 to your computer and use it in GitHub Desktop.
install django with postgres support on mac lion running zend server
sudo easy_install pip
sudo pip install django
sudo pip install django-extensions
# postgres support
sudo pip install psycopg2
# on mountain lion, edit postgres conf file for custom socket
sudo vi /usr/local/var/postgres/postgresql.conf
# update unix_socket_directory
unix_socket_directory = '/var/pgsql_socket/'
# mkdir and reset permissions on new socket dir
sudo mkdir /var/pgsql_socket
chmod -R 777 /var/pgsql_socket
# test postgres connection
psql -U username -W database
# and add apache module to zend server
curl -o mod_wsgi-3.3.tar.gz http://modwsgi.googlecode.com/files/mod_wsgi-3.3.tar.gz
tar xzf mod_wsgi-3.3.tar.gz
cd mod_wsgi-3.3
./configure --with-apxs=/usr/local/zend/apache2/bin/apxs --disable-framework
make
sudo make install
sudo vi /usr/local/zend/apache2/conf/httpd.conf
#add to list of loaded modules
LoadModule wsgi_module /usr/local/zend/apache2/modules/mod_wsgi.so
#time timezone support
sudo pip install pytz
#requirements for tastypie
sudo pip install mimeparse
sudo pip install lxml
sudo pip install django-tastypie
#make db updates easy
sudo easy_install South
#authorize.net support
sudo pip install django-authorizenet
#or
sudo easy_install quix.pay
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment