Changes between Version 5 and Version 6 of PlumiInstall


Ignore:
Timestamp:
05/12/11 09:35:44 (3 years ago)
Author:
dimo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PlumiInstall

    v5 v6  
    1 '''This page is deprecated, for installing Plumi 4.x and beyond please see the manual at http://booki.flossmanuals.net/plumi/_v/4.0/introduction/ 
    2 ''' 
    3  
    4 These instructions can be used for installing Plumi 3.0 on a Linux server using an Apache2 web server. To install Plumi 3.0 on FreeBSD you can visit [http://lists.plumi.org/pipermail/discuss/2010-March/002255.html this] guide. 
    5 Although Plumi is more or less untested on other environments, it has been reported working without issues on OS X.  
    6  
    7 === Requirements === 
    8  
    9 A) Requirements 
    10  
    11     * Linux server machine with these system requirements and Apache2 web server & domain set up in which to run your Plumi site. 
    12     * Shell access to server and an account with permissions over domain's directory. 
    13     * The server will need to have: 
    14           * GCC development tools. 
    15           * make. 
    16           * Subversion version control system (svn). 
    17           * Python 2.4 
    18           * ffmpeg with h264 support and ffmpeg2theora 
    19     * Plumi 3 is built on Plone 3 which requires Python 2.4 to operate correctly. It will be installed as part of the installation detailed in this chapter. 
    20  
    21 B) Two Domains Required 
    22  
    23 Plumi 3 requires two domains to operate although they can point to the same server: 
    24  
    25     * The Plumi Site (eg: example.org) 
    26     * Plumi Transcode Daemon and transcoded files (videos.example.org) 
    27  
    28 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). 
    29  
    30 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). 
    31  
    32 C) Setting up Python & video codecs 
    33  
    34 The following instructions apply for Ubuntu. If you are using another distribution you need to adjust accordingly. 
    35  
    36 The video codecs (ffmpeg with h264 support) are not part of the standard Ubuntu repositories and you will need use the following command to add the Medibuntu repository to your system: 
    37  
    38 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 
    39  
    40 Once your system is configured to use the Medibuntu repository you can install Python and the codecs by running this command: 
    41  
    42 apt-get install python2.4-dev python2.4-setuptools build-essential libavcodec-unstripped-52 ffmpeg ffmpeg2theora 
    43  
    44 === Plumi installation  === 
    45  
    46 1) Plumi can be downloaded and installed using SVN or as a packaged tarball. 
    47  
    48 1a) Download Plumi from SVN 
    49  
    50 Plumi is available from the Plone SVN server. To download version 3.0 of Plumi, run the following command: 
    51  
    52 svn co https://svn.plone.org/svn/collective/plumi.buildout/tags/3.0/ target_folder_name 
    53  
    54 1b) Download Plumi as a Packaged Release 
    55  
    56 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: 
    57  
    58 mkdir /opt/plumi 
    59 wget http://plone.org/products/plumi/releases/3.0/plumi3.tar.gz 
    60 tar -xzvf plumi3.tgz 
    61 cd plumi-3 
    62  
    63 2) Set Site Configuration Information 
    64  
    65 Configure the specific information about this Plumi installation, including: 
    66  
    67     * Change all references to hostname & email address 
    68     * Check the ports and change them if the defaults are already in use 
    69     * Set the effective user to the name of the user account that Zope is to be installed under (NOTE: This user should already be set up - the Plumi installation script will not create it) 
    70     * Set the default Zope admin user & password if you want them to be different (recommended) 
    71  
    72 NOTE: It is best to use the default 127.0.0.1 URLs unless you are putting the transcoder on a separate machine 
    73  
    74 Edit the site.cfg file and provide the following details: 
    75  
    76 # site-specific settings for a Plumi based site 
    77  
    78 [site] 
    79 # start with offbeat password, and hint that it should be made unique in-site: 
    80 user = admin:admin               <-Default Zope admin user & password 
    81 effective-user = zope            <-User that Zope will be installed under 
    82 http-address = 127.0.0.1:8080    <-Internal address of the Zope server 
    83 ftp-address = 127.0.0.1:8021     <-Internal address of the Zope FTP server 
    84 transcode_host = 127.0.0.1       <-Internal address of the transcoder 
    85 transcode_port = 8888            <-Port the transcoder will listen on 
    86 videofolder = transcoded         <-Directory where videos will be placed 
    87  
    88 #squid configs 
    89 squid_address = 127.0.0.1:4128 
    90 squid_backend = ${site:http-address} 
    91 squid_hostname = example.org     <-Replace this with your domain name 
    92 squid_email = plumi@example.org  <-Replace this with a valid email address 
    93  
    94 #apache configs 
    95 apache_backends = example.org:${site:squid_address} 
    96 transcode_backends = videos.example.org:${site:transcode_host}:${site:transcode_port} 
    97 apache_zope2_vhm_map = example.org:/Plone   <-Replace this with your domain and Plumi site name 
    98  
    99 3) Run the buildout then setup & configure Plumi  
    100  
    101 # Prepare to run the buildout (bootstrap is a Python script that creates a number of directories and scripts based on the buildout configuration file, and downloads the latest version of the zc.buildout egg). 
    102  
    103 $ python2.4 bootstrap.py  
    104  
    105 # Run the buildout (in verbose mode). This will take between 5 to 10 minutes, possibly more depending on your server's configuration & load. Sit down, grab a coffee and wait till it finishes! 
    106  
    107 $ ./bin/buildout -v  
    108  
    109 # Now start Zope/Plone and the other applications in the background (NOTE: This assumes you are running Apache & Squid as supplied by the Plumi Buildout) 
    110  
    111 ./bin/instance start 
    112 ./bin/transcodedaemon start 
    113 ./bin/squid-instance 
    114 sudo ./bin/apachectl start 
    115  
    116 # If your server already has Apache & Squid set up on it (eg: for hosting other, non-Plumi sites), copy the files below into the list of available Apache sites and enable them (remember to replace example.org with your site's domain) and then restart Apache: 
    117  
    118 cp ./parts/apacheconf/conf.d/virtual_example.org.conf /etc/apache2/sites-available 
    119 cp ./parts/apachetranscodeconf/conf.d/virtual_video.example.org.conf /etc/apache2/sites-available 
    120 /etc/init.d/apache2 restart 
    121  
    122 # Once the instance is running, go to the Zope Management Interface (ZMI). 
    123 http://www.example.org:8080/manage 
    124  
    125 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. 
    126  
    127 # Log in to the ZMI using the admin login details you specified in site.cfg (eg: username: admin, password: admin). If you want to change the admin user's ZMI password once logged in, navigate to acl_users -> users -> password.  
    128  
    129 # Add a Plone site or instance in the ZMI. 
    130  
    131 Click “Root Folder” in the left-hand sidebar. Choose Plone site from the Select type to add... drop-down menu and click Add.  
    132  
    133 Enter the ID, Name and Description, e.g. ID "plumi" and Name "Plumi Site". Click Add Plone Site.  
    134  
    135 # Visit your new plone site by entering this URL: http://www.example.org:8080/plumi 
    136  
    137 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.  
    138  
    139 # Click site setup in the top right corner. Click Add/Remove Products and install the Plumi application setup product.  
    140  
    141 Wait a few minutes for your Plumi site to install. When it is done, the page will reload and you should see a freshly installed Plumi site :) 
    142  
    143 # Go to the Zope Management Interface (ZMI) and select portal_properties/plumi_properties then set addresses for transcodedaemon (eg: http://videos.example.org),  videoserver (eg: http://videos.example.com)  and plonesite (eg: http://example.org). 
    144  
    145 # Add a new user to your Plumi site for testing (the admin user may not have the correct folders created for them, as this user is created before the Plumi site is generated). Log out and log back in as your new user. 
    146  
    147 # Try publishing a video in your new Plumi site (logged in as this new testing user). 
    148  
    149 # Check the video after it has uploaded to see if it has been created and transcoded correctly.  
    150  
    151 4) Install PlumiFTP (optional) 
    152  
    153 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. 
    154  
    155 To install PlumiFTP, run the following command 
    156  
    157 sudo easy_install-2.4 plumiftp 
    158  
    159 Once installed, run the following commands to set up the configuration files 
    160  
    161 cp /usr/lib/python2.4/site-packages/plumiftp-0.4-py2.4.egg/plumiftp/plumiftp.cfg /etc 
    162 cp /usr/lib/python2.4/site-packages/plumiftp-0.4-py2.4.egg/plumiftp/plumiftp.initscript /etc/init.d/plumiftp 
    163 chmod +x /etc/init.d/plumiftp 
    164  
    165 Now you need to edit the /etc/plumiftp.cfg file to configure PlumiFTP as required. The values you can set are: 
    166  
    167     *  TmpDir Temporary storage for files as they are being uploaded 
    168     * ZopeFTPServerAddr The URL to the Zope FTP server (be st left as localhost if possible) 
    169     * ZopeFTPServerPort The port your Zope FTP server is listening on 
    170     * ZopePathString Change plumi-id to the ID of your plumi site 
    171     * RealFTP values Set the URL, port, "hello" and "goodbye" messages that PlumiFTP will use when providing the FTP service 
    172  
    173 Once you have completed editing the configuration file, use the following command to start PlumiFTP: 
    174  
    175 /etc/init.d/plumiftp start 
    176  
    177 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: 
    178  
    179 telnet example.org 21 
    180  
    181 For the current version of PlumiFTP, you should also see the following message: 
    182  
    183 220 pyftpdlib 0.5.2 ready 
    184  
    185 Future versions of PlumFTP will show a different version number.  
    186  
    187 5) Configuring Plumi to start automatically 
    188  
    189 To ensure that Plumi will start automatically whenever your server is turned on, add the following lines to your /etc/rc.local file: 
    190  
    191 ./bin/instance start 
    192 ./bin/squid-instance 
    193 su zope -c './bin/transcodedaunemon start' 
    194 ./bin/apachectl start   
    195  
    196 NOTE: Replace the "zope" in "su zope -c" with the name of the user you installed Plumi under (the "effective-user" from site.cfg) 
    197  
    198  
    199 if you are running PlumiFTP on your site, you will also need to add the following line: 
    200  
    201 /etc/init.d/plumiftp start 
     1[http://svn.plone.org/svn/collective/plumi.app/trunk/docs/INSTALL.txt]