Openfire

From SME Server
Jump to navigation Jump to search
Incomplete.png Incomplete:
This article or section needs to be expanded. Please help to fill the gaps or discuss the issue on the talk page



Openfire 3.3.3 Howto

Openfire (formerly Wildfire) is a real time collaboration (RTC) server dual-licensed under the Open Source GPL and commercially. It uses the only widely adopted open protocol for instant messaging, XMPP (also called Jabber). Openfire is incredibly easy to setup and administer, but offers rock-solid security and performance.


Download jre-6u3-linux-i586-rpm.bin & Openfire 3.3.3

Go to http://www.java.com/en/download/linux_manual.jsp and download the Linux RPM (self-extracting file)

copy or move jre-6u1-linux-i586-rpm.bin into /tmp

cd /tmp
chmod a+x jre-6u1-linux-i586-rpm.bin
sh jre-6u1-linux-i586-rpm.bin

Download Openfire

Go to http://www.igniterealtime.org/downloads/index.jsp and click on linux & download openfire_3_3_3.tar.gz

NOTE: DO NOT DOWNLOAD THE RPM

copy or move openfire_3_3_3.tar.gz into /tmp

tar xvzf openfire_3_3_3.tar.gz
mv /tmp/openfire /opt
chown -R www.www /opt/openfire
chmod 750 /opt/openfire

Create the Database

To create the Openfire Database, you'll need to perform each of the following steps:

mysqladmin create openfiredb
mysql -e "grant all privileges on openfiredb.* to openfireuser@localhost identified by 'yourpassword'"
mysql -e "flush privileges"
cd /opt/openfire/resources/database
mysql openfiredb < openfire_mysql.sql

IMPORTANT: You may wish to alter the "openfireuser" and "yourpassword" information in the grant privileges line above. BE SURE TO REMEMBER WHAT YOU USED AS THE WEB MANAGER WILL ASK YOU FOR IT!

Access MySQL from the local network

To use the MySQL database you will need to run a script to make port 3306 available to the Openfire Instant Messaging Server.


/sbin/e-smith/config setprop mysqld LocalNetworkingOnly no
/sbin/e-smith/expand-template /etc/my.cnf
/etc/rc.d/rc7.d/S50mysqld restart

Use the netstat -ant command to check status

netstat -ant
---------------------------------------------------------------------------------

	Look for the following line in your `netstat -ant` result:

	tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN

	While you're looking, you should see the ports that wildfire will be using:

	tcp        0      0 0.0.0.0:9090            0.0.0.0:*               LISTEN
	tcp        0      0 0.0.0.0:9091            0.0.0.0:*               LISTEN
	tcp        0      0 0.0.0.0:5222            0.0.0.0:*               LISTEN
	tcp        0      0 0.0.0.0:5223            0.0.0.0:*               LISTEN
	tcp        0      0 0.0.0.0:5269            0.0.0.0:*               LISTEN

Start the Openfire Messaging Server

cd /opt/openfire/bin
./openfire start


Go to http://yourserver:9090 (insecure) or https://yourserver:9091 (secure)and follow through the setup via the browser. The only area that may be confusing is the database setup area. See example configuration below.

 

 

 



Database Driver Presets: MySql

JDBC Driver Class: com.mysql.jdbc.Driver


Database URL: jdbc:mysql://localhost:3306/openfiredb

Username: openfireuser

Password: yourpassword

 

Openfire daemon

Need to create a openfire daemon that will load at start upS et Up Initialization So Openfire Starts On A Server Reboot

cd /opt/openfire/bin/extra
chmod 700 redhat-postinstall.sh
./redhat-postinstall.sh
cd /opt/openfire/bin
chmod 755 openfire

Create symbolic link to the script at runlevel 7 (/etc/rc7.d)

cd /etc/rc7.d
ln -s  /opt/openfire/bin/openfire S90openfire

Reboot your server to make sure the openfire daemon initializes on startup...

shutdown -r now


OPTIONAL

If you would like to have web access to the openfire documentation has been installed on your server, this section will show you how to make an e-smith custom template.

Make the custom-template directory:

mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf

Create and edit a file called "99openfire"

pico -w 99openfire

(add the code shown below to the template) (you can select and copy then paste in PuTTY with right click)


# Openfire instant messaging server


Alias /openfire /opt/openfire

<Directory /opt/openfire>
     AddType application/x-httpd-php .php .php3 .phtml
     Options Indexes +Includes FollowSymLinks
     order deny,allow
     deny from all
     allow from all
</Directory>


# end of Openfire fragment



ctrl-x to save, y to agree, and [Enter] to exit the PICO editor

Expand the template

expand-template /etc/httpd/conf/httpd.conf
/etc/rc.d/init.d/httpd-e-smith restart

access your documentation at:

http://yourservername-or-IP/openfire/documentation/

To reiterate, this is NOT an essential step in the installation process and only provides local access to the documentation.

Uninstalling Openfire

Commands to remove openfire

  1. yum remove openfire
  2. mysqladmin drop openfiredb


Russell Taihn