Homepage / Technology / Internet / Migrating Openfire Instant Messaging Service
Google Helpouts – A Help Provider’s Review How Much Water Should I Drink Every Day? Installing Google Wallet on Android Outside the United States Q: Is Spirituality the Opposite of Science? A: Definitely not How to Remove io9’s Space Wasting Sidebar I’d be Leery of Google Keep, Google’s Evernote Competitor FUD and Sensationalism from F-Secure on Android Malware Numbers The Definition of Irony in Web Design Weight Loss Status Update, Day 120 Weight Loss Status Update, Day 60 Weight Loss Status Update, Day 30 Weight Loss & Unconventional Eating Habits Weight Loss Problems Despite Following All the Conventional Wisdom How Strategic Voting Subverts Democracy Response to Vic Toews’ Email re Bill C-30 Privacy Concerns One Million Moms protests sexuality of JC Penny’s new spokesperson Ellen DeGeneres Review: Samsung Sidekick 4G From T-Mobile GoDaddy’s Stance On SOPA Shows Off Their Ignorance In More Ways Than One! Android 472% Malware Increase Scare Is Sensationalist Fix VSFTPD Slow Directory Listings & Timeouts Tablet Computing: Apple Only? Using Linux to Root the Sidekick 4G (Samsung Galaxy Series SGH -T839) Linux Tip: Permanently Disable NumPad Mouse Keys Google Music releases Linux Music Manager! Migrating Openfire Instant Messaging Service PBX In A Flash: Custom Dialplans & FreePBX Android App Review: Remote Desktop For Your Phone! PBX In A Flash: Send Email Using Gmail / Google Apps Android Security Apps Review: Lookout, SeekDroid, Cerberus, Prey & Theft Aware How To Get Amazon’s Free Android Apps From Outside The US Google Music Beta Impressions (vs Subsonic) Swype & SwiftKeyX Android Virtual Keyboards Review Why You Can’t Just Tell Your Computer What You Want It To Do Cellphone Use Is NOT Giving You Cancer Facebook Messages Offering “Unprecedented”? Um, No… Etsy: Great Community Care & Responsiveness! Etsy: Now Worse Than Facebook For Respecting User Privacy? Android: Major Malware Killed Fast & Clean Facebook’s Privacy Breaches And Plans On Exposing More Personal Info Facebook’s New “Like”: Instead Of You, Websites Get To Post Why You Like Them Is Mexico Safe To Visit? Definitely! Cost Of Living In Bucerias CRTC Backpedals On Allowing False News Broadcasting! Facebook: Now With Even Less Social Networking! Pro CRTC Amendment 2010-931 Arguments & Responses How To Install Carrier-Blocked Android Apps Without Rooting Your Phone Take Action On The CRTC’s Amendments To Allow News Broadcasters To Report Opinions Or Lies As Facts Ninjerktsu’s “Carl Sagan and his Fully Armed Spaceship of the Imagination” As A Single Image Puerto Vallarta & Area: Tips For Snowbirds Bucerias: A Snowbird’s Impressions Facebook: Why The Sudden Monetization Push? Facebook Outrage Du Jour: Your Posts Can Be Sold For Ads Handy Android App: FilesAnywhere, A Fax For Your Phone Facebook Apps Can Now Access Your Address & Mobile Number Diaspora – My Impressions Two Months In First Beach Day of 2011, in Bucerias! Handy Android App: Google Voice Callback Free Swype Touchscreen Keyboard For Android Signal Strength Drop – iPhone 4 vs Droid Facebook Privacy & Security Tips Making Google Voice Work After Moving To Canada Implanted Contact Lenses – Best $5000 I *EVER* Spent! Quantum Darwinism! Pantheism, Monotheism, Atheism, And Communication

Internet, Software, Technology, Telecommunications

Migrating Openfire Instant Messaging Service

Jive Software’s community software organization Ignite Realtime has some great products available.  One of the best is the Openfire, a real time collaboration (instant messaging) server: it’s open source, based on the XMPP (Jabber) transport open standard for easy integration with other tools and clients, is actively developed and widely used.  For companies needing an instant messaging solution it has a lot to offer and I install it for quite a few clients.

I recently needed to move an installation using MySQL running on an Ubuntu server to a new PBX in a Flash (CentOS) server.  On Debian systems this is a breeze as the package is well maintained in the repositories, but on CentOS it’s a little more involved.  Here’s how I did it:

  1. Openfire isn’t available using yum, so the first step is to download the rpm.  You can get it from Ignite Realtime’s downloads page to get the latest version, or use wget to snag openfire-3.7.0-1.i386.rpm.  It includes it’s own Java runtime, so you don’t have to worry about dependencies.
    Since this was a migration and I didn’t want to do an upgrade and then troubleshoot any possible complications from upgrading and migrating simultaneously, I needed to download an older version.  This was much more painful than it needed to be as unfortunately Ignite Realtime doesn’t seem to maintain an online archive for older versions.  After some experimentation I figured out the package name and was able to use wget to pull it from the download URL.
  2. Logging into MySQL on the CentOS server, I created an “openfire” database and then gave access rights to a new user created using the same name and password as the MySQL openfire account on the Ubuntu server.
  3. On both servers, I stopped the openfire and mysql services.
  4. Since it was a migration, the configuration information such as the server name was staying the same.  I could just copy the Ubuntu server’s /etc/openfire/openfire.xml onto the CentOS server at /opt/openfire/conf/openfire.xml.
  5. I used tar to copy the Ubuntu server’s /etc/openfire/plugins directory to the CentOS server’s /opt/openfire/plugins directory (keeping the same permissions – don’t forget the -p flag!).
  6. On CentOS, I had to recursively chown the plugins directory and the openfire.xml for daemon:daemon (on Ubuntu, it’s openfire:openfire).
  7. I then copied /var/lib/mysql/openfire/ from the Ubuntu server to /var/lib/mysql/openfire/, making sure to keep the permissions when I tarred up the files and after untarring making sure the file ownership was mysql:mysql.
  8. Since PBX in a Flash uses IPTables as a firewall, that needs to be updated as well.  I added
    -A INPUT -p tcp -i eth0 –dport 5222 -j ACCEPT
    -A INPUT -p udp -i eth0 –dport 5222 -j ACCEPT
    -A INPUT -p tcp -i eth0 –dport 7777 -j ACCEPT
    -A INPUT -p udp -i eth0 –dport 7777 -j ACCEPTr0
    -A INPUT -p tcp -i eth0 –dport 9090 -j ACCEPT
    -A INPUT -p udp -i eth0 –dport 9090 -j ACCEPT
    -A INPUT -p tcp -i eth0 –dport 9091 -j ACCEPT
    -A INPUT -p udp -i eth0 –dport 9091 -j ACCEPT

    to /etc/sysconfig/iptables and updated iptables with the following command: iptables-restore < /etc/sysconfig/iptables.
  9. I started the MySQL and Openfire services up again on the CentOS server, and using Ignite Realtime’s Spark instant messaging client I connected to the server using the IP address.  Success!
  10. Finally I changed over the DNS entries to point at the new CentOS server.  Once the change had propagated, I logged in at http://www.mydomain.com:9090 using the original Debian username and password and verified the web console was up and running.

A bit tricky, but not too bad!  If you get stuck, there’s lots of info available by searching and you can always try the (unfortunately rather sparse) official Openfire documentation as well.

Post a Comment

Your email address will not be published. Required fields are marked *