I was asked to implement a chat server and I did run into a few snags although overall; it wasn’t too bad of an experience. I’ve noted the issues and their resolution for everyone’s benefit so enjoy! This post is kind of in a “note form”, a list of commands without too much chatter. If you have questions feel free to ask.
Install instrucations: OpenFire Chat Server,Ubuntu with Red5
Install Core Components:
Open a terminal, command prompt or whatever you want to call it :)
Type in your password and hopefully you’ll get a prompt with root access
apt-get install apache2
apt-get install php5 libapache2-mod-php5
apt-get install mysql-server
apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
At the bottom of that file add this line:
Save it, usually I have to do a ctl+alt+x if I’m ssh’d to the machine or if you’re right on the console just ctl+x.
apt-get install sun-java6-bin
That’s pretty much it for installing your core components, Apache, PHP, MySQL and Java.
Preliminary Troubleshooting issues to look out for:
Issue: Apache PhpMyAdmin issue fix – I had some errors with Apache2 and PhpMyAdmin because of missing conf files
Does /etc/apache2/conf.d/phpmyadmin.conf exist? If not, does /etc/phpmyadmin/apache.conf exist?
If the first doesn’t exist and the second does, try this “fix”:
ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
Issue: PhpMyAdmin issue
* comment out the admin section
Pre-configuration for OpenFire:
Creating the DB’s – this is where I part ways with the reference site
mysql -h localhost -u root -p
create database openfire;
CREATE USER ‘openfire’@’localhost’ IDENTIFIED BY ‘whateverpasswordyouwanthere’;
grant all on *.* to ‘openfire’@’%’ identified by ‘whateverpasswordyouusedhere’; flush privileges;
Now to “quit” your mysql prompt type in: \q
* Note that you can call your database and user anything you want, I use “openfire” out of convenience.
Download the latest release:
wget http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_3.6.4_all.deb <– Can be whatever latest is
*Note: it downloads the files as “downloadServlet?filename=openfire%2Fopenfire_3.6.4_all.deb” so you need to do a:
mv downloadServlet?filename=openfire%2Fopenfire_3.6.4_all.deb openfire_3.6.4_all.deb
dpkg -i openfire_3.6.4_all.deb
Browse to: http://yourhost.com:9090 it can also be http://ipaddresshere:9090
*Note: http://yourhost.com:9091 ← Secure Chat Channel
I think you get an “installation” page and you don’t have to logon the first time you hit that URL, it’ll walk you through the configuration upon first use, creating username and password, etc.
*Note: PhpMyAdmin Page URL: http://yourhost.com/phpmyadmin or http://ipaddresshere/phpmyadmin
Plugins directory for OpenFire on Ubuntu: /usr/share/openfire
Installing Red5 Plugin:
That should have downloaded the red5.war file and restarted openfire which THEN creates a “red5” directory in your plugins folder, the “red5” directory in the plugins folder will NOT be there until you do the above steps.
Red5 URL: http://yourhost.com:7070/red5/red5.html or http://ipaddress:7070/red5/red5.html
You can now login to your OpenFire Chat Server and navigate to the plugins directory, there you’ll see red5 in the list!
Navigate to & configure your options for the red5 plugin:
Here’s the “sparkweb” page WITH Red5:
Here’s the “sparkweb” page WITHOUT Red5:
Lastly! Here’s where you can find the red5-plugin for the SPARK Chat Client: /usr/share/openfire/plugins/red5/spark/red5-plugin.jar – just drop it in the plugins folder “C:\Program Files\Spark\plugins”, restart SPARK.
One of the ONLY bummers is the “video” on the web chat interface is tiny, I haven’t yet played with it enough to see if there are any options to make the video larger so it’s actually useful. You can use the Red5 server for a lot of things not just OpenFire Chat.
Pidgin IM Settings for OpenFire
Here are my settings for Pidgin that worked over a secure connection.
Username: Pretty straight forward one :p
Domain: This must be the name of your chat server (mine was “chat”)
Resource: I left that blank
Password: Again; pretty straight forward :p
* Remember password, warning – it’s saved in an XML file in plain text
Connection Security: Ese encryption if available (note that if you mandate this setting it doesn’t work but if it’s “optional” it will choose to use the secure connection over the non secured one if you have port 5223 open to your chat server). After setting this I then went back and made it mandatory, not sure if setting it mandatory by default will work so let me know! :)
Connection port: 5222 (5223 didn’t work even though I confirmed the port is open)
Connect server: Whatever yours is, maybe an IP (10.0.0.200) or maybe a FQDN like chat.imawesome.net. * I recommend using the FQDN in case you change IP’s you don’t have to mess around.
Proxy type: No Proxy
Once you get all those settings in you’re golden! This is only if you want to use Pidgin IM as a chat client. If you’re going to use the web chat feature with “fastpath” you need to have the spark chat client (which is actually pretty nice!).