Wednesday, June 24, 2009

Configure openfire On Ubuntu

Installing openfire http://www.igniterealtime.org/projec...fire/index.jsp

Step-1
For Java 6 you will need to edit your SOURCES.LIST to enable this repository.
Code:
$ sudo vi /etc/apt/sources.list
Uncomment the following line(s):
Default source.list.
Code:
# deb http://us.archive.ubuntu.com/ubuntu/ dapper-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ dapper-backports main restricted universe multiverse
Uncommented.
Code:
deb http://us.archive.ubuntu.com/ubuntu/ dapper-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ dapper-backports main restricted universe multiverse

Optional
Update system.
Code:
$ sudo apt-get update

Step-2

Check java versions on your system.
Code:
$ java -version

Step-3
Install java6 If you don't have java already installed.
Code:
$ sudo apt-get install sun-java6-bin

Step-4
Configure Java.
Code:
$ sudo update-alternatives --config java
Select java6 for your default.
select /usr/lib/jvm/java-6-sun/jre/bin/java
To create a database for openfire MySQL, Oracle, Microsoft SQLServer, PostgreSQL, IBM DB2, or HSQLDB can be used. I chose MySQL since it was installed with my LAMP setup.



Step-5
Download Openfire to a directory. I chose the /opt/ directory.
Code:
# cd /opt

Step-6
Download File or go here to get the most recent: http://www.igniterealtime.org/downlo...x.jsp#openfire
Code:
# wget http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_3_3_2.tar.gz

Step-7
Extract the files.
Code:
# tar -zxvf openfire_3_3_2.tar.gz

Step -8
Create a symlink
Code:
# ln -s /opt/openfire/bin/openfire /etc/init.d/

Step-9
Make the symlink executible
Code:
# chmod +x /etc/init.d/openfire

Step-10
Add openfire to our startup.
Code:
# update-rc.d openfire defaults

Step-11
Fix the nohup output.
Code:
# vim /opt/openfire/bin/openfire
Modify openfire script with the following: >../logs/SDTOUT.log 2>../logs/SDTERR.log into /opt/openfire/bin/openfire

ORIGINAL:
Code:
nohup "$app_java_home/bin/java" -server -Dinstall4j.jvmDir="$app_java_home"
-Dexe4j.moduleName="$prg_dir/$progname" $INSTALL4J_ADD_VM_PARAMS
-classpath "$local_classpath" com.install4j.runtime.Launcher start
org.jivesoftware.openfire.starter.ServerStarter false false "$prg_dir/../logs/stderror.log"
"$prg_dir/../logs/stdoutt.log" true true false "" true true 0 0 "" 20 20 "Arial" "0,0,0" 8 500
"version 3.3.2" 20 40 "Arial" "0,0,0" 8 500 -1 -DopenfireHome=$app_home
-Dopenfire.lib.dir=$app_home/lib &
Goto line 262 of /opt/openfire/bin/openfire and insert the following at the end of nohup .... with >../logs/STDOUT.log 2>../logs/STDERR.log

MODIFIED:
Code:
nohup "$app_java_home/bin/java" -server -Dinstall4j.jvmDir="$app_java_home"
-Dexe4j.moduleName="$prg_dir/$progname" $INSTALL4J_ADD_VM_PARAMS
-classpath "$local_classpath" com.install4j.runtime.Launcher start
org.jivesoftware.openfire.starter.ServerStarter false false "$prg_dir/../logs/stderror.log"
"$prg_dir/../logs/stdoutt.log" true true false "" true true 0 0 "" 20 20 "Arial" "0,0,0" 8 500
"version 3.3.2" 20 40 "Arial" "0,0,0" 8 500 -1 -DopenfireHome=$app_home
-Dopenfire.lib.dir=$app_home/lib >../logs/STDOUT.log 2>../logs/STDERR.log &

Step-12
Now lets start Openfire (xmpp-server). Restart or run the following command to start Openfire:
Code:
# sudo /opt/openfire/bin/openfire start
Now setup the rest of Openfire through your browser.
http://localhost:9090

Note:-For reference one can use this link

http://ubuntuforums.org/showthread.php?t=525670

No comments:

Post a Comment