[plumi-discuss] Install Guide for New Plumi Installations

Jim Brown jimbyg at gmail.com
Fri Mar 19 09:11:03 EST 2010


Hi All,

Here is the guide I've developed for installing Plumi 3 on new installations.

Your comments and suggestions are welcome.

Note:  A complete documentation set now exists at:

http://en.flossmanuals.net/Plumi/Introduction

(see also:  http://en.flossmanuals.net/bin/view/Plumi/WebHome  if you want
to contribute to the manual)

The remainder of this document is based on my own experience.
========================================================================================
========================================================================================
========================================================================================


----------------------   Start of PLUMI_INSTALL.txt
----------------------------------



Introductory Remarks

This is a guide for installing Plumi on new hosts where there is no
pre-existing Zope or Plone install.  This install used
FreeBSD 7.3-PRERELEASE for testing, but other BSD versions should work
where Plone is known to work.

The basic idea is to download and install Plone with the Unified Installer.
That version is then updated with the plumi.buildout trunk code overlaid on
the Plone instance configuration.  Next, buildout is run to rebuild the Plone
site using the overwritten instance.

Once Plone is rebuilt, the Plumi application (a Plone product) can be installed.
The Plumi application pulls in additional dependencies as needed.  The Plone
site is then fully Plumi-zed.  You can then run tests with the new Plumi site.

Some random simple customizing steps follow the install.  These are not
needed to get plumi up and running.

The steps in this guide assume the named instance "bsdtv".  Make the
necessary adjustments for your instance name, or modify the steps if
you are not using an instance name (i.e. you are using the default
"Plone" instance).

The guide also assumes you have a host with a correctly configured DNS name
and that DNS is correctly functioning on the host and any clients you are
using.  The DNS name used for this guide is "www.bsdtv.org".

Multiple terminal sessions may be needed simultaneously in this guide.
For example it is often necessary to run the Plone (or Plumi) instance in
one terminal session, and the transcode daemon in a separate terminal session.
Once installation testing is complete, this is not necessary.

Any Plone site (including Plumi) needs a functioning mail server.  Ensure that
your host system has a fully configured and working mailserver configured
before beginning the installation.

In most examples in this guide, the instance directory is always given as a
fully qualified path name i.e.  "/usr/local/Plone/bsdtv"  Generally, the
instance name for a default install will be something like
"/usr/local/Plone/zinstance".  Path names may be different on different
platforms.  Adjust as needed.

Most commands in this guide will be run from the instance bin directory.
You may be able to save time by adding the directories onto your PATH
variable:

PATH=_standard_path_directories_here:/usr/local/Plone/bsdtv/bin:/usr/local/Plone/zinstance/bin

As with any tutorial, don't just blindly cut and paste commands.
Read the commands in each step and understand what they do before
using them.  Also, be alert for errors with command options, or default
command locations (such as /bin/bash  vs. /usr/local/bin/bash)


In this installation, squid is not used. Modifications for this case
are noted where they apply below.  The resulting system configuration
is similar to the figure below (best viewed in a fixed font):

      [Internet user]
             ^
             |
             |
             v
     +-------+-------+
     |   Apache      |
     |  listening    |
     |  on port 80   |
     |               |
     | Rewrite rules |
     |   bounce to   |
     |  Zope server  |
     |  on port 8080 |
     |               |
     | or FTP Server |
     | on port 8021  |
     |               |
     |or Transcoding |
     |Server on port |
     |     8888      |
     |               |
     +------+--------+
            ^
            |
            |
            +----------------------+---------------------+
            |                      |                     |
            v                      v                     v
     +------+--------+  +----------+--------+  +---------+----------+
     |  Zope server  |  |   FTP Server on   |  | Transcoding Server |
     |  with Plone   |  |     Port 8021     |  |  on Port 8888      |
     | listening on  |  |                   |  |                    |
     |   port 8080   |  +-------------------+  +--------------------+
     |               |
     +---------------+


It's possible to run the server processes on separate hosts,
but this installation uses one host for all 4 main processes
(Apache, Zope/Plone/Plumi, FTP, and the Transcoding Daemon).


I welcome your comments and suggestions.  Please reply on plumi-discuss.


Best Regards,
Jim Brown
BSDCG

jimbyg at gmail.com


PS- "Well, it worked for me..."


========================================================================
Step 1.0

Description:  IN this step, the Plone Unified Installer takes care of setting up
Python 2.4, the Python virtual environment, Plone itself, a random password,
and in the default case, the plone uid and gid.

  # Download Plone 3.3.4 Unified Installer and unpack it.

  cd $HOME
  wget http://launchpad.net/plone/3.3/3.3.4/+download/Plone-3.3.4-UnifiedInstaller.tgz
  tar xvzf Plone-3.3.4-UnifiedInstaller.tgz

  cd Plone-3.3.4-UnifiedInstaller

  # Read the README.txt file for installation instructions and options.
  # For a standalone installation using the default instance run:

###  /bin/sh install.sh standalone

  # This guide uses the instance name "bsdtv" for the Plumi install.

  /bin/sh ./install.sh --instance=bsdtv standalone


  # This step takes some time.  Grab yourself a cup of coffee.

  # Note the admin password displayed at the end of the install and
  # write it down.  It is used in several steps below.

=========================================================================
Step 2.0

Description:  The Plone Unified installer installs the instance
on disk as "bsdtv", but the on-line URL still requires /Plone.  If you
are running a named instance the name must be changed in the Zope
Management Interface (ZMI).

This step is not needed for the default install.

  # Change directory to the instance directory and run the instance.

  cd /usr/local/Plone/bsdtv

  bin/instance fg

  # Web to the ZMI, and login as admin using the password from the above
  # install.

  #  http://www.bsdtv.org:8080/manage

  # Check the "Plone" entry and Use the "Rename" button
  # to change the name of the site to "bsdtv" from "Plone".

  # Restart bin/instance fg

  # You can now web to:

  # http://www.bsdtv.org:8080/bsdtv

  # Stop the instance (ctl-c or ctl-\ in the terminal window).

=========================================================================
Step 3.0

Description:  The zope and plone installs use different uids.  Making them the
same ensures the plumi install can complete successfully.

Edit the password file and group file to make the names and id numbers the same.
Only the zope user needs a working directory and shell.  The plone
user does not.
Add (if needed) plone and zope users with same uid,gid and a home directory
for the zope user.

Example /etc/passwd entries:

  plone:*:2134:2134:Plone Admin:/nonexistent:/usr/sbin/nologin
  zope:*:2134:2134:Zope:/home/zope:/usr/local/bin/bash

Example /etc/group entries:

  plone:*:2134:
  zope:*:2134:

=========================================================================
Step 4.0

Description:  Get the plumi.buildout trunk code and overlay it on the instance
'bsdtv' directory. Set permissions as described below. Otherwise things break
during buildout or running the instance.

  # Download plumi.buildout/trunk into a temporary directory.
  cd $HOME
  rm -rf bsdtv
  svn co https://svn.plone.org/svn/collective/plumi.buildout/trunk bsdtv
  chown -R plone:plone $HOME/bsdtv

  # The /usr/local/Plone/bsdtv already exists (from install.sh above)
  # This step just updates that directory with the plumi.buildout trunk.
  # BSD style cp command options.

  cd /usr/local/Plone
  cp -aR $HOME/bsdtv .

  # Ensure that the var and src directorys have correct permissions for
  # running buildout.
  cd /usr/local/Plone/bsdtv
  chown -R plone:plone var src

  # Remove readme in the src directory.  It crashes bin/buildout.
  cd /usr/local/Plone/bsdtv
  rm /usr/local/Plone/bsdtv/src/README.txt

==================================================================================
Step 5.0

Description:  Edit site.cfg for our specific installation. There are several
changes needed.  Note that squid is not used in this installation, so
only the minimum squid configuration is needed.  See below.

  # Save original files

  cd /usr/local/Plone/bsdtv
  /bin/cp buildout.cfg buildout.cfg.orig
  /bin/cp site.cfg site.cfg.orig

  # Edit  site.cfg as needed.

#----------------------- START of site.cfg ---------------------------
[site]
# start with offbeat password, and hint that it should be made unique in-site:
user = admin:admin
effective-user = zope
http-address = www.bsdtv.org:8080

# Set httpd-address this way for the buildout and plumi install.  The
# http-address variable sets the property "plonesite_address" on the
# ZMI plone_properties/plumi_properties/manage_workspace page.
# After the install the property should be changed to
http://www.bsdtv.org:8080/bsdtv
# (if running standalone without Apache) or http://www.bsdtv.org
(with no port value)
# if running with Apache.
#
# A colon and port number is required for http-address for the buildout
# and install.  Otherwise there are build or startup errors.

ftp-address = www.bsdtv.org:8021
transcode_host = www.bsdtv.org
transcode_port = 8888
videofolder = transcoded

#squid configs
squid_address = www.bsdtv.org:8080
squid_backend = ${site:http-address}
squid_hostname = example.org
squid_email = plumi at example.org

# Only the squid_address entry is needed in this installation tutorial.
# Squid is not used, but the squid_address variable is used by the
# buildout process.
# Also, because squid is not used, we change the port number to
# 8080 to feed right into Zope/Plone/Plumi. Squid_backend,
# squid_hostname, and squid_email are not used at all
# and can safely be ignored.

# Apache configs
apache_backends = www.bsdtv.org:${site:squid_address}
transcode_backends = www.bsdtv.org:${site:transcode_host}:${site:transcode_port}
apache_zope2_vhm_map = www.bsdtv.org:/bsdtv

#----------------------- END of site.cfg ---------------------------

====================================================================================
Step 6.0

Description:  Set up the egg cache for the buildout.

  rm -rf /home/zope/.python-eggs
  mkdir /home/zope/.python-eggs
  chown zope:plone  /home/zope/.python-eggs

====================================================================================
Step 7.0

Description:  Now run buildout.  Buildout should run to completion,
even though there are some errors with skins and kupu and some other things.

  cd /usr/local/Plone/bsdtv
  bin/buildout  -n -v

  # This step also takes some time. Time for a second cup.
  # Apparently, buildout changes ownership of certain files in var and src.
  # So we have to restore them to the plone:plone uid:gid.

  cd /usr/local/Plone/bsdtv
  chown -R plone:plone var src

====================================================================================
Step 8.0

Description: Check the /tmp directory for Apache buildout cruft, especially
if you have done more than one install.  Each Apache build can take up as
much as 50MB of storage in /tmp.  The installation programs will be modified
to clean up /tmp in a later release, but for now this should be done by hand.

The /tmp directory is used by Plone when doing product installs, and
product installation can fail if there is not enough space in /tmp.

Delete entries similar to the /tmp/tmpxxxxxbuildout-apachebuild  as shown below:

  #ls -al /tmp
  ...
  drwx------   3 root  wheel     512 Mar 16 15:42 tmp202X0obuildout-apachebuild
  drwx------   3 root  wheel     512 Mar 17 11:23 tmp4cck05buildout-apachebuild
  drwx------   3 root  wheel     512 Mar 16 21:43 tmpICPBE1buildout-apachebuild
  ...

====================================================================================
Step 9.0

Description: Tweak the Apache configuration files. The buildout installs
Apache httpd.conf in a custom location, under the instance directory.

  vi /usr/local/Plone/bsdtv/parts/apachebuild/conf/httpd.conf

  #
  # ServerAdmin: Your address, where problems with the server should be
  # e-mailed.  This address appears on some server-generated pages, such
  # as error documents.  e.g. admin at your-domain.com
  #
  ServerAdmin admin at www.bsdtv.org

  #
  # ServerName gives the name and port that the server uses to identify itself.
  # This can often be determined automatically, but we recommend you specify
  # it explicitly to prevent problems during startup.
  #
  ServerName www.bsdtv.org:80

  # Tweaks to rewrite logging level in:

  vi  /usr/local/Plone/bsdtv/parts/apacheconf/conf.d/virtual_www.bsdtv.org.conf

  # and

  vi  /usr/local/Plone/bsdtv/parts/apachetranscodeconf/conf.d/virtual_www.bsdtv.org.conf

  # Change RewriteLogLevel value to 2 (reasonable value for debugging.)
  # Change the value back to 0 after installation testing.

====================================================================================
Step 10.0

Description:  Get ready to run Plone with Apache.  Startup the
instance and Apache
in separate terminal windows.  (The transcode daemon is not needed at
this time.)

  cd /usr/local/Plone/bsdtv

  bin/instance fg

  # Apache is configured to use Virtual Hosting.  Check the
configuration as follows:

  apachectl -S

  # Output will look similar to:
  #
  #  VirtualHost configuration:
  #  wildcard NameVirtualHosts and _default_ servers:
  #  *:80                   is a NameVirtualHost
  #           default server www.bsdtv.org
(/usr/local/Plone/bsdtv/parts/apacheconf/conf.d/virtual_www.bsdtv.org.conf:1)
  #           port 80 namevhost www.bsdtv.org
(/usr/local/Plone/bsdtv/parts/apacheconf/conf.d/virtual_www.bsdtv.org.conf:1)
  #           port 80 namevhost www.bsdtv.org
(/usr/local/Plone/bsdtv/parts/apachetranscodeconf/conf.d/virtual_www.bsdtv.org.conf:1)
  #  Syntax OK
  #
  #
  # You must now start Apache to communicate with the bsdtv instance.
  # The configuration files should already be correctly set up by
  # the buildout.

  apachectl start

  # Web to www.bsdtv.org  The Plone site should come up.
  # Log in as admin using the password from the install step above
  #
  # Do Plone mailserver setup.

====================================================================================
Step 11.0

Description:  Add the Plumi application.

  # Go to Site Setup -> Add-on Products

  # Check "Plumi application setup x.y.z" and click Install to add the
  # Plumi application.
  #
  # You do not need to check anything else at this time.  The Plumi
  # application will bring in the dependencies that it needs.  This step
  # may also take some time. The page will eventually refresh.
  #
  # Time for a third cup.

  # Check and/or change the property on the properties page:

  # http://www.bsdtv.org:8080/bsdtv/portal_properties/plumi_properties/manage_workspace

  # If "localhost" is shown, change it to the network DNS name of
  # the server (www.bsdtv.org)
  #
  # Change the "plonesite_password" to the password given from the
  # install above.  This will not be necessary in a future release.
  #
  # Note- you must change the this entry.  If you do not, videos will
  # probably not be transcoded and will probably not display correctly.
  #
  # Save the changes.

  Stop Plone/Plumi/Zope instance and close all browser(s).  Stop
Apache if running.

====================================================================================
Step 12.0

Description:  Additional steps.

Plumi uses ffmpeg, ffmpeg2theora, and qt-faststart  to assist
in the transcoding steps.  Your host will need these packages
installed to perform transcoding.

Note:  BSD installs may add packages as follows:

  pkg_add -r ffmpeg
  pkg_add -r ffmpeg2theora
  pkg_add -r qt-faststart

Note:  ffmpeg may need to be configured to allow certain codecs.
Check the transcode daemon logs if transcoding is not working correctly.
You may need to recompile ffmpeg or other packages above to ensure
correct transcoding.

Other systems may need these and possibly other packages.

Plone is now fully Plumi-zed!

Stop everything and close all browsers.

====================================================================================
Step 13.0

Description:  Testing video uploading and transcoding.

Now run the plumi applications as foreground processes in
separate windows for testing.

  # In separate windows run (as root):

  cd /usr/local/Plone/bsdtv
  bin/transcodedaemon fg

  # Other window.
  cd /usr/local/Plone/bsdtv
  bin/instance fg

  # In another window
  apachectl start

Web to the Plumi site (www.bsdtv.org) login as admin,
and run tests  to add, transcode, and display videos.

Testing:

  Login as admin and click to 'my folder -> Videos'

  Click 'add new -> plumi video'

  This is a 3 step process.  Complete each step entering the required fields.
  If possible, check your network connection to ensure the file is uploading
  correctly.  Some ISPs, hotels, hotspots, etc. limit traffic.

  Once the file uploads, the thumbnail will display on the video
description page.
  It's possible that transcoding may take additional time.  For best
test results
  wait until transcoding is complete for all encodings.

  Click to 'Home' -> 'my folder' -> 'videos'

  View the video by clicking on the thumbnail image .  This should start
  the 'flowplayer' application.  If it does not, a possible cause is that
  the admin password was not set correctly on the
  plumi_properties/manage_workspace page (see above).

  For the video to be visible to anonymous surfers, it must be published. Change
  the state of the video from 'pending review' to 'publish'.  The  video
  show up on the main page.

  Logout and restart the browser.  Web to your new Plumi site and click on the
  video thumbnail.  The flowplayer application should begin to play the video.

!!!!!!!!!  NOTE:  IF YOU HAVE TROUBLE WITH plumi ONLY DISPLAYING THUMBNAILS:

The root cause is that the transcoder step is failing.  Check the
transcoder logs.  In one case, the libfaac  library was not built into ffmpeg.
Rebuilding/reinstalling  ffmpeg with libfaac enabled solved the problem.

In another case, the site.cfg values were not set correctly at buildout time.
This causes the plumi application to send an incorrect "DOWNLOAD" entry
to the transcoder daemon.

In yet another case, the transcoder daemon was not started.  Ensure that the
transcoder daemon is started.  Watch the logs for activity.

Only a short video is needed for testing.  A 5 MB .avi file should work fine.

=======================  END of Plumi Install Tutorial
===========================


Simple Random Customizing Notes
---------------------------------------

Change background to blue:

   Ugly Green:
   src/plumi.skin/plumi/skin/browser/stylesheets/plumi.css:
background-color: #abbd10;
   src/plumi.skin/plumi/skin/browser/stylesheets/plumi.css:    color: #abbd10;


   Nice Blue:
   src/plumi.skin/plumi/skin/browser/stylesheets/plumi.css:
background-color: #55749D;
   src/plumi.skin/plumi/skin/browser/stylesheets/plumi.css:    color: #55749D;

   You may have to restart Plumi and restart the browser for the css
   to take effect.

Change logo:

  http://plone.org/documentation/kb/change-the-logo-in-plone-3/view?searchterm=change%20logo
  Follow the guidelines in Section 1. "Changing the Image and its
Title ; Alternative Approach"

Change favicon:
  http://plone.org/documentation/kb/setting-the-site-icon-favicon-for-your-plone-site/view?searchterm=favicon
  Favicon must be loaded as a FILE, not an IMAGE.

Change camera icon:

   ZMI at  /bsdtv/portal_skins/plumi_skin_custom_images
   customize the  plumi-icon32x32.png image
   also the  plumi-icon32x32b.png image

User Mods:

  ZMI -> Site Setup -> Security Settings


[Y] Enable self-registration
      Allows users to register themselves on the site. If not selected, only
      site managers can add new users.
[N] Let users select their own passwords
      If not selected, passwords will be autogenerated and mailed to users,
      which verifies that they have entered a valid email address.
[Y] Enable User Folders
      If selected, home folders where users can create content will be created
      when they log in.
[N] Allow anyone to view 'about' information
      If not selected only logged-in users will be able to view information
      about who created an item and when it was modified.

Navigation:

[Y] Automatically generate tabs
[Y]  Generate tabs for items other than folders.
[ALL] Displayed content types

[Y] Filter on workflow state
      Only "Published is checked"

Mail:

  Note:  Set up latest Postfix before releasing to production.

  Server: localhost
  Site "From" Name:   BSDTV Site Admin
  Site "From" Address:  info at www.bsdtv.org

Errors:

  Keep 50 exceptions

Calendar:

  First day of week in the calendar  : Sunday  (follows US style)

Tagcloud:

To get the tag cloud working, click on "Manage Portlets" and remove the 'blank'
portlet if it appears instead of the tag cloud.  Add the "Customizable
Tagclould Portlet"  Click the link for the portlet and configure it for
maximum number of tags, etc.

Tags are entered on upload step 2.  Enter any value, one per line.
To promote an article (or News item) to the "Featured" list, enter
the word "featured" (no quotes) as a tag.


======================  End Random Simple Configurations =======================


More information about the Discuss mailing list