Install your own Jabber server with OpenFire on Ubuntu Linux

Openfire

Updated 04/05/2011

This is my first blog post, as I handle myself in blogs and technical forums, I am used to working with administrators and advanced users of GNU / Linux, the truth is that I have a hard time explaining simple things like using the terminal, creating a bash script and other tasks that little by little the GNU / Linux user is changing for applications with a graphical interface, I am doing my best so that they understand me and can carry out the steps.

Introduction to Jabber

Jabber is an open protocol based on the XML standard for the real-time exchange of messages and presence between two points on the Internet. The main application of Jabber technology is an extensible messaging platform and an IM (Instant Messaging) network that offers functionality similar to other systems such as AIM, ICQ, MSN Messenger, and Yahoo!

It stands out because it is different:
* Is open - the Jabber protocol is free, open, public and understandable. In addition, there are multiple open source implementations for Jabber Servers (see the list of public servers) as well as numerous clients and development libraries.
* It is extensible - Using the power of the XML language, anyone can extend the Jabber protocol for custom functionality. Of course, to maintain interoperability, common extensions are controlled by the Jabber Software Foundation.
* It is decentralized - Anyone can build their own Jabber server, it is also patent-free and does not depend on any company so that it can be used now and always with total freedom.
* It is safe - Any Jabber server can be isolated from the public Jabber network, any server implementation uses SSL for client-server communications, and many clients support PGP-GPG to encrypt client-to-client communications. Additionally, more robust security is under development thanks to the use of SASL and session passwords.
Jabber can initially create confusion with other instant messaging systems because typically, in other IMs, the client is identified with the protocol. In the case of Jabber this is not the case: there is a protocol and each of the clients is an implementation.

Original text in: JabberEN

employee

To create your own instant messaging system, we need an application that works as a server.
Openfire is a jabber server with web administrator (like a router or modem), written in java and is GPL, that is, OpenSource.

Ingredients:

Apache2 + MySQL + PHP5 and PHPMyAdmin

To install these applications we type in a terminal with permissions to use sudo

Note: # are comments, they are not executed, they are references for a better understanding.

# We install Apache2 + MySQL5.1 + PHP5 and phpmyadmin sudo apt-get -y install apache2 sudo apt-get -y install mysql-server mysql-common sudo apt-get -y install php5 php5-cli sudo apt-get -y install phpmyadmin # For Apache2 to show the Host Error sudo echo "ServerName localhost" >> /etc/apache2/httpd.conf # For Apache2 to show the Assents and Tildes well sudo echo "AddDefaultCharset ISO-8859-1" >> / etc /apache2/conf.d/charset # We reset Apache2 sudo /etc/init.d/apache2 restart we already have the minimum applications, now to install OpenFire: # We install Java sudo apt-get install sun-java6-bin # We configure Java as Interpreter Main sudo update-alternatives --config java # Create the User for OpenFire sudo adduser openfire # Download OpenFire in DEB Package wget -c http://www.igniterealtime.org/downloads/download-landing.jsp?file=openfire/openfire_3.7.0 .3.7.0_all.deb # We install OpenFire sudo dpkg -i openfire_777_all.deb # We copy Basic Content for OpenFire and MySQL su do cp /usr/share/openfire/resources/database/openfire_mysql.sql $ HOME / sudo chmod 3.7.0 openfire_mysql.sql # We Create Database and Import Basic Content in MySQL mysqladmin -h localhost -u root -p create openfire mysql -h localhost -u root -p openfire <openfire_mysql.sql # Create User and Assign Permissions in MySQL Line = "CREATE USER openfire @ localhost IDENTIFIED BY 'PASSWORD';" echo "$ Line" | mysql -h localhost -u root -p Line = "GRANT ALL ON openfire. * TO openfire @ localhost;" echo "$ Line" | mysql -h localhost -u root -p # We remove Residual Files rm openfire_127.0.0.1_all.deb rm openfire_mysql.sql # We reset OpenFire sudo /etc/init.d/openfire restart # We open Firefox Web Administrator http://9090: XNUMX

remember that the admin panel is:

http://127.0.0.1:9090

http://TUIP:9090

http://TUDOMINIO:9090

If for some reason you can not log in as admin after configuring through the web, reset openfire as when installing and testing, if the problem persists we can change the password with phpmyadmin looking for the user table in the openfire database.

To see OpenFire screenshots enter here there are all the functions and even plugins.

Thank you for your Comments, If there is any ERROR it is the product of your imagination, hahaha


24 comments, leave yours

Leave a Comment

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

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Carlos said

    Excellent tutor Luciano !!!!
    I was looking to install openfire and with your tutor it was more than simple.

    Thank you.

  2.   Santiago said

    Luciano, excellent contribution !!! I followed your instructions step by step and I think I did it !! (although it did not let me configure Apache2 to show the host error and show the tildes correctly)… but I can't log in. I don't understand what it means "if the problem persists we can change the password with phpmyadmin looking for the user table in the openfire database". Can you help me??
    Thanks!!!.

    1.    Luciano Lagassa said

      Hello, sorry I did not answer you before but I did not receive the notification of your comment, if you cannot log in I recommend that you restart the service and if the problem persists, try changing the admin pass in the openfire database, it may be using phpmyadmin. you let me know anything and I will help you.

      1.    oscar melendez said

        Luciano good morning, man I go to your knowledge in linux / ubuntu, it turns out that I install openfire in ubuntu 16.04, and I can enter the console both through the public and local ip, the problem is that when I try to log in through the spark I do not authenticate the user or the password, I do not know if it influences that they have an ipcop installed as a firewall and I do not know what ports or the cause. please help me

  3.   shinjikari said

    "And it is GPL, that is to say OpenSource."

    It would be better to say "and it is GPL, that is, Free Software"

    It's not the same 😀

    1.    Luciano Lagassa said

      I really don't want to start a meaningless discussion because opensource includes many and different licenses such as GNU, apache, mit, mozilla and many more, the word opensource was used to specify that it is open source and that it can contain and mix of licenses. I hope it is understood.
      I also think it would be more productive to help than to waste time in silly discussions.
      thank you very much
      and I apologize if this comment insults anyone.

  4.   Rober said

    Without a doubt a great tutor. It worked the first time the installation of openfire also configured with LDAP. PERFECT!!! Thank you.

  5.   Arian said

    Hello, I would like you to help me because I have already searched a lot and I ran out of ideas, I have installed LDAP and Openfire.
    Openfire authenticates well with LDAP, but when adding contacts, the subscription does not arrive, and neither do the messages that are sent, and they are not connected to each other, when in the list of assignments and openfire users, if they are.
    If anyone has a suggestion to give me. Thank you in advance ...

  6.   c4m4l30n said

    Excellent Tuto, thank you Luciano, I was in a whirlpool and you clarified many doubts
    Bytes
    c4m4l30n

  7.   Marcelo ruiz diaz said

    Very good tutoring, it worked very well

  8.   Juan said

    Well, I installed it and everything was fine, but the problem arose then I could never enter the administration panel, I always got the wrong username or password.

    If anyone knows how to solve it, I would be very grateful.

  9.   mirkovich said

    Grande Luciano ... it seems to me that the assembly of the Jabber server is well detailed ... it remains for me to carry it out ... Thank you for killing ignorance ....

  10.   Oriol said

    I try to install java, but it tells me the following:
    E: The sun-java6-bin package could not be located

    Is it that I am missing a repository? Thanks!

    1.    Luciano Lagassa said

      hello, you have to activate the repos "restricted" and "multiverse" in the /etc/apt/sources.list, because there are things that in Ubuntu are not active. If you use graphical environment in software origins it can also be done.

  11.   pedro said

    I stayed in downloading openfire

    1.    Luciano Lagassa said

      Hello, as I tell you, always follow the guide to the letter and if you see that they get stuck, review it, it's always google just in case.

      1.    omar said

        all ok ... 😉 (good guide)
        but at the time of configuring the user, my mouse moved and I did not know that I wrote the username and password ... 🙁 and I gave it enter ...
        the problem is that I reinstall and now I get the following:

        omar @ omar-che: ~ $ echo "$ Line" | mysql -h localhost -u root -p
        Enter password:
        ERROR 1396 (HY000) at line 1: Operation CREATE USER failed for 'openfire' @ 'localhost'

  12.   Katya said

    I need help, when I download openfire it seems as if it was downloaded, but when I installed it, it marks me that errors were found, the truth is that I urgently need to finish a university project, I'd appreciate your help.

  13.   Rayner said

    I have the openfire 3.7 locked ok but I forgot the password of the admin user and I cannot access the console to create more users
    I need to know how to change the password
    (I use the openfire database)

  14.   omar said

    The same thing happened to me as the comment above, only to uninstall openfire with the following ...

    Finish the running application:
    sudo /etc/init.d/openfire stop

    Remove it from services:
    sudo update-rc.d -f openfire remove

    Remove the start-up file:
    sudo rm /etc/init.d/openfire

    Delete all the files located at / opt / openfire:
    sudo rm -rf / opt / openfire

    And finally, if you have used a mysql database for the application, you can remove the used table.

    and when reinstalling I get the following ...

    omar @ omar-che: ~ $ echo "$ Line" | mysql -h localhost -u root -p
    Enter password:
    ERROR 1396 (HY000) at line 1: Operation CREATE USER failed for 'openfire' @ 'localhost'

    🙁 🙁 help please ...

  15.   maguve said

    I win OpenFire .. I couldn't with it

  16.   Martin Adelaido Hdez L said

    Excellent .. works fine with Linuxmint 11
    Thank you ..

  17.   streuhund said

    When I enter these two commands (sudo echo "ServerName localhost" >> /etc/apache2/httpd.conf and sudo echo "AddDefaultCharset ISO-8859-1" >> /etc/apache2/conf.d/charset) in the terminal, it returns me this message:

    bash: /etc/apache2/httpd.conf: Permission denied

    Any idea how to fix it? ]:

  18.   Gabriel G.R.G. said

    Hey friend, I have the Openfire installed and already with several users created in a Windows Server 2008 but I would like to migrate to Linux, it will be that I can pass the configurations and contacts already created from Win2008 to Linux! PS: I use the internal database, which is recommended or not to use it in this way, there are around 200 users.
    Thank you!