7 Assuming a clean debian squeeze (stable) installation, use the following steps to run the software.
11 apt-get install git python-django python-setuptools python-sphinx
12 apt-get install python-sqlalchemy python-mysqldb python-psycopg2
13 apt-get install apache2 libapache2-mod-wsgi
18 git clone https://code.grnet.gr/git/pithos
20 Setup the files (choose where to store data in ``settings.py`` and change ``SECRET_KEY``)::
23 cp settings.py.dist settings.py
24 python manage.py syncdb
26 python setup.py build_sphinx
28 Edit ``/etc/apache2/sites-available/pithos`` (change the ``ServerName`` directive)::
31 ServerAdmin webmaster@pithos.dev.grnet.gr
32 ServerName pithos.dev.grnet.gr
34 DocumentRoot /pithos/htdocs
35 Alias /ui "/var/www/pithos_web_client"
36 Alias /docs "/pithos/docs/build/html"
39 Options Indexes FollowSymLinks
46 RewriteRule ^/v(.*) /api/v$1 [PT]
47 RewriteRule ^/public(.*) /api/public$1 [PT]
48 RewriteRule ^/login(.*) https://%{HTTP_HOST}%{REQUEST_URI}
49 RewriteRule ^/admin(.*) https://%{HTTP_HOST}%{REQUEST_URI}
51 WSGIScriptAlias /api /pithos/pithos/wsgi/pithos.wsgi
52 # WSGIDaemonProcess pithos
53 # WSGIProcessGroup pithos
56 ErrorLog ${APACHE_LOG_DIR}/pithos.error.log
57 CustomLog ${APACHE_LOG_DIR}/pithos.access.log combined
60 Edit ``/etc/apache2/sites-available/pithos-ssl`` (assuming files in ``/etc/ssl/private/pithos.dev.grnet.gr.key`` and ``/etc/ssl/certs/pithos.dev.grnet.gr.crt`` - change the ``ServerName`` directive)::
63 <VirtualHost _default_:443>
64 ServerAdmin webmaster@pithos.dev.grnet.gr
65 ServerName pithos.dev.grnet.gr
67 DocumentRoot /pithos/htdocs
68 Alias /ui "/var/www/pithos_web_client"
69 Alias /docs "/pithos/docs/build/html"
72 Options Indexes FollowSymLinks
79 RewriteRule ^/v(.*) /api/v$1 [PT]
80 RewriteRule ^/public(.*) /api/public$1 [PT]
81 RewriteRule ^/login(.*) /api/login$1 [PT]
82 RewriteRule ^/admin(.*) /api/admin$1 [PT]
84 WSGIScriptAlias /api /pithos/pithos/wsgi/pithos.wsgi
85 # WSGIDaemonProcess pithos
86 # WSGIProcessGroup pithos
88 ShibConfig /etc/shibboleth/shibboleth2.xml
89 Alias /shibboleth-sp /usr/share/shibboleth
99 ErrorLog ${APACHE_LOG_DIR}/pithos.error.log
100 CustomLog ${APACHE_LOG_DIR}/pithos.access.log combined
103 SSLCertificateFile /etc/ssl/certs/pithos.dev.grnet.gr.crt
104 SSLCertificateKeyFile /etc/ssl/private/pithos.dev.grnet.gr.key
108 Add in ``/etc/apache2/mods-available/wsgi.conf``::
110 WSGIChunkedRequest On
112 Configure and run apache::
119 mkdir /var/www/pithos
120 mkdir /var/www/pithos_web_client
121 /etc/init.d/apache2 restart
123 Useful alias to add in ``~/.bashrc``::
125 alias pithos-sync='cd /pithos && git pull && python setup.py build_sphinx && /etc/init.d/apache2 restart'
132 apt-get install libapache2-mod-shib2
134 Setup the files in ``/etc/shibboleth``.
136 Add in ``/etc/apache2/sites-available/pithos-ssl``::
138 ShibConfig /etc/shibboleth/shibboleth2.xml
139 Alias /shibboleth-sp /usr/share/shibboleth
141 <Location /api/login>
143 ShibRequireSession On
148 Configure and run apache::
151 /etc/init.d/apache2 restart
152 /etc/init.d/shibd restart
157 If using MySQL instead of SQLite for the database engine, consider the following.
161 apt-get install mysql-server
163 Add in ``/etc/mysql/conf.d/pithos.cnf``::
166 sql-mode="NO_AUTO_VALUE_ON_ZERO"
168 Edit ``/etc/mysql/my.cnf`` to allow network connections and restart the server.
170 Create database and user::
172 CREATE DATABASE pithos CHARACTER SET utf8 COLLATE utf8_bin;
173 GRANT ALL ON pithos.* TO pithos@localhost IDENTIFIED BY 'password';
174 GRANT ALL ON pithos.* TO pithos@'%' IDENTIFIED BY 'password';
178 apt-get install mysql-client
180 It helps to create a ``~/.my.cnf`` file, for automatically connecting to the server::
184 password = 'password'
185 host = pithos-storage.dev.grnet.gr
193 If using PostgreSQL instead of SQLite for the database engine, consider the following.
197 apt-get install postgresql
199 Edit ``/etc/postgresql/8.4/main/postgresql.conf`` and ``/etc/postgresql/8.4/main/pg_hba.conf`` to allow network connections and restart the server.
201 Create database and user::
203 CREATE DATABASE pithos WITH ENCODING 'UTF8' LC_COLLATE='C' LC_CTYPE='C' TEMPLATE=template0;
204 CREATE USER pithos WITH PASSWORD 'password';
205 GRANT ALL PRIVILEGES ON DATABASE pithos TO pithos;
209 apt-get install postgresql-client
211 It helps to create a ``~/.pgpass`` file, for automatically passing the password to the server::
213 pithos-storage.dev.grnet.gr:5432:pithos:pithos:password
217 psql -h pithos-storage.dev.grnet.gr -U pithos