Combine Tech Specs

From Transmission
Jump to: navigation, search

Bahasa Indonesia Translation: Combine Spesifikasi Teknis


Base System

  • Ubuntu 8.04
  • (some packages from 8.10 as that's the repository mirror they had)
  • Packages required: apache2 build-essential python2.4 flvtool2 mencoder ffmpeg2theora python-cheetah python-twisted

Partition Layout

  • 2x320G Hard disks
  • each hard disk partitioned into 1x100M (sdX1) partition, and 1x320G (sdX2) partition. Each of these partitions is set as a RAID volume
  • RAID1 is configured for sda1+sdb1 and sda2+sdb2.
  • md0 (sda1+sdb1) is formatted for ext3, to be mounted as /boot
  • md1 is set as physical volume for RAID
  • One volume group (Sys) is created on md1
  • Three logical volumes are created on Sys: System (20G), Swap (8G) and Data (the remainder, about 292G).
  • System: ext3, mount as /
  • Data: ext3, mount as /opt
  • NOTE: RAID1 is probably redundant in this case (no pun intended); I think LVM can handle volume mirroring

Network Configuration

/etc/network/interfaces:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.100.238
netmask 255.255.255.192
gateway 192.168.100.254

plumi.combine.or.id and plumi-flv.combine.or.id added to the network's DNS server to resolve to this machine.

Service Configuration

Zope/Plone

  • Plone 2.5.5 installed via unified installer. If want plone to be installed some other than /opt/Plone-2.5.5 you need to edit install.sh in to change $PLONE_HOME
wget http://launchpad.net/plone/2.5/2.5.5/+download/Plone-2.5.5-UnifiedInstaller.tgz
tar zxvf Plone-2.5.5-UnifiedInstaller.tgz
sudo mv Plone-2.5.5-UnifiedInstaller /opt/
cd /opt/Plone-2.5.5-UnifiedInstaller
sudo ./install.sh
  • Plumi 0.2.3 installed:
wget http://andycat.engagemedia.org/plumi-0.2.3-final.tgz
sudo mv plumi-0.2.3-final.tgz /opt/
cd /opt
sudo tar xvfz plumi-0.2.3-final.tgz
  • imsvdex installed into plone instance:
sudo /opt/Plone-2.5.5/Python-2.4.4/bin/easy_install imsvdex
  • added to /opt/Plone-2.5.5/zeocluster/client1/etc/zope.conf and /opt/Plone-2.5.5/zeocluster/client2/etc/zope.conf:
     products /opt/plumi-0.2.3-final
/etc/init.d/zope start

Apache

  • proxy, proxy_http and rewrite mods enabled
sudo a2enmod proxy
sudo a2enmod proxy_http
sudo a2enmod rewrite
  • create /etc/apache2/sites-available/plumi :
<VirtualHost *:80>
    ServerName plumi
    ServerAlias plumi.combine.or.id
    ServerAdmin adahendra@combine.or.id
   
    <Directory />
      Options FollowSymLinks
      AllowOverride None
      Order allow,deny
#      Deny from none
      Allow from all
    </Directory>

<Location />
    Order Allow,Deny
     Deny from none
      Allow from all
  </Location>
   

    ErrorLog /var/log/apache2/plumi-error.log

    LogLevel warn

    CustomLog /var/log/apache2/plumi-access.log combined
    ServerSignature On
    
    RewriteEngine On

    # Normalize URLs by removing trainling /'s
    RewriteRule ^/(.*)/$ http://127.0.0.1:8080/VirtualHostBase/http/%{SERVER_NAME}:80/plumi/VirtualHostRoot/$1 [L,P]
    # Pass all other URLs straight through
    RewriteRule ^/(.*)$ http://127.0.0.1:8080/VirtualHostBase/http/%{SERVER_NAME}:80/plumi/VirtualHostRoot/$1 [L,P]

</VirtualHost>
  • make /var/www/plumi-flv:
sudo mkdir /var/www/plumi-flv
  • create /etc/apache2/sites-available/plumi-flv :
<VirtualHost *:80>
	ServerAdmin webmaster@localhost
   ServerName plumi-flv
   ServerAlias plumi-flv.combine.or.id

	DocumentRoot /var/www/plumi-flv

	ErrorLog /var/log/apache2/plumi-flv-error.log
   LogLevel warn


	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel warn
	CustomLog /var/log/apache2/plumi-flv-access.log combined

</VirtualHost>
  • lines of /etc/apache2/sites-available/default changed to:
NameVirtualHost *:80
<VirtualHost *:80>
  • sites plumi and plumi-flv enabled:
sudo a2ensite plumi
sudo a2ensite plumi-flv

Indytube

indytube.conf (in /opt/plumi-0.2.3-final/indytube) modified to:

[encoder]
BE_HOW_NICE=18
CONVERT_THESE=['.avi','.qt','.mov','.mpeg','.mp4','.mpg','.asf','.wmv','.3gp','.ogg','.flv','.m4v','.ogm','.divx']
DO_ENCODING=True
NUMBER_OF_PARALLEL_ENCODERS=1
ENCODER_LOCKFILE_BASE=/opt/plumi-0.2.3-final/indytube/plumi-encoder.lock
POLLTIME=60


[mencoder]
MENCODER_LOCATION=/usr/bin/mencoder

# for older versions of MEncoder.
#MENCODER_OPTIONS=-really-quiet -of lavf -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:keyint=50:vbitrate=150:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -vf scale=320:240 -srate 22050

# for newer versions of MEncoder, we dont need the "lavfopts" line above, plus we add in a higher bitrate, and a sync option
MENCODER_OPTIONS=-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

[ffmpeg2theora]
CORTADO_LOCATION=http://demo.plumi.org/flowplayer/cortado-ovt-debug-0.2.2.jar
FFMPEG2THEORA_COMMAND=ffmpeg2theora

[flvtool2]
FLVTOOL_LOCATION=/usr/bin/flvtool2

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

[urls]
FLOWPLAYER_LOCATION=http://plumi-flv.combine.or.id/FlowPlayer.swf
VIDEO_SERVER_URL=http://plumi-flv.combine.or.id
SPLASH_IMAGE_BASE=http://plumi-flv.combine.or.id
SPLASH_IMAGE_FILE=indytube.jpg

[logging]
LOG_FILE=/opt/plumi-0.2.3-final/indytube/plumi-testing-wetube.log
LOG_LEVEL=logging.INFO
  • Flowplayer installed:
cd /opt/plumi-0.2.3-final/indytube/
sudo unzip flowplayer.zip
sudo cp flowplayer/FlowPlayerClassic.swf /var/www/plumi-flv/FlowPlayer.swf

Secondary instance

  • A secondary instance of plone/zope installed into /opt/plone-instances/development/ for the purposes of developing skins etc. ZEO server running on port 9100, ZEO clients running on 9080 and 9080. apache and indytube set up accordingly.

Server

LVM

Create LVM Partition
Backup LVM Partition
Boot Ubuntu Live CD
Install lvm and mdadm
 Application -> Accessories -> Terminal
Run Command
sudo apt-get update
sudo apt-get install lvm mdadm
Detect lvm Partition
sudo --auto-detect 
Scan logical volume
sudo lvscan
Mounting logical volume partition
sudo lvs
Backups logical volume partition
Create directory on different partition for backups
 
example : sudo mkdir /media/disk/backup
Go to Sys directory on logical volume
 ''''run command''''
tar cvzf /media/disk/backup/filename.tgz Sys