Friday, November 18, 2011

Redis Installation in Linux

     Redis is a open source, advanced key-value store, and is intended as a datastore solution for applications where performance and flexibility are more critical than persistence and absolute data integrity. Installation of redis is very simple.

#cd /usr/src/
#wget http://redis.googlecode.com/files/redis-2.4.2.tar.gz
#tar xzf redis-2.4.2.tar.gz
#cd redis-2.4.2
#make

The binaries that are now compiled are available in the src directory. You have to create an soft link of it as

#ln -s src/redis-server /bin/redis-server
#ln -s src/redis-cli /bin/redis-cli

Start Redis Server as

#redis-server

Now, You can interact with Redis using the built-in client:

#redis-cli
redis> set foo bar
OK
redis> get foo
"bar"

Thursday, November 17, 2011

Installation of OAuth support in PHP of Linux

  OAuth is an authorization protocol built on top of HTTP which allows applications to securely access data without having to store usernames and passwords. And the installion procedure as follow.

#cd /usr/src/
#wget http://pecl.php.net/get/oauth-1.2.2.tgz
#tar jxvf oauth-1.2.2.tgz
#cd oauth-1.2.2
#phpize
#CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ./configure
#make && make install

After installing the OAuth add the extension in php.ini file.

#vim /etc/php.ini

Append the OAuth extension as

extension=oauth.so

Restart apache service to take effect of php.ini

/etc/init.d/httpd restart

Now, You can see the OAuth module in php by running the below command

#php -m | grep oauth

FFMPEG-PHP Installation in Linux

      ffmpeg-php is an extension for PHP that adds an easy to use, object-oriented API for accessing and retrieving information from video and audio files. And the installation procedure as follow.

#cd /usr/src/
#wget http://garr.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.6.0.tbz2
#tar jxvf ffmpeg-php-0.6.0.tbz2
#cd ffmpeg-php-0.6.0
#phpize
#./configure
#make; make install

After installing the ffmpeg-php add the extension in php.ini file.

#vim /etc/php.ini

Append the ffmpeg-php extension as

extension=ffmpeg.so

Restart apache service to take effect of php.ini

#/etc/init.d/httpd restart

Now, You can see the ffmpeg module in php by running the below command

#php -m | grep ffmpeg

Tuesday, November 15, 2011

RED5 Server Installation in Linux

         RED5 is open source flash server written in java supports streaming audio/video, recording client streams, shared objects, live stream publishing etc. Here i have describe the procedure for installing Red5 in Linux.

1.Java Installation:

Installation in RPM based Linux such as fedora, centos, redhat :

#yum -y install java-1.6.0-openjdk java-1.6.0-openjdk-devel

Installation in Debian based Linux  such as Debian, Ubuntu, Kubuntu:

#apt-get install java-package

2.Apache Ant and IVY Installation:

#cd /usr/local/
#wget http://mirrors.isu.net.sa/pub/apache//ant/binaries/apache-ant-1.8.2-bin.tar.bz2
#tar -jxvf apache-ant-1.8.2-bin.tar.bz2
#ln -s apache-ant-1.8.2 ant

#svn co https://svn.apache.org/repos/asf/ant/ivy/core/trunk ivy
#cd ivy
#/usr/local/ant/bin/ant jar
#cp build/artifact/jars/ivy.jar ../ant/lib/

3.REd5 Installation:

#cd /usr/local
#svn checkout http://red5.googlecode.com/svn/java/server/trunk/ red5
#cd red5
#/usr/local/ant/bin/ant prepare
#/usr/local/ant/bin/ant dist
#cp -r dist/conf .
#./red5.sh &

Once you start the red5 server, you can check the Red5 Installation in  the browser using the url as below.

  http://yourip:5080

Thursday, November 10, 2011

What is TTY and PTS in Unix


TTY :

  Teletypewriter originally and now also means any terminal on Linux/Unix systems. It also means any serial port on Unix/Linux systems.

PTS :

 Stands for pseudo terminal slave.

  Main difference between TTY and PTS is the type of connection to the computer. TTY ports are direct connections to the computer such as a keyboard/mouse or a serial connection to the device. PTS connections are SSH connections or telnet connections. All of these connections can connect to a shell which will allow you to issue commands to the computer.