Quantcast
Channel: NotreDAM » Documentation
Viewing all articles
Browse latest Browse all 12

Installation from source code repository

$
0
0

System requirements

  • a computer running Linux Ubuntu 12.04 and connected to the Internet
  • python 2.7.3
  • django 1.3.0 + south 0.7.3
  • celery 2.4.6 (with a broker of your choice – default: RabbitMQ)
  • mysql
  • sqlalchemy 0.7.9
  • alembic 0.4
  • mediainfo 0.7.61
  • libav / ffmpeg + tools
  • ImageMagick
  • gstreamer 0.10 (including encoding/decoding plugins and development files)
  • libSDL 1.2 + development files (libsdl1.2-dev)
  • libSDL Image 1.2 + development files (libsdl-image1.2-dev)
  • Debian packaging utilities, e.g. dpkg-dev, automake, libtool and fakeroot (for packaging the watermarking plugin)

If you are using Debian or Ubuntu, you can simply execute:

# sudo apt-get install python-django python-django-south
python-celery rabbitmq-server mysql-server mediainfo ffmpeg
imagemagick gstreamer0.10 python-mysqldb libsdl1.2-dev
libsdl-image1.2-dev mercurial automake libtool

WARNING: we have noticed that some GStreamer plugins may cause problems (e.g., segmentation faults during video transcoding), for reasons we are still investigating.  In particular, you may want to remove the following package:

# sudo apt-get remove gstreamer0.10-vaapi

Step 0 – Additional packages

The following APT repository contains additional packages which are not available on Ubuntu 12.04 (or are available with an outdated version):

deb http://www.notredam.org/stage-repository/precise/ ./
# sudo apt-get install python-sqlalchemy alembic

Furthermore, you can find MediaInfo DEB packages on http://mediainfo.sf.net/.

Step 1 – Clone the source code repository

# hg clone https://notredam.googlecode.com/hg/ notredam

From now on, we will work in the notredam/src/dam directory within the clone:

# cd notredam

From within the clone, select the “mediadart-replacement” branch:

# hg update notredam-replacement

Step 2 – Build and install the GStreamer watermarking plugin

The NotreDAM source code includes a GStreamer watermarking plugin. First of all, you need to setup the Autoconf-based build system:

# cd gst-watermarkplugin
# ./autogen.sh

Then, you have two choices. The recommended one is to create a Debian/Ubuntu package:

# sudo apt-get install mercurial autoconf libtool libgstreamer0.10-dev dpkg-dev
# dpkg-buildpackage -rfakeroot

These commands will create a .deb file on the parent directory: you just need to install it.

Otherwise, you can compile and install the plugin by hand, ensuring that its installation directory is visible by GStreamer (e.g. through the GST_PLUGIN_PATH environment variable):

# ./configure
# make
# make install

Step 3 – Configure settings

From now on, we will work in the src/dam/ directory within the NotreDAM clone:

# cd ../src/dam

Create a new settings file from the template, and customize it:

# cp settings.py.default.dev settings.py
# vi settings.py

Change the following lines (in the DATABASE dictionary):
ENGINE = ‘django.db.backends.mysql’
NAME = ‘dam_db’
USER = ‘root’
PASSWORD = ‘root’

Step 4 – Configure MProcessor

Create the NotreDAM configuration and cache directories:

# sudo mkdir /etc/notredam
# sudo mkdir /var/spool/notredam

Change permission of /var/spool/notredam folder.

# sudo cp mprocessor/mprocessor.cfg /etc/notredam/

If you want to use a cache directory different from /var/spool/notredam, you will need to change /etc/notredam/mprocessor.cfg accordingly (look for the “cache_dir” option).

Step 5 – Set environments variables

If you cloned the NotreDAM repository in your home directory, just execute the following commands (otherwise, replace the “~” path prefix as necessary):

# export PYTHONPATH=$PYTHONPATH:~/notredam/src/
# export DJANGO_SETTINGS_MODULE=dam.settings

Step 6 – Create the log directory

# mkdir log

Step 7 – Create the MySQL DB

Connect to your MySQL server as root (or any other user who can create databases), and execute the following command:

CREATE DATABASE dam_db DEFAULT CHARACTER SET utf8;

Step 8 – Import models in SQL DB

# python manage.py syncdb --noinput
# python manage.py migrate

Step 9 – Launch Celery

# celeryd -c 4

Step 10 – Start django

Open a new terminal window, ensuring that the PYTHONPATH and DJANGO_SETTINGS_MODULE environment variables are set as shown above (Step 4). Then, inside the src/dam directory of your NotreDAM repository clone, launch the following command:

# python manage.py runserver 0.0.0.0:9000

Step 11 – Start using NotreDAM

Open your browser at the url 127.0.0.1:9000, then log in with the following credentials:
username: admin
password: notredam

Viewing all articles
Browse latest Browse all 12

Latest Images

Trending Articles





Latest Images