-
Notifications
You must be signed in to change notification settings - Fork 2
Server Setup of PhoneLab on Amazon Linux AMI
PhoneLab Server is a Django Powered app to help manage PhoneLab Testbed project.
sudo yum install mysql mysql-devel mysql-server python-devel gcc
Remember: This is required so that we can install the MySQL-Python Bindings.
service mysqld start
Download from Here
Note: Once MySQL-Python Bindings are successfully installed, you can remove MySQL Server
curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | sudo python
sudo easy_install South
vi ~/.bash_profile
export ENV=production
source ~/.bash_profile
Fabric is a Python (2.5 or higher) library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks. [http://fabfile.org]
sudo pip install fabric
fab production deploy or fab staging deploy
see fabfile.py for details
Gunicorn 'Green Unicorn' is a Python WSGI HTTP Server for UNIX. It's a pre-fork worker model ported from Ruby's Unicorn project. The Gunicorn server is broadly compatible with various web frameworks, simply implemented, light on server resources, and fairly speedy. [http://gunicorn.org/]
sudo pip install gunicorn
INSTALLED_APPS += ("gunicorn",)
Nginx acts as our reverse proxy webserver.
sudo yum install nginx
sudo service nginx start
sudo service nginx stop
sudo service nginx restart
sudo vi /etc/nginx/nginx.conf
Install the init.sh file into /etc/init.d [Refer docs/init.sh] sudo chmod +x phonelab sudo chkconfig phonelab --add
/etc/init.d/phonelab start
/etc/init.d/phonelab stop
/etc/init.d/phonelab restart