Skip to content

Instantly share code, notes, and snippets.

@bitprophet
Created March 5, 2009 17:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bitprophet/74450 to your computer and use it in GitHub Desktop.
Save bitprophet/74450 to your computer and use it in GitHub Desktop.
(taken from a Trac wiki page; stuff below these two paragraphs is the actual script)
In general, needs Apache 2.0+, mod_wsgi 2.3+, Python 2.5+, MySQL 5.0+. Also needs some Bash stuff for virtualenvwrapper to correctly put stuff into /opt/envs and for some aliases/non-sudo commands used below -- see Jeff's dotfile Github repo for the .bashrc.
Might need attached mod-wsgi .deb if version in APT is not 2.3
--
USER=jforcier
aptitude install libapache2-mod-wsgi mysql-server libmysqlclient-dev python-setuptools
sudo easy_install virtualenv virtualenvwrapper
VIRTUALENVS=/opt/envs
sudo mkdir $VIRTUALENVS
sudo chown $USER:$USER VIRTUALENVS
mkvirtualenv readyroom # should immediately activate the env for you and change your prompt
# This below will ensure that `workon readyroom` moves one to the project
# git/svn checkout.
PROJECTS=/srv/django
RR=$PROJECTS/readyroom
echo "cd $RR" > $VIRTUALENVS/readyroom/bin/postactivate
sudo mkdir -p $PROJECTS
sudo chown $USER:$USER $PROJECTS
cd $PROJECTS
git svn clone -s https://svn/dp/readyroom
cd readyroom
pip install -r requirements.txt
sudo ln -s $RR/apache.conf /etc/apache2/sites-available/readyroom
mysqladmin -u root -p create readyroom
echo "GRANT ALL PRIVILEGES ON readyroom.* TO 'readyroom'@'localhost' IDENTIFIED BY '<password>'" | mysql -u root -p
./manage.py syncdb # or copy DB from another install
rap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment