Monday, September 22, 2014

how to install openfire chat server 3.9.3 with external mysql database in ubuntu




Openfire (previously known as Wildfire, and Jive Messenger) is an instant messaging (IM) and groupchat server that uses XMPP server written in Java and licensed under the Apache License 2.0
Follow the steps below to install Open Fire 3.9.3 with embedded databases in Ubuntu.

Step 1. Update your server
  • SSH your server as root user or use sudo
  • sudo apt-get update
  • sudo apt-get upgrade

Step 2.  Install latest version of Oracle JRE/JDK.
  • sudo apt-get install python-software-properties
  • sudo add-apt-repository ppa:webupd8team/java
  • sudo apt-get update

Step 3. If you are already using OpenJDK, remove it to minimize any Java conflicts.
  • sudo apt-get remove --purge openjdk*

Step 4. Then install Oracle Java 7 version.
  • sudo apt-get install oracle-java7-installer

Step 5. Install MySql Database server
  • sudo apt-get install mysql-server
  • sudo mysql -u root -p
  • mysql> CREATE DATABASE dbopenfire CHARACTER SET='utf8';
  • mysql> CREATE USER 'openfire'@'localhost' IDENTIFIED BY 'openfirepwd';
  • mysql> GRANT ALL PRIVILEGES ON dbopenfire.* TO openfire@localhost WITH GRANT OPTION;
  • mysql> FLUSH PRIVILEGES;
  • mysql> quit
Step 6. Download and Install openfire 3.9.3
  • cd /tmp
  • wget http://download.igniterealtime.org/openfire/openfire_3.9.3_all.deb
  • dpkg -i openfire_3.9.3_all.deb
if you are facing any issue in wget download the deb package from the link 

Ignore all installation errors regarding user and folder permissions.it cause depending on your version of JRE/JDK.
  •  vi /etc/init/d/openfire
 If there is no such file created the move to the next step else you need to edit file and replace java-6-sun with java-6-oracle or java-7-oracle . 
  • Replace java-6-sun with java-6-oracle or java-7-oracle
  • sudo apt-get install rpl
  • sudo rpl '6-sun' '7-oracle' /etc/init.d/openfire
  • sudo service openfire start

Step 7. Allow ports for Openfire as they are used.
  • sudo ufw allow 9090/tcp
  • sudo ufw allow 9091/tcp
  • sudo ufw allow 5222/tcp
  • sudo ufw allow 7777/tcp
  • sudo ufw allow 7443/tcp
  • sudo ufw allow 7070/tcp
  • sudo ufw allow 3478/tcp
  • sudo ufw allow 3479/tcp





2 comments:

Unknown said...

Managed to get answer after do some google..

echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
apt-get update
apt-get install oracle-java7-installer

Unknown said...

Hii Thorsten,

it seems like you faced issue with the installation of java and you added it to source.list which resolved the issue thums up :-)

Post a Comment

Do Write about the Blog and Welcome to the world where open source is every thing :-)