Python Django Server Config

By Alvin Yeo

Create Virtual Server – CentOS 7.1
Update System – sudo yum update
Install Development Tools – sudo yum install python-devel mysql-devel
Install gcc – sudo yum install gcc
Install Web Server – sudo yum install httpd
Install mod_wsgi – sudo yum install mod_wsgi
Install MySQL – sudo yum install mariadb-server mariadb
Install wget – sudo yum install wget
Get PIP – sudo wget https://bootstrap.pypa.io/get-pip.py
Install PIP – sudo python get-pip.py
Install Django==1.8.2 – sudo pip install django==1.8.2
Install mysql-python – sudo pip install mysql-python
Install jpeg-lib – sudo yum install libjpeg-turbo-devel
Install JPEG encoder – sudo yum install –assumeyes libjpeg-devel
Install Pillow – sudo pip install pillow
Add vhost conf in /etc/httpd/conf.d/
Add django.wsgi in website root folder
Add epel-release – sudo yum install epel-release
Install nodejs – sudo yum install nodejs
Install npm – sudo yum install npm
Install bower – sudo npm install -g bower
Start/Restart httpd – sudo service httpd start/restart
Add upload permission – sudo chcon -t httpd_sys_rw_content_t
Add email permission – sudo setsebool -P httpd_can_sendmail 1

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s