
This is a guide for installing Plumi 3.0 on a Debian or Ubuntu Linux server using an Apache2 web server.
Note: A how-to guide has recently been written for installing Plumi on FreeBSD 7.3-PRERELEASE. This should also work on FreeBSD 8.x but has not yet been tested. This guide can be found in an email sent to the Plumi Discuss list.
Plumi is untested on other operating systems. You can find more information about installing Plone on different kinds of servers here, which should aid you in installing the Plumi buildout on other operating systems. Please contribute your installation notes on these or different OSs via the Plumi email list and/or by editing this manual chapter here on FLOSSmanuals.
This guide requires that you already have intermediate knowledge of systems administration, Debian or Ubuntu Linux, the shell and Apache. A basic knowledge of Python is desirable for installation. Knowledge of Zope and Plone will aid in set up of your Plumi site.
Plumi 3 requires two domains to operate although they can point to the same server:
Please ensure that these domains are set up in advance of your site installation and have had sufficient time to propagate through the Internet (eg: 24-48 hours).
NOTE: If you server is not going to be accessed from the Internet, you still need to set up the domains within your private network (eg: internal DNS server, /etc/hosts files on all workstations, etc).
The video codecs (ffmpeg & ffmpeg2theora) are not part of the standard Ubuntu repositories and you will need use the following command to add the Medibuntu repository to your system:
sudo wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list && sudo apt-get --quiet update && sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring && sudo apt-get --quiet update
Once your system is configured to use the Medibuntu repository you can install Python and the codecs by running this command:
apt-get install python2.4-dev python2.4-setuptools build-essential libavcodec-unstripped-52 ffmpeg ffmpeg2theora
If you are running other applications and web sites on your server, it may be worth while creating a python virtual environment for developing in - this can avoid problems between python packages installed by your operating system and those installed by easy_install. You will need to have the virtualenv package installed first - in Debian and Ubuntu systems you can apt-get install python-virtualenv, then:
$ virtualenv -p /usr/bin/python2.4 --no-site-packages src/pyvirt . src/pyvirt/bin/activate $ easy_install http://dist.repoze.org/PIL-1.1.6.tar.gz
This will install the virtual env into src/pyvirt, activate it and then install the (required) Python Imaging Library into the virtual env.
Here you will find information on how to install Plumi from buildout. A buildout puts together Zope, Plone, the third-party products and all customisations into one package. This makes it very easy for you to get everything up and running quickly. The buildout tutorial on Plone.org is available here.
Some links for background reading on buildout/setuptools/disutils/virtualenv : http://us.pycon.org/2009/tutorials/schedule/1PM3/
If you want to install the buildout inside a chroot , see here: http://plumi.org/browser/plumi-buildout-plone3/trunk/DevelopingInAChroot.txt
NOTE: Plumi uses ports 8080 to run Zope, 8021 to run ftp and 8888 as the listen port for the transcode daemon. If you have other systems using these ports, please configure your buildout prior to running it (see the buildout configuration section for details).
This process assumes that you are creating a Plumi site called "plumi" at www.example.com. Before installing Plumi, you need to answer the following questions:
Plumi is available from the Plone SVN server. To download the latest Trunk version of Plumi, run the following command:
svn co https://svn.plone.org/svn/collective/plumi.buildout/trunk/ target_folder_name
To download the latest Tagged version of Plumi, run the following command:
svn co https://svn.plone.org/svn/collective/plumi.buildout/tags/Tag_Name target_folder_name
NOTE: target_folder_name is where you want the code to go (eg: /opt/plumi/3.0 or /home/zope/plumi) and Tag_Name is tagged version you want to get (eg: 3.0-rc3, etc)
Plumi can be downloaded as a fully packaged release in an archive using the tar format. Only tagged versions are available this way, not the current trunk. To download a packaged release, follow the instructions below:
mkdir /opt/plumi wget http://plone.org/products/plumi/releases/Release_Name/Tar_File tar -xzvf Tar_File cd Created_Directory
NOTE: Release_Name is the name of the release package you're downloading (eg: 3.0-RC3), Tar_File is the name of the archive file (eg: plumirc3.tar.gz) and Created_Directory is the name of the directory created after the archive is extracted (eg: plumi3).
Configure the specific information about this Plumi installation, including:
# site-specific settings for a Plumi based site
[site]
# start with offbeat password, and hint that it should be made unique in-site:
user = admin:admin <-Default Zope admin user & password
effective-user = zope <-User that Zope will be installed under
http-address = 127.0.0.1:8080 <-Internal address of the Zope server
ftp-address = 127.0.0.1:8021 <-Internal address of the Zope FTP server
transcode_host = 127.0.0.1 <-Internal address of the transcoder
transcode_port = 8888 <-Port the transcoder will listen on
videofolder = transcoded <-Directory where videos will be placed
#squid configs
squid_address = 127.0.0.1:4128
squid_backend = ${site:http-address}
squid_hostname = example.org <-Replace this with your domain name
squid_email = plumi@example.org <-Replace this with a valid email address
#apache configs
apache_backends = example.org:${site:squid_address}
transcode_backends = videos.example.org:${site:transcode_host}:${site:transcode_port}
apache_zope2_vhm_map = example.org:/Plone <-Replace this with your domain
and Plumi site name
$ python2.4 bootstrap.py
$ ./bin/buildout -v
./bin/instance start ./bin/transcodedaemon start ./bin/squid-instance sudo ./bin/apachectl start
cp ./parts/apacheconf/conf.d/virtual_example.org.conf /etc/apache2/sites-available cp ./parts/apachetranscodeconf/conf.d/virtual_video.example.org.conf /etc/apache2/sites-available /etc/init.d/apache2 restart
If you've used a non-standard port for Zope, replace the 8080 in the URL above with the port you have specified when configuring the buildout.





If you've used a non-standard port for Zope, replace the 8080 in the URL above with the port you have specified when configuring the buildout.










An optional addition to Plumi is the PlumiFTP module. This provides an FTP service that monitors port 21 and intterfaces with the Zope FTP service. It is not essential for the operatoin of Plumi.
To install PlumiFTP, run the following command
sudo easy_install-2.4 plumiftp
Once installed, run the following commands to set up the configuration files
cp /usr/lib/python2.4/site-packages/plumiftp-0.4-py2.4.egg/plumiftp/plumiftp.cfg /etc cp /usr/lib/python2.4/site-packages/plumiftp-0.4-py2.4.egg/plumiftp/plumiftp.initscript /etc/init.d/plumiftp chmod +x /etc/init.d/plumiftp
Now you need to edit the /etc/plumiftp.cfg file to configure PlumiFTP as required. The values you can set are:
Once you have completed editing the configuration file, use the following command to start PlumiFTP:
/etc/init.d/plumiftp start
Now you can test that PlumiFTPis running by using telnet to connect to your site on the RealFTP URL & port. You should see the "hello" message you set up in /etc/plumiftp.cfg:
telnet example.org 21
For the current version of PlumiFTP, you should also see the following message:
220 pyftpdlib 0.5.2 ready
Future versions of PlumFTP will show a different version number.
To ensure that Plumi will start automatically whenever your server is turned on, add the following lines to your /etc/rc.local file:
./bin/instance start ./bin/squid-instance su zope -c './bin/transcodedaemon start' ./bin/apachectl start
NOTE: Replace the "zope" in "su zope -c" with the name of the user you installed Plumi under (the "effective-user" from site.cfg)
if you are running PlumiFTP on your site, you will also need to add the following line:
/etc/init.d/plumiftp start
If you are having trouble installing Plumi please join one of our email lists or IRC channels listed here or contact the Plumi maintainers here.
You may encounter difficulties if you are already running a Plumi site from another buildout on this webserver (note that you would usually add another Plone site within the one buildout rather than run multiple sites from different buildouts). If you must run multiple Plumi installations on the same server, you will need to set up Apache & Squid yourself & not use the default configurations included in the buildout process. You will also need to change the default ports in the installation's site.cfg file. If you are running more than one transcode daemon as well, you will need to change the name of the Transcode Daemon process ID file.
The development map chapter describes the anatomy of the Plumi buildout, and explains the products and packages that are installed.