Skip to content

Instantly share code, notes, and snippets.

@dnfehren
Created July 31, 2012 16:52
Show Gist options
  • Save dnfehren/3218398 to your computer and use it in GitHub Desktop.
Save dnfehren/3218398 to your computer and use it in GitHub Desktop.
Panda Project install notes, not really a shell script
#####
#
# After VM is created, before startup
#
#####
###
# Port forwarding for windows host
###
#On host for portforwarding
#VBoxManage.exe modifyvm "data_0" --natpf1 "Guestssg,tcp,,2222,,22"
#VBoxManage.exe modifyvm "data_0" --natpf1 "Guesthttp,tcp,,8080,,80"
#VBoxManage.exe modifyvm "data_0" --natpf1 "Guestdjango,tcp,,8000,,8888"
#VBoxManage.exe modifyvm "data_0" --natpf1 "Guestsolr,tcp,,9999,,9000"
############################
#
# With a running VM
#
############################
###
# Prep with basic dependencies, panda requirements wont work without these
###
#set up remote access
sudo apt-get install openssh-server openssh-client
#configure postgres, see install_and_run_postgres.sh file
# prep for install
sudo apt-get install build-essential
sudo apt-get install python-setuptools python-dev python-virtualenv
sudo apt-get install postgresql-server-dev-9.1
sudo apt-get install git mercurial
sudo apt-get install libxml2-dev libxslt-dev
sudo easy_install pip
sudo pip install virtualenvwrapper
#configure virtualenv wrapper
#http://www.doughellmann.com/docs/virtualenvwrapper/install.html#shell-startup-file
vim ~/.bashrc
#add line export WORKON_HOME=$HOME/.virtualenvs
#add line export PROJECT_HOME=$HOME/Devel
#add line source /usr/local/bin/virtualenvwrapper.sh
mkdir Devel
source .bashrc
###
# Actual panda installation
###
#get the project files and set up the environment
git clone git://github.com/pandaproject/panda.git
cd panda
mkvirtualenv --no-site-packages panda
workon panda
#start the installation script
pip install -r requirements.txt #fix errors when they come up
# Create log directory
sudo mkdir /var/log/panda
sudo chown $USER /var/log/panda
# Create data directories
mkdir /tmp/panda
mkdir /tmp/panda_exports
# Create the postgres user for panda and database then connect with the app
# Enter "panda" when prompted for password
createuser -d -R -S -P panda
createdb -O panda panda
python manage.py syncdb --noinput
python manage.py migrate --noinput
python manage.py loaddata panda/fixtures/init_panda.json
###
# Running panda
###
# to start PANDA
python manage.py runserver 0.0.0.0:8888
# IN NEW TERM
# Start the task queue
workon panda
python manage.py celeryd
# IN NEW TERM
# Run a local email server
workon panda
fab local_email
###
# java and solr installation
###
#install solr
sudo apt-get install openjdk-7-jdk
sudo apt-get install jetty solr-jetty
#configure jetty server
sudo vim /etc/default/jetty
#change
# NO_START to 0
# JETTY_HOST to 0.0.0.0
# JETTY_PORT to 9000
# JDK_DIRS to /usr/lib/jvm/java-1.7.0-openjdk-i386
sudo service jetty restart
#try at http://127.0.0.1:9999/solr/
#upgrade solr?
#http://stackoverflow.com/questions/6425759/how-to-upgrade-update-the-solr-jetty-ubuntu-package
#http://serverfault.com/questions/377240/solr-3-with-jetty-and-ubuntu-11-10
#http://docs.codehaus.org/display/JETTY/Jetty+Documentation
#https://github.com/gagarine/solr-install
#http://www.lucidimagination.com/blog/2011/08/10/running-solr-as-a-service-on-linux/
#http://smarden.org/runit/
#wget http://www.eng.lsu.edu/mirrors/apache/lucene/solr/3.5.0/apache-solr-3.5.0-src.tgz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment