Skip to content

How to install BlankApplication

thinkdry edited this page Sep 13, 2010 · 2 revisions

Installation

Softwares versions

For reasons like bugs corrections and also code optimizations, we chose to try the latest stable version of our development and execution tools.
Here are the current versions of these tools :

  • MySQL : 5.0.5 (but possible to use different database controller)
  • Ruby : 1.8.7 (2008-08-11 patchlevel 72)
  • RubyGems : 1.3.1
  • Rails : 2.3.2 (frozen to avoid problems)
  • Specific gems :
    • mysql (MySQL driver)
    • rmagick (for managing the logo and favicon uploads)

To install easily all the missing gems, you can run the following task :


rake gems:install

Specific packages for Ubuntu

Xapian install:

wget http://oligarchy.co.uk/xapian/1.0.14/xapian-core-1.0.14.tar.gz
tar zxf xapian-core-1.0.14.tar.gz
cd xapian-core-1.0.14
./configure && make && make install

Xapian Bindings:

wget http://oligarchy.co.uk/xapian/1.0.14/xapian-bindings-1.0.14.tar.gz
tar zxf xapian-bindings-1.0.14.tar.gz
cd xapian-bindings-1.0.14
./configure && make && make install

MySQL lib

sudo apt-get install libmysqlclient15-dev

LibXML (for PaulDix-FeedZirra)

sudo apt-get install libxslt-dev libxml2-dev

LibCurl (for PaulDix-FeedZirra)

sudo apt-get install libcurl3-dev

OpenSSL

sudo apt-get install libopenssl-ruby 

ImageMagick :

sudo apt-get install imagemagick libmagick9-dev

For acts_as_xapian plugins

sudo apt-get install libxapian15 libxapian-ruby1.8

For RFeedReader gem

sudo apt-get install libxml-ruby1.8 libxml-parser-ruby1.8

FFMPEG installation

This module is needed to encode the video with x264 codec and audio files with LameMP3 on the server.

X264

git clone git://git.videolan.org/x264.git
cd /path/to/x264-dir
sudo ./configure --enable-shared --disable-asm
sudo make && make install
sudo ldconfig

LameMP3

wget http://sourceforge.net/projects/lame/files/lame/3.97/lame-3.97.tar.gz/download
tar zxf lame*
cd lame*
sudo ./configure && make && make install

FFMPEG

mkdir src
cd src
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
cd ffmpeg
sudo ./configure —enable-libx264 —enable-gpl —enable-libmp3lame —enable-shared
sudo make
sudo make install
ffmpeg (to check installation)

Tips: if ffmpeg is not working after install do:
nano /etc/ld.so.conf.d/custom-libs.conf
Add the line : /usr/local/lib
And run: sudo ldconfig

Database configuration

Be sure to specify a mysql adapter in your config/database.yml file.
For the environment, Rails use by default the ‘development’ one but you can specify directly the one you want with the RAILS_ENV variable.

Install Rake task

Firstly, you have to create, migrate and load the fixtures :


rake blank:install

This task will create your database, does the migrations, ask for superadmin account creation and ask for default dataset load.
Additionnaly, needed deamons will be started.

Cron tasks with Whenever

The daemon will manage different tasks like :

  • Manage the encoding of video and audio file
  • Update the Xapian indexes
  • Update the items of the Web feeds
  • Send the newsletter