Saturday, September 18, 2010

tshark (CLI) from wireshark (GUI) {gonna sniff your packets}

there is a wonderful CLI utility tcpdump to handle packet sniffing... but there is also one similar utility with the power of Wireshark at command line known as TSHARK (if you don't know)

so, to use it you just need to install Wireshark in plain old-skool way like
#yum install wireshark
and then to start 'tshark', you need to simply run it like
but in some cases, on running '#tshark' if it gives error like 
tshark: error while loading shared libraries: cannot open shared object file: No such file or directory

so, you just need to install one more library, which gets failed to install automatically still required
#yum install libsmi
and then run '#tshark' smoothly

Wednesday, September 1, 2010

{Deploy} Installing FreeSWITCH (VoIP) on CentOS, Fedora, RedHat

This HowTo can be downloaded at

FreeSWITCH on RedHat, Fedora, CentOS

To Install 'FreeSWITCH' on CentOS/RedHat/Fedora
Execute following commands at shell: 

Installing Dependencies {Require Internet} 
yum -y install autoconf automake libtool gcc-c++ ncurses-devel 
yum -y make expat-devel zlib zlib-devel libjpeg-devel unixODBC- devel 
yum -y openssl-devel gnutls-devel libogg-devel libvorbis-devel 
yum -y curl-devel libtiff-devel libjpeg-devel

Download/Extract FreeSWITCH Source =========================================== 
wget tar -zxvf freeswitch-1.0.6.tar.gz
Optional {to add OpenZAP support to FreeSWITCH} 
echo "../../libs/openzap/mod_openzap" >> freeswitch-1.0.6/modules.conf 

Compiling/Installing FreeSWITCH 
cd freeswitch-1.0.6 
make install 
make cd-sounds-install 
make cd-moh-install 
make uhd-sounds-install 
make uhd-moh-install 
make hd-sounds-install 
make hd-moh-install 
make sounds-install 
make moh-install 
make mod_portaudio-install 
make samples 

create symlink for main binaries, EZ-ACCESS 
ln -s /usr/local/freeswitch/bin/freeswitch /usr/local/bin/freeswitch 
ln -s /usr/local/freeswitch/bin/fs_cli /usr/local/bin/fs_cli

Post Installation =========================================== 
to launch app 
to launch app at background (no console)
#freeswitch -nc 
to stop a running freeswitch instance 
[] running foreground: 
> ... {i.e. 3 periods} 
[] running background: 
# freeswitch -stop 
to access cmd-line of any FreeSWITCH server 
try commands like 'version','help' to exit use 'fsctl shutdown' or '...' 

Tuesday, August 10, 2010

[PERL CPAN] Missing Perl Module... install by CPAN

it's an old thing still several users are unaware, so a quickie howto for all of them

[PERL CPAN] whenever any perl module found missing

CPAN is Comprehensive Perl Archive Network, a cool place to install Perl Modules instead of keep searching

you can simple install it as
"perl -MCPAN -e "install "
#perl -MCPAN -e "install Net::CIDR"

if it's giving error and asking a force install, most probably a depending module isn't present
so install that first, or if you still wanna install it do a FORCE install
#perl -MCPAN -e "CPAN::Shell->force(qw(install Net::CIDR))"

Tuesday, August 3, 2010

{Deploy} Installing RED5 Server on CentOS, Fedora, RedHat

Installing RED5 Server on CentOS, Fedora, RedHat

it's an Open Source Flash Server written in Java for Multimedia Streaming Web/Network Application

[] it requires Java 1.6 to be pre-installed
#yum -y install java-1.6.0-openjdk java-1.6.0-openjdk-devel
#yum -y install java-1.6.0-openjdk-javadoc java-1.6.0-openjdk-src

[] Setup 'Apache ANT', required to build Red5
#cd /usr/src
#tar jxvf apache-ant-1.8.1-bin.tar.bz2
#mv apache-ant-* /usr/local/ant

[] Settimg up ENV variables as per required
#export ANT_HOME=/usr/local/ant
#export JAVA_HOME=/usr/lib/jvm/java
#export PATH=$PATH:/usr/local/ant/bin

[] Download & Install RED5
#cd /usr/src
#svn co red5server
#mv red5server /usr/local/
#cd /usr/local/red5server
#ant prepare
#ant dist
#cp -r dist/conf ./

[] To use RED5 Server
- checking if it works
    browse 'http://RED5-Server-IP:5080/'
- to install your RED5 Server based applications
    copy them to dir '/usr/local/red5server/webappz'
    suppose you copy them to '/usr/local/red5server/webappz/myFlash'
    so they will be accessible at 'http://RED5-Server-IP:5080/myFlash/'
- to make it run at port 80 like any HTTP Server
    edit '/usr/local/red5/conf/red5-origin.xml' and '/usr/local/red5/conf/'
    by replacing all instances of Port# 5080 by simply Port# 80

{RPM} unRAR in CentOS, Fedora, RedHat

i found CentOS was a bit rude to UnRAR the rar files, and even in 'yum' installing the unrar {at least for me}... so here is rpm way for it... if you are also facing same problem

[] Downloading the suitable RPM {you can download from any location}

[] Installing RPM
rpm -Uvh unrar-3.6.2-1.el4.rf.i386.rpm

[] Using
- to extract RAR files in current dir
unrar e rarfile.rar

- to extract RAR files with Pathname
unrar x rarfile.rar