How To Install node-node-xmpp on Ubuntu 18.04

In this tutorial we learn how to install node-node-xmpp on Ubuntu 18.04. node-node-xmpp is idiomatic XMPP library for Node

Introduction

In this tutorial we learn how to install node-node-xmpp on Ubuntu 18.04.

What is node-node-xmpp

node-node-xmpp is:

Node is an event-based server-side JavaScript engine.

Idiomatic XMPP client, component & server library for Node.

Objectives of node-xmpp:

  • Use Node conventions, especially ‘EventEmitter’, ie. for write buffer control
  • Fast parsing, ’node-expat’ was written with this library in mind
  • Client support for both XMPP clients and components
  • Optional server infrastructure with ‘Router’
  • After authentication, leave trivial protocol bits to the user, that is XML handling according to any XEP

Features

  • Client authentication with SASL DIGEST-MD5, PLAIN, ANONYMOUS, X-FACEBOOK-PLATFORM
  • _xmpp-client._tcp SRV record support
  • Simple JID parsing with Stringprep normalization (optional: requires node-stringprep installed)
  • Uses ltx
    • Much easier to handle than a standard DOM
    • xmlns-aware
    • Easy XML builder like Strophe.js (see down)
    • Non-buffering serialization
    • Was split out of node-xmpp for modularization and resuability
  • Component connections
  • Run your own server/talk to other servers with xmpp.Router

There are three methods to install node-node-xmpp on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install node-node-xmpp Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install node-node-xmpp using apt-get by running the following command:

sudo apt-get -y install node-node-xmpp

Install node-node-xmpp Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install node-node-xmpp using apt by running the following command:

sudo apt -y install node-node-xmpp

Install node-node-xmpp Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install node-node-xmpp using aptitude by running the following command:

sudo aptitude -y install node-node-xmpp

How To Uninstall node-node-xmpp on Ubuntu 18.04

To uninstall only the node-node-xmpp package we can use the following command:

sudo apt-get remove node-node-xmpp

Uninstall node-node-xmpp And Its Dependencies

To uninstall node-node-xmpp and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove node-node-xmpp

Remove node-node-xmpp Configurations and Data

To remove node-node-xmpp configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge node-node-xmpp

Remove node-node-xmpp configuration, data, and all of its dependencies

We can use the following command to remove node-node-xmpp configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge node-node-xmpp

References

Summary

In this tutorial we learn how to install node-node-xmpp package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.