Friday, October 5, 2012

Setting up an Openfire chat server on Ubuntu server




Once installed, log into the new Ubuntu server and take the following steps:

~ $ sudo -s
~ # aptitude update
~ # aptitude upgrade
~ # tasksel *Select Lubuntu minimal Install
~ # aptitude install leafpad
~ # aptitude install chromium-browser
~ # aptitude install phpMyAdmin
Reboot



Installing Java:

~ $ sudo -s
~ # aptitude install python-software-properties *may not be needed
~ # add-apt-repository ppa:webupd8team/java
~ # aptitude update
~ # aptitude install oracle-java7-installer
~ # aptitude install oracle-jdk7-installer
~ # java -version



Add database and user to Mysql:


Open the Chromium Web browser and go to: http://(serverip)/phpmyadmin

On the main page, locate Priviledges and scroll down to Add a new User.

Username: Enter a username, I used ‘openfire’

Host: From the drop down menu, select localhost

Password: Enter a password, retype your password

Under the Database for user section of that page, click on the radio button for Create database with same name and grant all priviledges.

Click create user



Install Openfire:


~ $ sudo -s
~ # cd /opt
~ # wget http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire(version).tar.gz
~ # tar zxvf (file name)
~ # ln -s /opt/openfire/bin/openfire /etc/init.d/
~ # chmod +x /etc/init.d/openfire
~ # cd /opt/openfire
~ # update-rc.d openfire defaults
~ # nohup ls >ls.log 2>&1 &
~ # /opt/openfire/bin/openfire start
Open the Chromium Web browser and go to: http://(serverip):9090

Database settings: Standard Database Connection

Database Settings: use the user name and database info you created in phpmyadmin

Profile Settings: Directory Server

Server Type: Active Directory

Host: "your domain controller"

Port: 636

Base DN: DC="server",DC="foo",DC="com"

Administrator DN: CN="domainadmin",OU="Departments",DC="domain",DC="com"

Password: your admin password

Advanced settings: use SSL = YES

Set which users should have administrator rights on the server, and log in. You should be up and running.

Now just configure Pidgin or some other chat client that supports XMPP(jabber) and your ready to chat!