Skip to content
Florian N edited this page Feb 8, 2014 · 20 revisions

1. Installation

Decide what webserver you want to use on your server. You can use any webserver that can serve python files. For this how to i will be going over the following webservers: Apache, Nginx and Django internal dev server. By default the install will be done using the Apache webserver.

Fedora

Run:

sudo yum -y install git python-pip httpd

Centos

Centos 6

Run:

sudo yum -y install http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

sudo yum -y install git python-pip httpd

Centos 5

Run:

sudo yum -y install http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

sudo yum -y install git python-pip httpd

Debian & Ubuntu

Run:

sudo apt-get install git python-pip apache2 libapache2-mod-wsgi

2. Setup

Run:

 cd /var/www
 git clone https://github.com/k3oni/pydash
 chown -R apache.apache pydash   - For Centos & Fedora
 chown -R www-data.www-data pydash   - For Ubuntu & Debian
 cd pydash
 sudo pip install -r requirements.txt
 ./manage.py syncdb

Enter the user information, to create your login user:

 You just installed Django's auth system, which means you don't have any superusers defined.
 Would you like to create one now? (yes/no): yes
 Username (leave blank to use 'root'): admin (Enter your desired username)
 Email address: xxxxx@xxxxxx.xxx (Enter your email address)
 Password: xxxxx (Enter your desired password)
 Password (again): xxxxx (Enter your password again)

3. Setup Apache

Centos & Fedora

Add the config pydash.conf file under /etc/httpd/conf.d/:

 WSGISocketPrefix run/wsgi
   <VirtualHost *:80>
     ServerAdmin webmaster@dummy-host.example.com
     ServerName dummy-host.example.com

     WSGIDaemonProcess pydash display-name=%{GROUP} python-path=/var/www/pydash
     WSGIProcessGroup pydash
     WSGIScriptAlias / /var/www/pydash/pydash/wsgi.py

     Alias /static /var/www/pydash/static/
     Alias /media /var/www/pydash/media/

     <Directory /var/www/pydash/pydash>
         <Files wsgi.py>
             Order deny,allow
             Allow from all
         </Files>
     </Directory>

     #CustomLog logs/pydash-access_log common
     #ErrorLog logs/pydash-error_log
 </VirtualHost> 

Start the webserver:

 service httpd start

Debian & Ubuntu

Add the config pydash.conf file under /etc/apache2/conf.d:

 WSGISocketPrefix /var/run/apache2/wsgi
   <VirtualHost *:80>
     ServerAdmin webmaster@dummy-host.example.com
     ServerName dummy-host.example.com

     WSGIDaemonProcess pydash display-name=%{GROUP} python-path=/var/www/pydash
     WSGIProcessGroup pydash
     WSGIScriptAlias / /var/www/pydash/pydash/wsgi.py

     Alias /static /var/www/pydash/static/
     Alias /media /var/www/pydash/media/

     <Directory /var/www/pydash/pydash>
         <Files wsgi.py>
             Order deny,allow
             Allow from all
         </Files>
     </Directory>

     #CustomLog logs/pydash-access_log common
     #ErrorLog logs/pydash-error_log
 </VirtualHost> 

Start the webserver

 service apache2 start
Clone this wiki locally