Install the Jabberd server in Linux

Source: Internet
Author: User
Tags telnet program
For details about how to install the Jabberd server in Linux, refer to Linux Enterprise Application-Linux server application. Jabber is an IM (instant messaging) server that uses the open XMPP protocol. Its information flow is in XML format and can implement cross-platform communication. Through the Jabber converter, Japper can also be connected to instant messaging servers such as MSN and Yahoo. In one fell swoop, the current trend of incompatibility between IM platforms was broken. Google talk is implemented using Jabber/XMPP.

There are many types of Jabber server software. For details, visit http://www.jabber.org/software/servers.shtml. Here, jabberd is a Jabber server written in C. In Debian, there is a jabber software package that can install the jabberd1.4.3 server. Currently, the latest version of jabberd is 2.x, which includes the latest features of jabber, but few components are supported. jabberd1.4.x does not contain the latest features, for example, SASL is not supported. However, it supports many components and is stable. So here I will introduce the jabberd server of jabberd1.4.3.

Download and install the software package using the Debian standard software installation method.

Debian :~ # Apt-get install jabber
After the software is installed, the jabberd service starts automatically. We can use the telnet program to connect to the server and test whether the server works properly.

Debian :~ # Telnet localhost 5222 #5222 is the default port number of the jabberd service.
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Enter the following xml text in the above status:

To = 'localhost'
Xmlns = 'jabber: client'
Xmlns: stream = 'HTTP: // etherx.jabber.org/streams'>
Press enter to display the following information on the jabber server:


If the following information is displayed, the jabberd server is running properly. Available Statement ..

Next we can start to configure the jabber server. The configuration file of jabber is in the/etc/jabber directory and is called jabber. xml. First, we need to configure the host name, which is tested using the localhost host name. A unique name is required to identify the server. Open the file with the vi Program and find this sentence:

Localhost
Change localhost to your host name. My host name is debian. Now we can use the host name to access the jabberd service, for example:

Debian :~ # Telnet debian 5222
Trying 127.0.0.1...
Connected to debian. # The host name has changed.
Escape character is '^]'.
Now we can add a jabber account. We can use the jabber Client software such as gaim to automatically add or manually add. The following describes how to manually add users using telnet. This method allows us to learn more about the process of adding users to the jabberd service.

Debian :~ # Telnet debian 5222
Trying 127.0.0.1...
Connected to debian.
Escape character is '^]'.
To = "debian"
Xmlns = "jabber: client"
Xmlns: stream = "http://etherx.jabber.org/streams">
The system displays the following information:


Use the following XML to query the registration information:




The query result is as follows:



Choose a username and password to register with this server.




Password, username, email, and name are required for registration. Below I will send the registration information to the server as required:



Test
12345
Test
Test @ debian

# Press enter here. If the following information appears, the registration is successful.

The information of each registered user is stored in the/var/lib/jabber/directory. Now we can use the newly registered account to log on to the jabber server. Before logging on, we can use the following XML command to query what information is required for Server login:



Test


The returned information is as follows:



Test


And Indicates the encrypted and plain text passwords. You only need to select one of them. Is required, indicating the resources to connect to the service, for example, telnet. The XML command for logon is as follows:



Test
12345
Telnet

# Press enter here. If the following information is displayed, the logon is successful.

Finally, we need to switch the test user to the online status.

# Press enter to display the following welcome information

Welcome!
Welcome to the Jabber server -- we hope you enjoy this service! For information about how to us
E Jabber, visit the Jabber User's Guide at http://jabbermanual.jabberstudio.org/
Offline Storage
Now we can send and receive information. The XML command format for sending information is as follows:


Hello jims

If the jims user has logged on to gaim, the "hello jims" message is displayed. If "hello test, this m essage form gaim." is sent to test @ debian In gaim, the following format is received in telnet:

/> Hello test, this message form gaim.Xmlns = 'HTTP: // www.w3.org/5o/xhtml'> hello test, this message form gaim.
Run the following command to exit the session:


From the above information, we can see that the information stream transmitted in jabber is in XML format. This provides a great space for the expansion of the jabber service.
Related Article

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.