wiki:InstallLenny

Add a plumi user

adduser plumi

Add debian-multimedia.org repository to your sources.list file

vi /etc/apt/sources.list

Add this line:

deb http://www.debian-multimedia.org lenny main

Then, update the list of packages

apt-get update

Installing packages necessary

debian-multimedia-keyring g++ unzip mencoder flvtool2 python-cheetah python-twisted ffmpeg2theora cortado postfix apache2 python2.4 python2.4-dev subversion

Installing Plone and Plumi

Follow the how-to "How To Install Plumi Using The Buildout" here

Installing flowplayer

  • First, we must create the directory /var/www/plumi-flv-files/ and give it the right rights
mkdir /var/www/plumi-flv-files/
chown www-data:www-data -R /var/www/plumi-flv-files/
cd /usr/src
wget http://ovh.dl.sourceforge.net/sourceforge/flowplayer/flowplayer-2.2.4.zip
unzip flowplayer-2.2.4.zip
cp -r flowplayer/* /var/www/plumi-flv-files

Setup the configuration file indytube.conf

http://plumi.org/browser/indytube/trunk/indytube/INSTALL.plone

vi /opt/plumi-0.2.2-rc5/indytube/indytube.conf 

For example:

[ffmpeg2theora]
CORTADO_LOCATION=http://flv.domainepublic.net/cortado-ov-stripped-0.2.2.jar

[paths]

VIDEO_FILE_DIRECTORY=/opt/Plone-2.5.5/zeocluster/client1/var/files/Members
FLV_FILE_DIRECTORY=/var/www/plumi-flv-files/
INCLUDE_FILE_DIRECTORY=/opt/Plone-2.5.5/zeocluster/client1/var/files/Members
INCLUDE_FILE_SUFFIX=.flv.inc
INCLUDE_TEMPLATE=/opt/plumi-0.2-final/indytube/include.template

[urls]
FLOWPLAYER_LOCATION=http://flv.domainepublic.net/FlowPlayerClassic.swf
VIDEO_SERVER_URL=http://flv.domainepublic.net/
SPLASH_IMAGE_BASE=http://plumi.domainepublic.net
SPLASH_IMAGE_FILE=indytube.jpg

  • We must make a symlink to the debian install of cortado
 ln -s /usr/share/cortado/cortado-ov-stripped-0.2.2.jar /var/www/plumi-flv-files/cortado-ov-stripped-0.2.2.jar

  • create the /opt/indytube directory
mkdir  /opt/indytube/
  • Copy SPLASH_IMAGE_FILE to VIDEO_SERVER_URL
cp /opt/plumi-0.2.2-rc5/indytube/indytube.jpg  /var/www/plumi-flv-files/
  • Copy files for Fullscreen mode to VIDEO_SERVER_URL
cp /opt/plumi-0.2.2-rc5/indytube/swfobject.js  /var/www/plumi-flv-files/
cp /opt/plumi-0.2.2-rc5/indytube/fullscreen.*  /var/www/plumi-flv-files/

Setup apache2 to serve these .flv files, from FLV_FILE_DIRECTORY

vi /etc/apache2/sites-enabled/plumi
NameVirtualHost 91.121.123.116:80

<VirtualHost 91.121.123.116:80>
ServerName flv.domainepublic.net
ServerAdmin plumi@domainepublic.net
DocumentRoot /var/www/plumi-flv-files
DirectoryIndex index.html index.htm index.shtml index.cgi index.php
ErrorLog /var/log/apache2/flv-files-error.log
LogLevel warn
CustomLog /var/log/apache2/flv-files-access.log combined
</VirtualHost>

<VirtualHost 91.121.123.116:80>
ServerName plumi.domainepublic.net
ServerAdmin info@domainepublic.net
DocumentRoot /var/www
DirectoryIndex index.html index.htm index.shtml index.cgi index.php
ErrorLog /var/log/apache2/plumi.log
LogLevel warn
CustomLog /var/log/apache2/plumi.log combined
a2ensite plumi
/etc/init.d/apache2 force-reload

Testing indytube

  • Launch run_indytube.sh to run as a background process
./run_indytube.sh
  • Verify that the process is running
 ps faux |grep indytube

And see if the process is running up

root      7188  0.0  0.3  11672  7612 pts/0    S    20:51   0:00 python2.4 indytube.py

If not, launch it directly in the command line to see the output.

python indytube.py

First Video

  • Configure a mail transfer agent like postfix
  • Creation of new user
  • Close the browser
  • Connect with the new user
  • Upload a video
  • Check the file ENCODER_LOCKFILE_BASE to see if the transcoding is working
tail -100 /opt/indytube/plumidemo-testing-encoder.lock

2008-11-04 12:31:06,412 INFO started main function using conf file ./indytube.conf at 11/04/08 12:31:06, calling loop every 60 seconds
2008-11-04 12:31:06,412 INFO Starting indytube... in /opt/Plone-2.5.5/zeocluster/client1/var/files/Members
2008-11-04 12:31:06,412 INFO OK to try encoding: /opt/Plone-2.5.5/zeocluster/client1/var/files/Members/denis/videos/contre-feux_1.avi
2008-11-04 12:33:25,666 INFO Encoded /opt/Plone-2.5.5/zeocluster/client1/var/files/Members/denis/videos/contre-feux_1.avi in 139.25 seconds, using cmd -- /usr/bin/mencoder -quiet /opt/Plone-2.5.5/zeocluster/client1/var/files/Members/denis/videos/contre-feux_1.avi -o /var/www/plumi-flv-files/denis/videos/contre-feux_1.flv -really-quiet -of lavf -oac mp3lame -lameopts abr:br=64 -ovc lavc -lavcopts vcodec=flv:keyint=25:vbitrate=260:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -vf harddup,expand=:::::4/3,scale=320:240  -srate 22050 -ofps 25 -mc 0/10
2008-11-04 12:40:37,584 INFO Encoded /opt/Plone-2.5.5/zeocluster/client1/var/files/Members/denis/videos/contre-feux_1.avi in 404.03 seconds, using cmd -- ffmpeg2theora /opt/Plone-2.5.5/zeocluster/client1/var/files/Members/denis/videos/contre-feux_1.avi -o /var/www/plumi-flv-files/denis/videos/contre-feux_1.ogg
2008-11-04 12:40:37,584 INFO Making html template - original size of /opt/Plone-2.5.5/zeocluster/client1/var/files/Members/denis/videos/contre-feux_1.avi: 84.3MB, Encoded size: 27.2MB
2008-11-04 12:40:37,605 INFO Ending indytube... We checked 1 eligble files, converted 1 files

Running Plumi behind an Apache2 web server

Read  this

  • Enabling the Apache2 modules needed
a2enmod cache deflate disk_cache headers mime_magic proxy proxy_http rewrite
  • Custom configurations

Create the following files in /etc/apache2/conf.d

vi /etc/apache2/conf.d/deflate
<IfModule mod_deflate.c>
 DeflateCompressionLevel 3

 DeflateFilterNote Input instream
 DeflateFilterNote Output outstream
 DeflateFilterNote Ratio ratio

 LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate

 # Netscape 4.x has some problems...
 BrowserMatch ^Mozilla/4 gzip-only-text/html

 # Netscape 4.06-4.08 have some more problems
 BrowserMatch ^Mozilla/4\.0[678] no-gzip

 # MSIE masquerades as Netscape, but it is fine
 #BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

 # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
 # the above regex won't work. You can use the following
 # workaround to get the desired effect:
 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

 # Don't compress images, java scripts and style sheets
 SetEnvIfNoCase Request_URI \
   \.(?:gif|jpe?g|png|js|css)$ no-gzip dont-vary

 # Make sure proxies don't deliver the wrong content
 # this needs mod_headers but it's very important
 # so I don't add a IfModule around it
 Header append Vary User-Agent env=!dont-vary

</IfModule>

vi /etc/apache2/sites-enabled/plumi

Modify the section about plumi.domainepublic.net

<VirtualHost 91.121.123.116:80>
ServerName plumi.domainepublic.net
ServerAdmin info@domainepublic.net
DocumentRoot /var/www
DirectoryIndex index.html index.htm index.shtml index.cgi index.php



RewriteEngine On
RewriteRule ^/(.*)$ http://plumi.domainepublic.net:8080/VirtualHostBase/http/plumi.domainepublic.net:80/test/VirtualHostRoot/$1 [L,P]
ErrorLog /var/log/apache2/plumi.log
LogLevel warn
CustomLog /var/log/apache2/plumi.log combined
 <IfModule mod_proxy.c>
   ProxyVia On

   # prevent the webserver from beeing used as proxy
   <LocationMatch "^[^/]">
     Deny from all
   </LocationMatch>
 </IfModule>


 # caching (disabled)
 # this caches every file with the correct caching informations starting at /
 <IfModule mod_disk_cache.c>
   #CacheEnable disk /
 </IfModule>

 # compression (disabled)
 <IfModule mod_deflate.c>
   #SetOutputFilter DEFLATE
 </IfModule>

</VirtualHost>

Reload apache2

/etc/init.d/apache2 force-reload

Configuring ATCountryWidget

Read this

Go to the Zope Management Interface, Select your site, Select portal_countryutils, and Countries

Then you can add new area/continent and select the countries to add inside.

add to Favorites

Read this

Create a new file

vi /opt/Plone-2.5.5/Python-2.4.4/lib/python2.4/site-packages/sitecustomize.py
import sys
sys.setdefaultencoding("utf-8")
/opt/Plone-2.5.5/zeocluster/bin/shutdowncluster.sh
/opt/Plone-2.5.5/zeocluster/bin/startcluster.sh 

Problem not clear

  • Why it's not possible to log with the admin user except from /manage ?

todo