Step-by-step installation of an Instant Messaging server on Ubuntu-openfire

Source: Internet
Author: User

    • 1. First sign in to Ubuntu server. Before you install the OpenFire server, make sure that your system is up to date. Then enter the following command, run one line at a line, and finally install the available updates
      sudo apt-get update
      sudo apt-get upgrade

    • 2. Install the latest version of Oracle JRE/JDK and install it using the PPA (Personal package archieve) WEBUPD8.
      sudo Install python-software-properties
      sudo add-apt-repository Ppa:webupd8team/java
      sudo apt-get update

      If you are using OPENJDK, remove it first to avoid any conflicts

    1. sudo apt-get remove--purge openjdk*

      Then use the following command to install Oracle Java 7

    • sudo Install Oracle-java7-installer

    • 3. Install the MySQL database. Install the latest version of the MySQL server using the Apt-get command.
      sudo Install Mysql-server

    • 4. Create a database for OpenFire in MySQL.

Log on to the MySQL server with root privileges first

sudo mysql-u root p

The database name you created is called "Dbopenfire", then the new user "OpenFire" is added and the password setting is not "openfirepwd".

mysql> CREATE DATABASE dbopenfire CHARACTER set='UTF8'; MySQL'  OpenFire'@'localhost'openfirepwd' MySQL> Grant all privileges on dbopenfire.* to [email protected] with GRANT option;mysql>
   
     FLUSH privileges;mysql> quit
   
  • 5. Download and install openfire3.7.1 (the version number here you can change to the latest version number, note the following command also to change). Download openfire3.7.1 's Deb package from OpenFire official website
  • Cd/tmp
    wget http://download.igniterealtime.org/openfire/openfire_3.7.1_all.deb

    Install openfire_3.7.1_all.deb using the dpkg command

    sudo dpkg-i openfire_3. 7. 1_all.deb
    (Reading database ... 857913.6.4 (using openfire_3.7. 1_all.deb) ... Unpacking Replacement OpenFire ... Setting up OpenFire (3.7.1) ... Installing new version of Config File/etc/openfire/security/truststore ... Installing new version of Config File/etc/init.d/openfire ... Processing triggers for ureadahead ... ureadahead'll be reprofiled on next reboot

    All installation errors for user and folder permissions are ignored. This may be due to your JRE/JDK version. You need to edit the 27 lines of the file /etc/init/d/openfire . Replace the Java-6-sun with java-6-oracle or java-7-oracle.

    sudo Install RPL
    sudo ' 6-sun ' ' 7-oracle ' /etc/init.d/openfire
    sudo service openfire start

  • 6. Configure the relevant ports for the OpenFire. You need to install a firewall and allow some openfire ports to pass. Use the UFW command to configure.
    sudoUFW allow9090/TCPsudoUFW allow9091/TCPsudoUFW allow5222/TCPsudoUFW allow7777/TCPsudoUFW allow7443/TCPsudoUFW allow7070/TCPsudoUFW allow3478/TCPsudoUFW allow3479/tcp

    After the above configuration, the initial installation steps of OpenFire have been completed. Next, we continue to configure through a Web browser.

  • 7. Configure the OpenFire server. Configuring the OpenFire server is fairly straightforward and can be done in just a few steps. Here's how to configure OpenFire. You first open the browser on your computer and open the following address.
    http://mydomain:9090/setup/index.jsp

    Replace the above mydomain with the IP address of the OpenFire server you are deploying. Here is the Web page.

  • 8. Download and install the IM client. You need to download the IM client software to connect to the OpenFire server. You can install any IM client that uses the Xmpp/jabber protocol, such as Spark. Spark is cross-platform and can be used on Linux,windows and Mac OSX. You can download it from OpenFire's official website. You can install it on the Ubuntu desktop version.
    wget http://download.igniterealtime.org/spark/spark_2_6_3.tar.gz
    tar -zxvf spark_2_6_3. tar. gz
    sudo mkdir /opt/spark
    sudo mv Spark/*  /opt/spark/

    Create a desktop-initiated file, open the console, and run the following command.

    sudo nano/usr/share/applications/spark.desktop
     [ desktop Entry   name  =< Span style= "color: #000000;" >sparkversion  =2.6.3genericname  = Sparkx-gnome-fullname  =sparkcomment  = Ignite Realtime Spark IM clienttype  =applicationcategories  =application< Span style= "color: #008000;" >; utility;  Path=/opt/sparkexec  =/bin/bash sparkterminal  =falsestartupnotify  =trueicon  = /opt/spark/logo-spark.pngtargetenvironment  =unity 
    sudo cd/opt/spark
    sudo wget https://dl.dropbox.com/u/50880014/spark.png

    You can now open the Spark client and try to connect to OpenFire.

Step-by-step installation of an Instant Messaging server on Ubuntu-openfire

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.