use markdown in readme

This commit is contained in:
j 2016-04-15 14:21:24 +02:00
parent b3df5b8d56
commit 27830d7c58

View file

@ -1,21 +1,23 @@
pan.do/ra - open media archive # pan.do/ra - open media archive
for more information on pan.do/ra visit our website at https://pan.do/ra for more information on pan.do/ra visit our website at https://pan.do/ra
== SETUP == ## SETUP
pan.do/ra is known to work with Ubuntu 14.04,
but other distributions should also work. pan.do/ra is known to work with Ubuntu 14.04,
The instructions below are for Ubuntu 14.04. but other distributions should also work.
All commans given expect that you are root. The instructions below are for Ubuntu 14.04.
All commans given expect that you are root.
To run pan.do/ra you need to install and setup:
To run pan.do/ra you need to install and setup:
python python
postgres postgres
nginx (or apache2) nginx (or apache2)
additinal video packages additinal video packages
=== Installing required packages === ## Installing required packages
1) add pandora ppa to get all packages in the required version 1) add pandora ppa to get all packages in the required version
@ -24,6 +26,7 @@ To run pan.do/ra you need to install and setup:
apt-get update apt-get update
2) install all required packages 2) install all required packages
apt-get install git subversion mercurial \ apt-get install git subversion mercurial \
python-setuptools python-pip python-virtualenv ipython \ python-setuptools python-pip python-virtualenv ipython \
python-dev python-imaging python-numpy python-psycopg2 \ python-dev python-imaging python-numpy python-psycopg2 \
@ -32,29 +35,34 @@ To run pan.do/ra you need to install and setup:
poppler-utils mkvtoolnix gpac imagemagick \ poppler-utils mkvtoolnix gpac imagemagick \
python-ox oxframe ffmpeg python-ox oxframe ffmpeg
=== Prepare Environment ===
## Prepare Environment
1) add pandora user and set permissions 1) add pandora user and set permissions
adduser pandora --disabled-login --disabled-password
adduser pandora --disabled-login --disabled-password
2) Setup Database 2) Setup Database
su postgres
createuser pandora su postgres
createdb -T template0 --locale=C --encoding=UTF8 -O pandora pandora createuser pandora
echo "CREATE EXTENSION pg_trgm;" | psql pandora createdb -T template0 --locale=C --encoding=UTF8 -O pandora pandora
exit echo "CREATE EXTENSION pg_trgm;" | psql pandora
exit
3) Setup RabbitMQ 3) Setup RabbitMQ
You have to use the same password here and in BROKER_URL in local_settings.py
You have to use the same password here and in BROKER_URL in local_settings.py
rabbitmqctl add_user pandora PASSWORD rabbitmqctl add_user pandora PASSWORD
rabbitmqctl add_vhost /pandora rabbitmqctl add_vhost /pandora
rabbitmqctl set_permissions -p /pandora pandora ".*" ".*" ".*" rabbitmqctl set_permissions -p /pandora pandora ".*" ".*" ".*"
=== Install Pan.do/ra === ## Install Pan.do/ra
1) Get code from git 1) Get code from git
cd /srv/ cd /srv/
git clone https://git.0x2620.org/pandora.git pandora git clone https://git.0x2620.org/pandora.git pandora
cd pandora cd pandora
@ -66,6 +74,7 @@ You have to use the same password here and in BROKER_URL in local_settings.py
2) create local_settings.py and config.jsonc 2) create local_settings.py and config.jsonc
2.1) create file /srv/pandora/pandora/local_settings.py with the following content: 2.1) create file /srv/pandora/pandora/local_settings.py with the following content:
DATABASES = { DATABASES = {
'default': { 'default': {
'NAME': 'pandora', 'NAME': 'pandora',
@ -84,13 +93,15 @@ You have to use the same password here and in BROKER_URL in local_settings.py
XACCELREDIRECT = True XACCELREDIRECT = True
2.2) create config.jsonc 2.2) create config.jsonc
config.jsonc holds the configuration for your site.
To start you can copy /srv/pandora/pandora/config.pandora.jsonc config.jsonc holds the configuration for your site.
to /srv/pandora/pandora/config.jsonc but have a look at To start you can copy /srv/pandora/pandora/config.pandora.jsonc
https://wiki.0x2620.org/wiki/pandora/configuration and to /srv/pandora/pandora/config.jsonc but have a look at
config.0xdb.jsonc config.padma.jsonc for configuration options. https://wiki.0x2620.org/wiki/pandora/configuration and
config.0xdb.jsonc config.padma.jsonc for configuration options.
3) initialize database 3) initialize database
su pandora su pandora
cd /srv/pandora/pandora cd /srv/pandora/pandora
./manage.py init_db ./manage.py init_db
@ -102,6 +113,7 @@ You have to use the same password here and in BROKER_URL in local_settings.py
5) Setup Webserver 5) Setup Webserver
a) nginx (recommended) a) nginx (recommended)
apt-get install nginx apt-get install nginx
cp /srv/pandora/etc/nginx/pandora /etc/nginx/sites-available/pandora cp /srv/pandora/etc/nginx/pandora /etc/nginx/sites-available/pandora
cd /etc/nginx/sites-enabled cd /etc/nginx/sites-enabled
@ -114,6 +126,7 @@ a) nginx (recommended)
service nginx reload service nginx reload
b) apache2 (if you need it for other sites on the same server) b) apache2 (if you need it for other sites on the same server)
apt-get install apache2-mpm-prefork libapache2-mod-xsendfile apt-get install apache2-mpm-prefork libapache2-mod-xsendfile
a2enmod xsendfile a2enmod xsendfile
a2enmod proxy_http a2enmod proxy_http
@ -127,26 +140,32 @@ b) apache2 (if you need it for other sites on the same server)
service apache2 reload service apache2 reload
Now you can open pandora in your browser, the first user to sign up will become admin. Now you can open pandora in your browser, the first user to sign up will become admin.
== Updating == ## Updating
To update pandora to the latest version run this:
su pandora
cd /srv/pandora
./update.py
this will update pandora/oxjs/python-ox and list possible upgrades to the db To update pandora to the latest version run this:
to update your database run: su pandora
su pandora cd /srv/pandora
cd /srv/pandora ./update.py
./update.py db
this will update pandora/oxjs/python-ox and list possible upgrades to the db
to update your database run:
su pandora
cd /srv/pandora
./update.py db
## Development
== Development ==
in one terminal: in one terminal:
./manage.py runserver 2620 ./manage.py runserver 2620
and background task in another: and background task in another:
./manage.py celeryd -B -Q celery,default,encoding -l INFO ./manage.py celeryd -B -Q celery,default,encoding -l INFO
now you can access your local pandora instace at http://127.0.0.1:8000/ now you can access your local pandora instace at http://127.0.0.1:8000/