Tuesday, April 15, 2014

Autogenerate footer year with PHP

Use this php code at the footer of your website to ensure your footer PHP date is always at the current year.
You need PHP web page not static HTML. If your server handles PHP, then use the code below to insert into your website’s footer. Note this will only work with PHP web pages not static HTML.

Current Year Display

This pulls in the current date using server technology, and is really easy to implement instead of manually typing the year every year.
&copy; <?php echo date("Y"); ?> Copyright. 
displayed: © 2014 Copyright.

Website Start and Current Year

Here you set the date your website was launched, and let the PHP automatically keep the current year up to date.
&copy; <?php
$copyYear = 2008; // Set your website start date
$curYear = date('Y'); // Keeps the second year updated
echo $copyYear . (($copyYear != $curYear) ? '-' . $curYear : '');
?> Copyright. 
displayed: © 2008-2014 Copyright.

Saturday, December 14, 2013

Drupal Database Problem - Inno DB Error

Instead of your Drupal Site you are faced with this Error Message.

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1286 Unknown table engine 'InnoDB': SELECT expire, value FROM {semaphore} WHERE name = :name; Array ( [:name] => variable_init ) in lock_may_be_available() (line 167 of /var/www/includes/lock.inc).

This can happen after restarting sql and blocking of the InnoDB.

One solution is to remove ib_logfiles from /var/lib/mysql and restart mysql.

Friday, November 29, 2013

Centos: Update Drupal via Drush

Updating your drupal instance with Drush is a fast and easy way to get the things done:

1. check if pear is installed

# pear version
PEAR Version: 1.9.4
PHP Version: 5.3.3
Zend Engine Version: 2.3.0

2. add the drush channel

# pear channel-discover pear.drush.org
Adding Channel "pear.drush.org" succeeded
Discovery of channel "pear.drush.org" succeeded


3. change to the folder where your drupal site is installed

example given:

# cd /public_html/site_xy

4. update to the new drupal version (example drupal 7.24)

# drush pm-update projects drupal-7.24


you are done

Further documentation on drush specific installation issues:
https://drupal.org/node/1791676


 

Thursday, November 7, 2013

How to remove a Raid Interface

If you are unsure about your raid volumes:
# mdadm --detail /dev/md1
 
or to get your different md's
# cat /proc/mdstat
 
To remove an existing RAID device, first deactivate it by running the following command as root:
# mdadm --stop raid_device  
 
Once deactivated, remove the RAID device itself: 
# mdadm --remove raid_device
 
Finally, zero superblocks on all devices that were associated with the particular array: 
# mdadm --zero-superblock component_device
 
Example Removing a RAID device
Assume the system has an active RAID device, /dev/md3, with the following layout:
# mdadm --detail /dev/md3 | tail -n 4
    Number   Major   Minor   RaidDevice State
       0       8        1        0      active sync   /dev/sda1
       1       8       17        1      active sync   /dev/sdb1
       2       8       33        2      active sync   /dev/sdc1
In order to remove this device, first stop it by typing the following at a shell prompt:
# mdadm --stop /dev/md3
mdadm: stopped /dev/md3
Once stopped, you can remove the /dev/md3 device by running the following command:
# mdadm --remove /dev/md3
Finally, to remove the superblocks from all associated devices, type: 
# mdadm --zero-superblock /dev/sda1 /dev/sdb1 /dev/sdc1

Sunday, October 20, 2013

PC Sound Card Jack Colors

When the first sound cards on the PC, the jacks were typically all one color, mostly black. This state of affairs remained in effect until "PC 99," a pseudo-standard collaborated on by Microsoft and Intel (and third in a series of four "PC System Design Guide" standards which also included PC 97, PC 98, and PC 2001) defined a new industry standard for sound card jack colors. The basic jack colors go something like this:
  • Green: Audio out (front speakers)
  • Black: Audio out (rear speakers)
  • Pink: Microphone in
  • Blue: Line in
  • Yellow/Orange: Subwoofer out
On surround-sound sound cards, the difference between the green and the black jacks is that the green is for the front speakers, while the black is for the rear. On stereo sound cards with only one line-out jack, this jack may be either color, although green seems to be preferred as it more explicitly defines the jack as being an audio output. If a surround-sound sound card is configured for regular stereo (2-speaker) output, the green and black jacks are interchangeable.

The pink and blue jacks are both used as audio inputs for the sound card to record with. The difference is that the pink jack is intended for use with an unpowered microphone, while the blue jack is meant to take a line-level audio input. In audio terms, then, the sound card will generally use a much higher-gain amplifier for the microphone input, since most computer microphones make such a weak signal (typically only a few millivolts) that the recording would be virtually inaudible without significant amplification. The blue line-level input, by contrast, will use a much lower-gain amplifier - or, frequently, no amplifier at all, as it is designed to receive an already-amplified signal produced by the output of powered audio equipment, which typically produces a signal level of over 100 millivolts. At best, plugging a line-level signal into the microphone jack is likely to vastly overdrive the sound card's microphone amplifier, resulting in unusably clipped recording; at worst, doing so may burn out the sound card altogether.
Also note that since most computer microphones are mono, the pink microphone input is usually mono as well, while the blue line-in jack can typically receive stereo audio.

Additionally to these colors, some sound cards emboss (or print) symbols on their mounting bracket representing the functions of these jacks for further identification. Typically, the audio-out jacks are represented with a symbol of a wave-shape with an arrow coming out of it (symbolizing sound waves coming "out" of the card), the line-in jacks have a symbol of a wave with an arrow pointing into it, and the microphone jack usually just has a small picture of a microphone. However, the surfaces of the mounting brackets on PC sound cards are so cramped for space that there is often no room for such symbols. This is also the reason why PC sound cards have standardized on the relatively tiny 1/8" (3.5 mm) jack size while most other professional audio equipment uses 1/4" (6.35 mm) jacks or RCA jacks as a standard.

Sunday, June 30, 2013

Centos 6.4 and Google Chrome 28 update

Centos seeems not to support the new updates from Google Chrome. The Problem is libstdc++.so.6 which isn't available on centos 6.

There are some options for this issue:

Just keep running the old version until centos 7 is ready and disable update issue:

go to /etc/yum.repos.d/google-chrome.repo set enabled=0 will disable it and stop the failures.

Install Chromium Browser (with Pepper Flash plugin and Chrome PDF viewer plugin) on CentOS 6 / Red Hat (RHEL) 6.

1.Change root user 

2. Install/enable hughesjr Chromium EL 6 repository
cd /etc/yum.repos.d
wget http://people.centos.org/hughesjr/chromium/6/chromium-el6.repo

3. Install Chromium Browser on CentOS 6 / RHEL 6
yum install chromium

4. Install Pepper Flash Player on Chromium Note: this is optional step and you will need 200-250 Mb temporary disk space.
4.1 Get hughesjr Helper Script
cd /tmp wget https://raw.github.com/hughesjr/chromium_el_builder/master/chrome_pepperflash_copy.sh
4.2 Make chrome_pepperflash_copy.sh Executable
chmod +x chrome_pepperflash_copy.sh
4.3 Install Pepper Flash on Chromium
./chrome_pepperflash_copy.sh
This will take a while, it downloads Google Chrome and extracts Pepper Flash plugin to /opt/chromium and modify Chromium launcher.

5. Install Google Chrome PDF Viewer Plugin on Chromium Note: this is optional step and you will need 200-250 Mb temporary disk space.
5.1 Get hughesjr Helper Script
cd /tmp
wget https://raw.github.com/hughesjr/chromium_el_builder/master/chrome_libpdf_copy.sh
5.2 Make chrome_libpdf_copy.sh Executable
chmod +x chrome_libpdf_copy.sh
5.3 Install Google Chrome PDF Viewer Plugin on Chromium ./chrome_libpdf_copy.sh  

Tuesday, January 8, 2013

You like own storage? Install Owncloud!


Install ownCloud 


This section describes in detail how to install ownCloud from the source tar balls.


Download the latest version of ownCloud from https://owncloud.com/download/. It will arrive as a tar.bz2 file.

wget http://mirrors.owncloud.org/releases/owncloud-x.x.x.tar.bz2

Change into your webspace directory, confirm that there is no directory called “owncloud” that can be overwritten, and unpack the tar file.
tar -xjf path/to/downloaded/owncloud-x.x.x.tar.bz2

It will create the ownCloud application inside the subdirectory “owncloud”. To work properly, ownCloud needs to be inside your webspace. The default locations are on

openSUSE / SLES: /srv/www/htdocs/
Fedora / RHEL: /var/www/html/
Ubuntu / Debian: /var/www
The next step is to create the directory for ownCloud to store its files in. Change into your ownCloud directory and create a directory called data.

Once ownCloud is installed, you need to change some file permissions and ownerships to allow the web server to  access and update the ownCloud configuration files and store your data. To do this, change into your ownCloud directory and change the owner of some of the files to the apache user. The correct user varies by Linux distribution family. Here are some examples:

openSUSE / SLES:
Go to /srv/www/htdocs/owncloud (if that is your ownCloud directory)
Run:
chown -R wwwrun:www config data
chown wwwrun:www apps
chmod 750 apps config
chmod -R 770 data

Fedora / RHEL:
Go to /var/www/html/ (if that if your ownCloud directory)
Run:
chown -R apache:apache config data
chown apache:apache apps
chmod 750 apps config
chmod -R 770 data

Ubuntu / Debian:
Go to /var/www (if that is your ownCloud directory)
Run:
chown -R www-data:www-data config data
chown www-data:www-data apps
chmod 750 apps config
chmod -R 770 data

Open your web browser and navigate to your ownCloud instance. If you are installing ownCloud on the same machine as you will access the install wizard from, the url will be:http://localhost/ (or http://localhost/owncloud. For basic installs SQLite is easy to setup (ownCloud will do it for you). For larger installs you should use MySQL or PostgreSQL. Click on the Advanced options to show the configuration options. You may enter admin credentials and let ownCloud create its own database user, or enter a preconfigured user. At this point your install is finished . Happy uploading.

Big Files


The upload size is maybe restricted to 2 MB: As a default, PHP is configured for only 2 MB uploads. This is not entirely useful, so it is important to increase these variables to the sizes you want to support on your server. So edit your servers php.ini file and change this to your desired values. example:

upload_max_filesize = 500 MB
post_max_size = 600 MB



Saturday, January 5, 2013

sftp into your AWS ec2 instance

This steps are required to SFTP into your AWS EC2 instance using FileZilla. Open Site Manager
  • Add site
  • Host: Ec2 elastic IP
  • Port: 22 (will sort by default when you select next option)
  • Protocol: SFTP
  • Logon Type: Normal
  • User: ec2-user
Open Preferences
  • SFTP
  • Add Key File select your secure key [.pem] from where you saved it
Make sure that the ec2-user has the correct permissions to do the actions you require.

Sunday, November 18, 2012

Updating Drupal Core.

Updating Drupal Core always is a litte bit hardcore.
You need first delete most of the old code. Here is a step by step instruction for the update process.
 It is assumed that your custom modules and templates are in the sites/all folder.
Otherwise you get some more work to save the files. If you want to preserve your .htaccess robots.txt and favicon.ico save it before updating.
1. Backup of your Drupal instance.
2. Download the latest release of your current Drupal version.
3. Extract the [tar ball or zip] Drupal package.
4. Set your site on maintenance mode
5. Delete all the files & folders inside your original Drupal instance except for /sites folder and any custom files you added elsewhere.
6. Copy all the folders and files except /sites from inside the extracted Drupal package [tar ball or zip package] into your original Drupal instance.
7. If the update release includes changes to settings.php replace old settings.php in .../sites/default/ with the new one, and edit site-specific entries (eg database name, user, and password)
8. If you modified files such as .htaccess or robots.txt re-apply those changes to the new files.
9. Login to your site as administrator or as user no 1
10. Run update.php by navigating to http://...yoursitename/update.php
11. Follow the process to update your Drupal instance 12. Disable maintenance mode

Tuesday, November 13, 2012

Centos - Installing graphical X Window System (Boot Options, startx from command line)

Installing GUI

Installing the Graphical Window System (X.org-X11) and the Default Desktop Environment on CentOS 6

Performing the default "Minimal" install of CentOS 6 does not install the graphical subsystem (the X.org server) and the desktop environment (e.g. GNOME or KDE). Such OS install is nice for building an optimal system from scratch, setting up a headless server (no monitor, keyboard and mouse) and other purposes; but for one reason or another, you may still require a graphical user interface (GUI). This tutorial will show you how to install and start the graphical window system and the desktop environment of your choice.

To achieve the task, you will need to install the following package groups (groups of packages combined for a common purpose): "X Window System", "Desktop", "Fonts" and "General Purpose Desktop" (last two are optional). This will install about 500 additional packages on your system (~250MB download, or you may use the available OS installation DVD to retrieve packages).

Code:
yum -y groupinstall "X Window System" "Desktop" "Fonts" "General Purpose Desktop"
(Please enter this as is - package group names as well as package names are case sensitive).

Previous versions of RHEL and its derivatives provided a package group called "GNOME Desktop Environment", that was sufficient for a general purpose GNOME desktop. Currently, package group "Desktop" installs all critical components of GNOME, including gdm (the GNOME Display Manager), plus a few additional packages; enough to provide a minimalist GNOME desktop with mouse support, a graphical file manager, copy/paste functionality and the luxurious GNOME Terminal emulator - maybe just what you need. Thus, installing the "General Purpose Desktop" package group is optional, but will help you mimic the system you would probably get if you where to include the default graphical desktop during OS install. Alternatively, you can chose a single package group "KDE Desktop", for a general purpose KDE Software Compilation.

It is generally recommended to install the "Fonts" package group to improve usability of the GUI, no matter what desktop environment you choose to install.

You may view the complete list of available package groups by issuing:



Code:
yum grouplist
You may review the contents of each package group by entering:

Code:
yum groupinfo "Name of the Package Group"


Enabling booting into GUI - start GUI from command line

To boot directly into GUI, you will need to manually change the runlevel of the system from 3 (full multiuser environment with networking) to 5 (the same as mode 3 + X11), by changing the line "id:3:initdefault:" to "id:5:initdefault:" in /etc/inittab file. Or you can manually start X.org from console, by entering "startx" (without quotes).

Upon installation and subsequent reboot, you will be presented with the "Setup Agent" interface (even if you choose to stay in runlevel 3, you will see the text user interface of this tool - hence, the options provided will be different from the graphical variant). This is due to package "firstboot" being automatically installed by the "X Window System" package group and can be a handy way to setup a freshly installed system. All steps in "Setup Agent" are optional, so you can just skim through them, skipping any. Though, creating a new normal user on a freshly installed system is done best through this graphical tool, as it helps automatically create the new user and associate it with groups (such as the "video" group) appropriate for everyday use in a GUI environment . 


If you have installed the X Window System but are not seeing a graphical desktop environment once you log into your Red Hat Enterprise Linux system, you can start the X Window System graphical interface using the command startx.
Once you enter this command and press Enter, the graphical desktop environment is displayed.
Note, however, that this is just a one-time fix and does not change the log in process for future log ins.
To set up your system so that you can log in at a graphical login screen, you must edit one file,/etc/inittab, by changing just one number in the runlevel section. When you are finished, reboot the computer. The next time you log in, you are presented with a graphical login prompt.
Open a shell prompt. If you are in your user account, become root by typing the su command.
Now, type gedit /etc/inittab to edit the file with gedit. The file /etc/inittab opens. Within the first screen, a section of the file which looks like the following appears:
# Default runlevel. The runlevels used by RHS are: 
#   0 - halt (Do NOT set initdefault to this) 
#   1 - Single user mode 
#   2 - Multiuser, without NFS (The same as 3, if you do not have networking) 
#   3 - Full multiuser mode 
#   4 - unused 
#   5 - X11 
#   6 - reboot (Do NOT set initdefault to this) 
#  id:3:initdefault:
To change from a console to a graphical login, you should change the number in the lineid:3:initdefault: from a 3 to a 5.

Warning

Change only the number of the default runlevel from 3 to 5.
Your changed line should look like the following:
  id:5:initdefault: 
When you are satisfied with your change, save and exit the file using the Ctrl-Q keys. A window appears and asks if you would like to save the changes. Click Save.

Sunday, August 19, 2012

Install and run NTP on Centos

Having an accurate clock on your system is usually important. It ensures the time stamps in emails sent from the machine are correct, and it is especially helpful when you need to look at the logs from a particular time of day.

Network time protocol

That's where the network time protocol (NTP) comes in. NTP lets you automatically sync your system time with a remote server. Setting up an NTP server to regularly adjust your machine's clock is pretty easy by default. It's also possible to make it a bit more complicated if you need your clock accurate down to the millisecond instead of just to the second.

Install

The first thing to do is install the NTP server.
Grab the package by running:
sudo yum install ntp

Once it's installed you can ensure the service will run at boot time by running:
sudo /sbin/chkconfig ntpd on

Start the service
To make sure the NTP service starts after installing it, run:
sudo /etc/init.d/ntpd start

As is usual for Linux services, you can stop or restart the NTP service by running the above command with "stop" or "restart" sent as the argument instead of "start".
Your system time is now served by NTP.

Fine Tuning

The ntp.conf file.The NTP configuration file can be found at:

/etc/ntp.conf

There are a few settings that can be changed in there, but for most people the only settings of interest would be any "server" entries.
The default for CentOS looks like:

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server 0.centos.pool.ntp.org
server 1.centos.pool.ntp.org
server 2.centos.pool.ntp.org

With more than one "server" entry your NTP server will query all servers and only select a time that a majority of the polled servers will agree on. This basically means that with three or more servers your clock will be more accurate than if it just uses one. If you add the "iburst" option after the server address it can speed up the NTP time sync by a bit. It's usually a good idea to use it, but not essential.

Further Reading:
ntp.org

Sunday, July 29, 2012

Encoding video with encoding.com

Encoding can be a hard job. Why not outsource it? Encoding.com takes your video, encodes it and sends it back to you. For small consumers and testing purposes there is a free package available. 
There are different methods to send your video. 
Desktop Application — An Adobe Air application available on both Windows and OSX platforms enables complete upload and management of your encoding projects directly from your desktop. 
Web Interface — The client interface has a section entitled Add Media. This tool will allow you to quickly and easily encode individual videos in to one or more formats through your browser (via upload from hard drive, FTP, SFTP, S3, CloudFiles).
Watch Folder — Also in the client interface, the Watch Folder allows you to specify an FTP/SFTP/S3/CloudFiles directory for encoding.com to "watch" at any frequency for new videos. After each watch interval all new videos added to this folder will be processed using the encoding setting you selected. You can have as many watch folders as you like, making it possible to encode a large video library with little or no setup or integration work. Please see our collection of articles about the Watch Folder for more details. 
XML API is the most flexible method. Custom file naming, multiple output formats and real time encoding status updates are important features available via our API. 


Uploading the file via web interface

Drag and drop uploading via the Desktop Application



After uploading your video you can start encoding.
Basic encoding settings are 
Audio Codec, Bitrate, Destination Locations, File Size, Framerate, Notifications, Output Type, Source Video Locations and Thumbnails.

Choose your encoding task



Task overview

When the task is finished encoding.com sends the file to the  Network of choice: S3, CloudFiles, FTP, or most commonly, directly to your Content Delivery ce (Akamai, EdgeCast, Highwinds, CloudFront, Level 3, Limelight, CDNetworks, NetDNA, etc.) or you can download it manually.
Possible Third Party integrations are:
Amazon S3 Cloud Storage, CMS Systems (Drupal, etc.), Content Delivery Networks (CDN), Flash Players, Rackspace Cloud Files and Video Platforms can be linked to encoding.com.

Link to encoding.com

Saturday, June 9, 2012

Wowza and Red5 same server

Sometimes it is useful to have  Wowza and Red5 on the same server. As both use the same ports, you have to change them in one applicattion.

Wowza default ports:

The following ports are used by default by Wowza Media Server 3 for streaming. You will need to open up these ports on your firewall to enable streaming. 

  • TCP 1935: RTMP (all variants), RTSP, Smooth and Cupertino Streaming
  • UDP 6970-9999: RTP UDP Streaming
  • TCP 8084-8085: JMX/JConsole Monitoring and Administration
  • TCP 8086: HTTP Administration

Red5 default ports:
  • RTMP: 1935
  • RTMPT: 8088
  • HTTP servlet engine port: 5080
  • Debug proxy port: 1936





Here is how to do change ports in Red5:



The first file we need to modify is the server properties file located in the conf directory:
red5/conf/red5.properties
  • Locate the http.port key and change it to 80 (or whatever you want)instead of 5080
  • Locate the proxy.source_port an change it to 1937 (or whatever you need)
  • Do not change the rtmpt.port entry, it should be 8088
  • Save and close the file
  • If you have any webapps do not forget to modify the ports in the red5/webapps/yourapp/config.xml
  • restart Red5





Tuesday, March 20, 2012

Install Kaltura from SVN


Pre-Installation Considerations:


PHP:

  • The current version of the Kaltura CE supports both PHP 5.3 and PHP 5.2.
  • Both php and php-cli must be present.
  • The following php extensions should be included and enabled: Gd, Curl, Memcache, Mysql, Mysqli, Exif, ftp, iconv, json, Session, apc, spl, DOM, SimpleXML, xml, xsl, ctype; 
  • Verify that the following settings within the php.ini file on each server: 
  • For PHP 5.3: Verify that request_order parameter includes C, G and P (recommended: "CGP") 
  • For PHP 5.2: Verify that variables_order parameter in php.ini includes C, G and P Please verify that date.timezone parameter was set to the right timezone.

minimal Hardware specifications:

1GB RAM, 2 CPUs


Apache:

Apache 2.2 or higher with following modules enabled: rewrite, headers, expires, filter, deflate, file_cache, env, proxy


MySQL:

MySQL 5.1.37 or higher.
Verify that mysql server character set is UTF8.
The following lines should be added to the MySQL my.cnf file:
lower_case_table_names = 1
thread_stack = 262144
open_files_limit = 20000
MySQL should be restarted after this adjustment is made
(Plesk will not allow lower_case_table_names = 1)


curl: Should be installed

memcached:  Should be installed

ImageMagick: Should be installed


32-bit packages required on 64-bit servers:

Some of the binaries that are in use by the Kaltura Platform are available in a 32-bit compiled version only. to enable these binaries
the following packages (or equivalents per Linus Distribution) may be required on a 64-bit server:  
Ubuntu:
a32-libs, lib32asound2, lib32gcc1, lib32ncurses5, lib32stdc++6, lib32z1,  libc6-i386
CentOS:
glibc.i686 , ncurses-libs,  zlib-1.2.x ,  freetype , bzip2-libs




Java:
JRE 1.6.x:Required for the video analytics module


Pentaho 3.2:


This is an open source data integration package, required for the video analytics module The data-integration package should be downloaded and installed within the /usr/local/pentaho/pdi directory
i.e.
- Create the /usr/local/pentaho/ directory
- Download and extract the pentaho data-integration package into the /usr/local/pentaho/ - package is available at: http://sourceforge.net/projects/pentaho/files/Data%20Integration/3.2.0-stable/pdi-ce-3.2.0-stable.tar.gz/download
- Rename the data-integration root directory of the downloaded package into the pdi directory




mail server:


A mail server is needed for managing outgoing emails as part of the kaltura platform workflow. Suggested packages: Sendmail, postfix


selinux:


Disabled SELinux (When applicable on server)
Within the /etc/sysconfig/selinux file (if exists on your server) set: SELINUX=disabled
The server should be restarted after this adjustment is made


Required info during installation



  • The full pathname to your Apache apachectl script: For a standard XAMPP configuration the apachectl is usually located at: /opt/lampp/bin/apachectl For a standard LAMP configuration the apachectl may be available at one of the following paths: /usr/bin/apachectl /usr/bin/apache2ctl 
  • The full pathname to your PHP binary file: For a standard XAMPP configuration the php binary is usually located at: /opt/lampp/bin/php For a standard LAMP configuration the php binary is usually available at the following path: /usr/bin/php 
  • The full target directory path for the Kaltura application: example /opt/kaltura 
  • Database information: Datatabase hostname, port, root user, root password 
  • Your primary system administrator email address 
  • A password to set for admin console administrator 
  • The URL to your xymon - system monitoring - service (optional) 
  • The name of the domain name/virtual hostname you will use for your kaltura CE server: e.g. kaltura.myhost.com, myhost.com 
  • Your permission to send system data for improving Kaltura CE (optional) Choose your installation folder. 


Install from SVN:



Keep in mind that all media files will be stored there and you enough space there. In this example Kaltura is located in the /opt Directory. Linux is Centos 64 bit and you install the latest svn from kaltura.


mkdir /opt/kaltura
cd /opt/kaltura
svn checkout http://www.kaltura.org/kalorg/kalturaCE/trunk/
mkdir bin
cd bin
svn checkout http://www.kaltura.org/kalorg/kalturaCEBinaries/branches/linux64/bin/




Running the Kaltura CE installation script:

From the base directory of your extracted kaltura CE package run the "php install.php" command.
- Follow installation instructions and provide the required information. 
- When installation completes, follow the post-installation instructions below

At the end of a successful installation you should be prompted with your login credentials to the Kaltura Administration Console (as provided by you during installation). You will need these login credentials to start working with the Kaltura CE. Assuming your mail server is up and running during installation you will receive these credentials to your mail box as well.




For further installation advice visit the Kaltura install site at http://www.kaltura.org/kaltura-ce-v40-generic-installation-package and read http://www.kaltura.org/kalorg/kalturaCE/tags/KalturaCE_v5.0.0/INSTALLATION.txt




To start using Kaltura, please complete the following steps:
1. Add the following line to your /etc/hosts file:
127.0.0.1 video.yoursite.com  (==> if you are faced with php 500 error on admin console try real ip instead of 127.0.0.1)
2. Add the following line to your Apache configurations file (Usually called httpd.conf or apache2.conf):
Include /opt/kaltura/app/configurations/apache/my_kaltura.conf
3. Restart apache
4. Browse to your Kaltura start page at: http://video.yoursite.com/start


This and that:



To uninstall kaltura,
1.remove entry in the hosts file and httpd.conf file
2.remove the kaltura* tables from your database
3. (Careful with this one!) rm -rf yourkalturainstallfolder


KMC media list corrupted -
This is the script you need to run if Sphinx becomes a pain in your sphinxter and happens to drop your entry list in the KMC: /opt/kaltura/app/scripts/utils/updatePartnerEntries2Sphinx.php


Modify /start/index.php:
the path to the start page is /kaltura/app/start/index.php

Use Wowza media server instead of Red5:

most of the integration is similiar to red5
explanation is here http://blog.kaltura.org/rtmp-vod-and-live-streaming-using-red5-and-kaltura-ce-4

this thing are special:

rtmp address for streaming: rtmp://yourserver/vod
rtmp address for for live broadcast rtmp://yourserver/live

symlink:

ln -s /opt/kaltura/web/content /usr/local/WowzaMediaServer/content and
ln -s /opt/kaltura/web/content /opt/kaltura/web/content/webcam

Tuesday, January 31, 2012

Install memcached on Centos 6.x

Install Memcached package on
Fedora 16/15/14/13/12, CentOS/Red Hat (RHEL) 6.2/6.1/6

yum install memcached

Configure memcached
Most important value to configure is CACHESIZE, which is cache size on Megabytes. On all systems, particularly 32-bit, ensure that you leave enough room for both memcached application in addition to the memory setting. For example, if you have a dedicated memcached host with 4GB of RAM, do not set the memory size above 3500MB. Failure to do this may cause either a crash or severe performance issues. Example Following configuration use 3072 Mb memory for Memcached:

vi /etc/sysconfig/memcached
PORT="11211"
USER="memcached"
MAXCONN="1024"
CACHESIZE="3072"
OPTIONS=""

Start Memcached
# Set Memcached to start automatically on boot
chkconfig memcached on
# Start Memcached
/etc/init.d/memcached start
## OR ##
service memcached start

Check that Memcached is Running and Working
echo stats | nc localhost 11211

Open Memcached Port (11211) on Iptables Firewall (If the Memcached will also be used other local servers)
Edit /etc/sysconfig/iptables file:
nano -w /etc/sysconfig/iptables
Add following line before COMMIT:
-A INPUT -m state --state NEW -m tcp -p tcp --dport 11211 -j ACCEPT
Restart Iptables Firewall:
service iptables restart
## OR ##
/etc/init.d/iptables restart
Test remote connection:
echo stats | nc memcache_host_name_or_ip 11211


appendix:

To flush all the data from Memcached using command line:


echo "flush_all" | nc 127.0.0.1 11211

Saturday, January 14, 2012

Howto Install Wowza Media Server on Centos 6.2

Setup Java:
It is suggested to deploy Wowza Media Server 3 under the most recent 64-bit version of either the Java Development Kit (JDK) or Java Runtime Environment (JRE) available on your platform running under a 64-bit OS.  On the Windows platform the Java Runtime Environment does not include the server runtime environment (which is explained in the tuning instructions).  This environment is included with the Java Development Kit.  For this reason when running on Windows, installing the JDK is suggested.

Sign up for a license:
For development use  the free Wowza Media Server 3 Developer Edition license for access to the server and all premium AddOns is free. You can have up to 10 Connections with this license. 
If you need more you have to buy a license.


Wowza Server Install:
wget http://www.wowza.com/uploads/installers/WowzaMediaServer-3.0.3.rpm.bin
sudo chmod +x WowzaMediaServer-3.0.3.rpm.bin
sudo ./WowzaMediaServer-3.0.3.rpm.bin

Do you agree to the above license terms? [yes or no]
yes
...              ########################################### [100%]
   1:WowzaMediaServer       ########################################### [100%]

Install Location:
  /usr/local/WowzaMediaServer
To enter license key:
  cd /usr/local/WowzaMediaServer/bin
  ./startup.sh

To uninstall:
sudo rpm –e WowzaMediaServer-3.0.3

Install the Wowza Examples: 
cd /usr/local/WowzaMediaServer/examples
./installall.sh








Sunday, January 8, 2012

Install and use Drush for Drupal

Drush (DRUpal SHell) is a command-line shell and scripting interface for Drupal designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt.
This instruction should work for Debian, Ubuntu, CentOS:

Install Drush


sudo wget --quiet -O - http://ftp.drupal.org/files/projects/drush-All-Versions-HEAD.tar.gz | tar -zxf - -C /usr/local/share


sudo ln -s /usr/local/share/drush/drush /usr/local/bin/drush


sudo drush



Use Drush
  1. Change into your Web server's root directory (cd /var/www).
  2. Run drush dl drupal-7.0. This downloads Drupal 7.0 from drupal.org and extracts the files into /var/www/drupal-7.0.
  3. Change into the newly created directory (cd /var/www/drupal-7.0) and run thesite-install command:
    drush site-install --db-url=mysql://root:secret@localhost/drupal
    
Answer “y” to the following prompt, and in a few short moments, you'll have a working Drupal install (using the “drupal” database on localhost). To verify, you can browse to http://localhost/drupal-7.0/ and log in using admin/admin as the user name/password, respectively. The site-install command has several additional options; run drush help site-install for full details.

For those of you who work on several Drupal sites across various versions and installations, Drush provides an “alias” mechanism to define the common parameters. To create an alias for this example site here, you can create a file ~/.drush/aliases.drushrc.php containing the following PHP code:
$aliases['example'] = array(
  'root' => '/var/www/example/drupal',
  'uri' => 'example.com',
);


Now you can run drush commands for your example site from any directory usingdrush @example  (for example, drush @example status). To make things even better, aliases can reference remote sites (accessible via SSH) by including the remote-host and remote-user options. See the example.aliases.drushrc.php file from the examples folder in your Drush install directory for full details.




Wednesday, January 4, 2012

Amazon Web Services: Object Expiration to S3 Files

The management of temporary files, logs, media files, etc. at AWS will be easier. Amazon has just added object expiration, which allows developers set up rules for the automated deletion of files stored in S3.
Object Expiration allows the scheduled removal of objects after a defined time period.
Developers can add rules for deleting files with a specific prefix (like logs/ or photos/) and set the expiration period (in days) for objects.
Version-enabled can't have object expiration. For more information, check out the specific S3 developer guide on the AWS Documentation site.

Wednesday, December 7, 2011

Updating Kloxo from 6.1.7. to 6.1.10

You can have problems updating Kloxo to version 6.1.10 (especially from 6.1.7) with using 'auto update' or 'update home' on kloxo.

short solution:
Run /script/cleanup

if this don't work try this:
# update your linux distribution
yum update
# shell command version for update kloxo
sh /script/upcp
# cleanup process kloxo settings
sh /script/cleanup
# restart some services
service xinetd restart
# Better reboot after that
reboot

Sunday, November 27, 2011

Startup Script Red5 working with ubuntu 11.x

You may  wish have red5 started at boot.
This script should help you.
It is assumed that your red5 script is located at /usr/share/red5:


cd /etc/init.d/
touch red5
chmod 755 red5
vi red5

Paste below code
#! /bin/sh
# /etc/init.d/red5
#
# Check for missing file
RED5_DIR=/usr/share/red5
test -x $RED5_DIR/red5.sh || exit 5

case "$1" in
   start)
      echo -n "Starting Red5 Service"
      echo -n " "
      cd $RED5_DIR
      su -s /bin/bash -c "$RED5_DIR/red5.sh &" red5
      sleep 2
       ;;
   stop)
       echo -n "Shutting down red5"
       echo -n " "
       su -s /bin/bash -c "killall -q -u red5 java" red5
       sleep 2
       ;;
   restart)
       ## Stop the service and regardless of whether it was
       ## running or not, start it again.
       $0 stop
       $0 start
       ;;
 esac

then you maybe need

useradd red5

and use like
service red5 start
service red5 stop
service red5 restart