You are on page 1of 26

Installation Guide for

Openfire, Karaka and Skype in Debian Linux


Created By Samba
Setup and download Java:
Open sources.list file using "vi /etc/apt/sources.list" and insert the following lines if not already
there in the file.
deb http://ftp.uk.debian.org/debian/ etch main
#deb-src http://ftp.uk.debian.org/debian/ etch main
deb http://security.debian.org/ etch/updates main contrib
#deb-src http://security.debian.org/ etch/updates main contrib
deb http://www.backports.org/debian etch-backports main contrib non-free
Install Java and JRE:
1. apt-get update
. apt-get upgrade --show-upgraded
!. apt-get install sun-"ava#-"dk
$his processes will take some time so please wait for few minutes
Insatall and start Openfire:
1. cd /usr/local/src
. mkdir openfire
!. cd openfire
4. wget http://www.igniterealtime.org/download%ervletfilename&openfire/openfire'!.#.!'all.deb and
please wait until you get message "(openfire'!.#.!'all.deb) saved".
5. *dpkg -i openfire'!.#.!'all.deb+ this will install openfire in your system
#. ,lease ignore the warning messages mentioned below
adduser: -arning: that home directory does not belong to the user you are currently creating.
7. .ow please use *ps -elf / grep openfire+ to see that openfire is running or not. 0ou will see
output like below

ps -elf / grep openfire
1 % openfire 23 1 ! 45 2 - 5!213 ste6t 27:14 8 22:22:2 /usr/lib/"vm/"ava-#-sun/bin/"ava -
server - 9openfire:ome&/usr/share/openfire - 9openfire.lib.dir&/usr/share/openfire/lib ; classpath /usr/
share/openfire/lib/startup."ar -"ar /usr/share/openfire/lib/startup."ar

2 < root !!4 #452 2 74 2 - 71 - 27:2 pts/2 22:22:22 grep openfire

Installing important packages:
Created By Samba
1. apt-get install subversion
. apt-get install libapache-svn
!. apt-get install 6fonts-base
1. apt-get install 6base-clients
5. apt-get install 6utils
#. apt-get install dbus
7. apt-get install screen
4. apt-get install 6vfb
9. =vfb :15 > please ignore messages like below
12. e6port 9?%,@A0&:15

error opening security policy file /etc/=11/6server/%ecurity,olicy
Bould not init font path element /usr/=11<#/lib/=11/fonts/miscC removing from listD
Bould not init font path element /usr/share/fonts/=11/cyrillicC removing from listD
Bould not init font path element /usr/share/fonts/=11/122dpi/:unscaledC removing from listD
Bould not init font path element /usr/share/fonts/=11/75dpi/:unscaledC removing from listD
Bould not init font path element /usr/share/fonts/=11/$ype1C removing from listD
Bould not init font path element /usr/=11<#/lib/=11/fonts/$ype1C removing from listD
Bould not init font path element /usr/share/fonts/=11/122dpiC removing from listD
Bould not init font path element /usr/share/fonts/=11/75dpiC removing from listD
Bould not init font path element /var/lib/defoma/6-ttcidfont-conf.d/dirs/$rue$ypeC removing from listD

Installing And Configuring Bind9:
1. apt-get install bind3
2. ,lease open file using "vi /etc/bind/named.conf.local" and add the below lines to that file
and save then e6it from that file using "escape : 6"
Eone "FyourdomainG" H
type masterI
file "/etc/bind/db.FyourdomainG"I
JI
12. Breate a file for 9.% entries using "touch /etc/bind/db.FyourdomainG"
11. .ow open this file add the entries mentioned below.
I
I K?.9 data file for local loopback interface
I
L$$@ #21422
M ?. %OA localhost. root.localhost. N
1 I %erial
#21422 I <efresh
4#122 I <etry
11322 I O6pire
#21422 P I .egative Bache $$@
I
M ?. .% localhost.
M ?. A 17.2.2.1
FyourdomainG ?. A F0ourserver?,G
:ere FyourdomainG is the hostname of your server and F0ourserver?,G is the server ip address.
Created By Samba
0ou can follow the links mentioned for detailed information and help regarding bind3 installiation
and configration and dns configuration "https://help.ubuntu.com/community/K?.93%erver:owto"
and "https://help.ubuntu.com/community/K?.93%erver:owto#,rimaryQ2RasterQ2%erver
Q2configuration"
1. vi /etc/resolv.conf and add the line nameserver 17.2.2.1
1!. /etc/init.d/bind3 restart and you will messages like below
%topping domain name service...: bind.
%tarting domain name service...: bind.
Installing ifferent !"t#on !ackages:
1. apt-get install python-all
. apt-get install python-"son
!. apt-get install python-simple"son
1. apt-get install python-ctypes
5. apt-get install python-crypto
#. apt-get install python-pyasn1
7. apt-get install python-mysSldb
4. apt-get install python-py6mpp
3. apt-get -y --force-yes install / grep python-py6mpp
12. cd apt-get -y --force-yes install / grep python-py6mpp
ownload $ARA$A Code And Cop" It %o !roper !lace:
1. cd /usr/local/src/
. mkdir karaka
!. cd karaka
1. svn checkout http://karaka.googlecode.com/svn/trunk/ karaka
5. cp -rf karaka/ /opt/
#. cd /opt/karaka/
7. cp conf/T.conf /etc/
4. cp bin/T /etc/init.d/
S$&!E !ackage Related Installations:
1. cd /usr/local/src
. wget http://nchc.dl.sourceforge.net/sourceforge/skype1py/%kype1,y-1.2.!1.2.tar.gE
!. tar -6vf %kype1,y-1.2.!1.2.tar.gE
1. cd /usr/local/src/%kype1,y-1.2.!1.2/%kype1,y/A,?
5. cp /opt/karaka/deps/%kype1,y-karaka.diff .
6. patch F %kype1,y-karaka.diff and you will see the outout as mentioned below
patching file posi6'611.py
:unk #1 succeeded at 34 with fuEE 1 Noffset 2 linesP.
:unk # succeeded at !!1 Noffset 15 linesP.
:unk #! succeeded at !1# Noffset 15 linesP.
7. verify lib611 path by running "dpkg -@ lib611-# / grep lib=11" and you will see output like
Created By Samba
below

FyourdomainG:/usr/local/src# dpkg -@ lib611-# / grep lib=11
/usr/lib/lib=11.so.#..2
/usr/lib/lib=11.so.#

8. vi posi6'611.py and goto line 11! and comment it with )#) in front of the line
9. ?nsert the line "libpath & "/usr/lib/lib=11.so.#..2" "ust below it and then save and e6it
from that file using "escape : 6"
12. cd ../../
11. .ow we build skype using command "python setup.py install"
1. cd ../
13. .ow we download skype client using command "wget
http://download.skype.com/linu6/skype-debian'.2.2.7-1'i!4#.deb"
11. apt-get -f install
15. install skype client: dpkg -i skype-debian'.2.2.7-1'i!4#.deb and you will messages like
below

N<eading database ... !351 files and directories currently installed.P
,reparing to replace skype .2.2.7-1 Nusing skype-debian'.2.2.7-1'i!4#.debP U
Vnpacking replacement skype U
%etting up skype N.2.2.7-1P U

$araka ata'ase Creation and Configuration:
1. apt-get install mysSl-server mysSl-client
2. Bhange root password using mysSladmin -u root password&"Es5e!v"
3. mysSl -h 17.2.2.1 -u root -p to see all the databases and use password )Es5e!v)
4. Breate Waraka database using command "mysSl -uroot -pEs5e!v F
/opt/karaka/karaka/api/createdb.sSl"
5. .ow connect to mysSl using command "mysSl -u mEs -p mEs" and password is Es5e!v
6. After getting mysSl prompt use command "use karakaI" then "show tablesI" this will
display like below

mysSlG use karaka
<eading table information for completion of table and column names
0ou can turn off this feature to get a Suicker startup with -A
9atabase changed
mysSlG show tablesI
X--------------------X
/ $ables'in'karaka /
X--------------------X
/ log /
/ registrations /
X--------------------X

Created By Samba
7. Y<A.$ A@@ O. karaka.T to )karaka)M)localhost) identified by )karaka)I
Openfire Configurations:
&ou can surel" follow t#e link installing-openfire-and-spark-debian-etch
1. Open the following V<@ in any browser http://F0ourserver?,G:3232/setup/inde6."sp and
this will open openfire setup wiEard start page
. %elect Onglish and press continue button and which is selected by default
3. .ow you are in "%erver %ettings" page and press "continue" button on the bottom right
corner of the page
4. .ow you are in "9atabase %ettings" page and press "continue" button on the bottom right
corner of the page
5. .ow you are in ",rofile %ettings" page and press "continue" button on the bottom right
corner of the page
6. ,rovide a valid email address and passwords of your choice and then press "continue"
button like soumyaMFanyZalidnameG.com and password Fprovide passwordGL
7. %o setup is complete and press the "@ogin to the administrative console" button
4. ,lease login using admin and password Fprovide passwordGL
9. .ow goto "%erver %ettings" $ab and choose "O6ternal Bomponents"
10. .ow select "enabled" radio button and enter "FanyZalidnameG?R" in the "9efault shared
secret:" te6t bo6 and leave everything unchanged and press the "%ave settings" button
11. .e6t come to Vsers/Yroups page and select "create new user" link and here we have to
create 1 users with proper passwords see image create.ewVser."pg
user.ame ,assword
----------- ---------
dialback Fprovide passwordG
slave21 Fprovide passwordG
register Fprovide passwordG
testuser Fprovide passwordG
1. ,lease refer to image users'summery."pg and you should see 1 users created and all are
offline now.
&ou can follow t#ese series of pictures displa"ed 'elow to confingure Openfire(
Created By Samba
Created By Samba
Created By Samba
Created By Samba
Created By Samba
Created By Samba
$araka Configurations:
1. cd /etc and then open configuration file "vi karaka-slave.conf" and delete every line from
line !# means from [slave2\ and now your file will look like as shown below
karaka)slave(conf file
[slave21\
secret&secret
port&5
server&server.e6ample.com
domain&e6ample.com
component&skype.e6ample.com
muc&skypemuc.e6ample.com

slave'secret&slave'secret
capacity&12
base&122
2. .ow we will change 5 attributes as "secret"C "server"C "domain"C "component" and muc and
now the file will look like as shown below
*odified Slave(conf
[slave21\
secret&Fprovide passwordG
port&5
server&F0ourserver?,G
domain&FyourdomainG
component&skype.FyourdomainG
muc&skypemuc.FyourdomainG

slave'secret&slave'secret
capacity&12
base&122
3. secret: $his is the password for user slave21 created in openfire "Vsers/Yruoups"
4. server: $his is the server ip address where karaka ans openfire are installed
5. domain: $his is the servers domain name
#. ,lease change domain name properly for component and muc and leave other thins
unchanged
7. .ow save and e6it from the karaka-slave.conf
8. open karaka configuration file "vi karaka-register.conf"
9. .ow we will change 5 attributes as "password"C "secret"C "server"C "domain"C "master" and
now the file will look like as shown below
Created By Samba
karaka)register(conf

[mysSl\
server&localhost
database&karaka
user&root
password&Es5e!v

[register\
register&register
secret&Fprovide passwordG
port&5
server&F0ourserver?,G
domain&FyourdomainG
master&skype.FyourdomainG

10. password: $his is the karaka database password/ mysSl password
11. secret: $his is the password for user register created in openfire "Vsers/Yruoups"
12. server: $his is the server ip address where karaka ans openfire are installed
13. domain: $his is the servers domain name
11. ,lease change domainname properly for master and leave other thins unchanged
15. .ow save and e6it from the karaka-slave.conf
16. open karaka configuration file "vi karaka-master.conf"
17. .ow we will change 5 attributes as "secret"C "server"C "domain"C "dialback'secret"C
"register"C "component" and "muc" and now the file will look like as shown below
karaka)master(conf

[master\
component&skype.FyourdomainG
muc&skypemuc.FyourdomainG
secret&FanyZalidnameG?R
port&575
server&F0ourserver?,G
domain&FyourdomainG
dialback&dialback
dialback'secret&Fprovide passwordG
register&registerMFyourdomainG/register I node && resourceC always
slave'secret&slave'secret

18. secret:$his is the shared secret configuraed in openfire "server settings" --G"e6ternal
components" --G "shared secret"
19. server: $his is the server ip address where karaka ans openfire are installed
20. domain: $his is the servers domain name
21. dialback'secret:$his is the password for user "dialback" created in openfire
Created By Samba
"Vsers/Yruoups"
22. don)t forgot change proper domain name in componentC muc and register
$araka Script Related C#anges:
1. cd /etc/init.d/
2. $here are total three scripts of our use related to karaka those are "karaka-master"C
"karaka-slave" and "karaka-register"
3. ?n all the three scripts controller will be BO.$<O@@O<&"/opt/karaka/" not
"/opt/karaka/trunk"
4. ,lease remove all the *sudo+ commands in all the scripts and files will look like as shown
below
$ARA$A)*AS%ER
,A$:&/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
%B<OO.&/usr/bin/screen
BO.$<O@@O<&"/opt/karaka/master.py"
,?9]?@O&"/tmp/karaka'master.pid"
.ARO&karaka-master
9O%B&WarakaRaster

test -6 L9AORO. // e6it 2

set -e

case "L1" in
start P
echo -n "%tarting L9O%B: "
L%B<OO. -% L.ARO -d -m LBO.$<O@@O<
echo "L.ARO."
II
stop P
echo -n "%topping L9O%B: "
[ -f L,?9]?@O \ >> kill (cat L,?9]?@O(
echo "L.ARO."
II
restart/force P
echo -n "<estarting L9O%B: "
[ -f L,?9]?@O \ >> kill (cat L,?9]?@O(
sleep 1
L%B<OO. -% L.ARO -d -m LBO.$<O@@O<
echo "L.ARO."
II
T P
.&/etc/init.d/L.ARO
echo "Vsage: L. Hstart/stop/restartJ" G>
e6it 1
Created By Samba
II
esac

$ARA$A)RE+IS%ER SCRI!%
,A$:&/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
%B<OO.&/usr/bin/screen
BO.$<O@@O<&"/opt/karaka/register.py"
,?9]?@O&"/tmp/karaka'register.pid"
.ARO&karaka-register
9O%B&Waraka<egister

test -6 L9AORO. // e6it 2
set -e

case "L1" in
start P
echo -n "%tarting L9O%B: "
L%B<OO. -% L.ARO -d -m LBO.$<O@@O<
echo "L.ARO."
II
stop P
echo -n "%topping L9O%B: "
[ -f L,?9]?@O \ >> kill (cat L,?9]?@O(
echo "L.ARO."
II
restart/force P
echo -n "<estarting L9O%B: "
[ -f L,?9]?@O \ >> kill (cat L,?9]?@O(
sleep 1
L%B<OO. -% L.ARO -d -m LBO.$<O@@O<
echo "L.ARO."
II
T P
.&/etc/init.d/L.ARO
echo "Vsage: L. Hstart/stop/restartJ" G>
e6it 1
II
esac
$ARA$A)S,A-E SCRI!%
,A$:&/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
%B<OO.&/usr/bin/screen
BO.$<O@@O<&"/opt/karaka/slave.py"
,?9]?@O&"/tmp/karaka'L.pid"
.ARO&karaka-L
9O%B&Waraka%lave

test -6 L9AORO. // e6it 2

Created By Samba
set -e

case "L1" in
start P
echo -n "%tarting L9O%B: "
L%B<OO. -% L.ARO -d -m LBO.$<O@@O< L
echo "L.ARO."
II
stop P
echo -n "%topping L9O%B: "
[ -f L,?9]?@O \ >> kill (cat L,?9]?@O(
echo "L.ARO."
II
restart/force P
echo -n "<estarting L9O%B: "
[ -f L,?9]?@O \ >> kill (cat L,?9]?@O(
sleep 1
L%B<OO. -% L.ARO -d -m LBO.$<O@@O< L
echo "L.ARO."
II
T P
.&/etc/init.d/L.ARO
echo "Vsage: L. Hstart/stop/restartJ" G>
e6it 1
II
esac
Running $araka:
1. .ow we will run "karaka-master"C "karaka-register" and "karaka-slave"
. cd /opt/karaka
!. /etc/init.d/karaka-master start
1. /etc/init.d/karaka-register start
5. /etc/init.d/karaka-slave start slave21
6. use command screen -ls and you will see three detached screen sessions as shown below
$here are screens on:
5!2.karaka-slave21 N9etachedP
5133.karaka-register N9etachedP
511.karaka-master N9etachedP
! %ockets in /var/run/screen/%-root.

7. .ow goto each screen and on each process console type command "status" and it should
display connected as shown below.
8. use screen -r screen.ame to connect to the screen and use Suit to disconnect it from that
console.
karaka registerG status
%tatus & BO..OB$O9
Created By Samba

karaka masterG status
%tatus & master:BO..OB$?.YC muc:BO..OB$?.Y

karaka slaveG status
%tatus & BO..OB$O9
3. .ow please open three openfire settings pages and refere to the saved screenshots from
the images directory and both should match.
10. aP http://F0ourserver?,G:3232/user-summary."sp Nuser-summary."pgP
bP http://F0ourserver?,G:3232/session-summary."sp Nsession-summary."pgP
cP http://F0ourserver?,G:3232/component-session-summary."sp Ncomponent-session-
summary."pgP
11. <un skype binary using command "echo "skype'user.ame Fprovide passwordG" / skype
--pipelogin" where "skype'user.ame" is the skype user name and "Fprovide passwordG"
is the password
Installing and configuring .*!! client
1. download pidgin from url
"http://biEnetnetworks.dl.sourceforge.net/sourceforge/pidgin/pidgin-.5.4.e6e"
. After successfull download install pidgin in your windows and choose all the default settings
from installation wiEard!.
3. .ow please open V<@ "http://F0ourserver?,G:3232/available-plugins."sp" and install ?R
Yateway ,lugin by pressing X sign at the right side of the row
4. .e6t goto the V<@ "http://F0ourserver?,G:3232/plugins/gateway/gateway-settings."sp"
and select all the available gateways
5. ,lease refer to images gateway."pg and plugin."pg from images folder
#. .ow start pidgin from your desktop
7. .ow add the =R,, account configured in openfire to pidgin by selecting Accounts--
GRanage Accounts--GAdd
8. ]rom advanced tab enter the server address where openfire is installed and leave
everything unchanged Npidgin1."pgP
9. ,lease follow the images from pidgin1."pg to pidgin1."pg
10. .o change status from "Offline" to "Available"
11. After successfull select "Kuddies" --G "Add Kuddie" Npidgin5."pgP
12. Add a buddy registerMFyourdomainG and please refer image Npidgin#."pgP
13. .ow your pidgin user list will look like image Npidgin7."pgP
14. 9pouble click the %kype user to open the chat window and from there send message
register skype'user.ame Fprovide passwordG where register is the registeration
Created By Samba
commandC skype'user.ame is a valid skype user name and Fprovide passwordG is the
skype password.,please refer pidgin4."pg
15. ,lease press enter to send this message and this should register your skype user
successfully and you will get confirmation messages.0ou should get two messages
"<egistration successful for skype'user.ame" and ",resence reSuest sent". ,lease refer to
image pidgin3."pg.
1#. After successfull registration karka databse should display the proper skype user entry in
the registration table as shown below.
mysSlG use karakaI
<eading table information for completion of table and column names
0ou can turn off this feature to get a Suicker startup with -A

9atabase changed
mysSlG show tablesI
X------------------X
/ $ables'in'karaka /
X------------------X
/ log /
/ registrations /
X------------------X
rows in set N2.22 secP

mysSlG select T from registrationsI
X-------------------X--------------X---------X
/ user"id / user / secret /
X-------------------X--------------X---------X
/ testuserMFyourdomainG / skype'user.ame / Fprovide passwordG /
X-------------------X--------------X---------X
1 row in set N2.22 secP
&ou can follow t#ese series of pictures displa"ed 'elow to configure "our .*!! client
pidgin(
Created By Samba
Created By Samba
Created By Samba
Open / Start Pidgin
Created By Samba
Manage / Add XMPP / Jabber Account
Created By Samba
Modify / Configure Your Account
Created By Samba
Provide Server IP
Created By Samba
Created By Samba
Created By Samba

You might also like