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, August 19, 2012
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.
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.
Here is how to do change ports in Red5:
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
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 CPUsApache:
Apache 2.2 or higher with following modules enabled: rewrite, headers, expires, filter, deflate, file_cache, env, proxyMySQL:
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 installed32-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:
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.
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
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
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:
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.
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
- Change into your Web server's root directory (cd /var/www).
- Run drush dl drupal-7.0. This downloads Drupal 7.0 from drupal.org and extracts the files into /var/www/drupal-7.0.
- 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.
$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
Subscribe to:
Comments (Atom)



