table of Contents
1, what is Jabber Server;
1.1, we can set up JABBER Server ourselves;
1.2, JABBER application range;
2, Jabber Server simple frame, installation;
2.1, Jabber Server test set up an environment and user authentication environment;
2.2, selection of Jabber Server version;
2.3, add a system user to Jabber Server, used to manage the startup of the server;
2.4, compiling the software environment required to install Jabber Server;
2.5, unzip compilation and install Jabber Server;
3, simple configuration of Jabber Server;
3.1 Creating a Jabber Server process to save the directory PID and log storage directory log;
3.2, the operation of the mysql database;
3.3, the modification of the configuration file of Jabber Server;
3.31, C2S.XML file
3.32, resolver.xml file
3.33, router-users.xml file
3.34, router.xml file
3.35, S2S.XML file
3.36, sm.xml file
4, Jabber Server launch and management;
5. Application of JABBER client;
5.1, the selection of Jabber clients;
5.2, client's DNS configuration;
5.3, the use of one of the jabber client;
6, some questions;
6.1, can jabberd2 can talk to users such as MSN, Yahoo Messager, ICQ;
6.2, can jabberd2 support client pass file function;
6.3, can jabberd2 allow support for voice or telephone functions;
7. About this article; 8, reference document; 9, related documents;
Texts 1 What is Jabber Server;
Jabber is a famous Linux instant messaging service server, which is a free open source software. What is an instant messaging server? It is similar to AIM, ICQ, MSN or Yahoo Message; just Jabber enables our own instant messaging server, can be applied to the Internet, or apply in the local area network;
Jabber is the most advantageous is his communication protocol. He can dock with multiple instant messaging. For example, there are third-party plugins that allow Jabber users and MSN, Yahoo Messager, ICQ ......
Here is the original text of Jabber.org Jabber Is Best Known as "The Linux of Instant Messaging" - An Open, Secure, Ad-Free Alternative To Consumer IM Services Like AIM, ICQ, MSN, AND Yahoo (See The IM QuickStart .) Under the hood, Jabber is a set of streaming XML protocols and technologies that enable any two entities on the Internet to exchange messages, presence, and other structured information in close to real time Jabber technologies offer several key advantages.:
1.1, we can set up JABBER Server ourselves;
Our own Jabber Server is possible; almost all documentation, server-side and clients are available on Jabber.org; if you want to have your own instant messaging server, you will do it yourself; Jabber can meet your frame My instant messaging server; if you are a master, maybe you will get a similar TT company;
1.2, JABBER application range;
Jabber Server can apply in a local area network, of course, the same Internet Jabber Server is your own user service; the server supports almost all operating systems, from Linux, Macos to UNIX classes, the Windows platform; The same is true, all incomparable, omnipotent ...
Server: Jabber Servers
Client: Jabber Clients
2, Jabber Server simple frame, installation;
I have set and tested in the LAN, and the functions are also extremely simple, and the security is not evaluated (or there is no security), which is simple registration and mutual communication (chat);
2.1, Jabber Server test set up an environment and user authentication environment;
Slackware 10.1, in fact, which release is the same, as long as the official document is said, it will generally succeed; if there is no unsuccessful; I use MySQL certification, that is, the user registration and certification database call Of course, Jabber supports multiple certifications, such as PostgreSQL, Berkeley DB ...
Because I don't understand other authentication methods, I just know a little bit of mysql; so I use MySQL method;
Also, if you have a DNS server in the LAN, you have a DNS server; that is, the machines in the LAN can be accessed by HostName; if you don't know what is DNS, or not the DNS settings. I don't feel anything. Now almost all routers have this feature, click a few mouse to get it; if you only have a machine, I have no need to watch Jabber Server;
So the prerequisite for this article is the prerequisite for you to understand DNS (at least you have a router, and can specify DNS on the router to resolve the hostname of each machine); you also know how to set up a mysql server; 2.2, selection of Jabber Server version;
The version of Jabber Server I use is jabberd-2.0s10.tar.gz;
http://jabberd.jabberstudio.org/2/#download
2.3, add a system user to Jabber Server, used to manage the startup of the server;
Generally, the root super user can manage all server programs; however, this is a bit unsafe; so use less root permissions to start a server;
[root @ localhost ~] # GroupAdd Jabber Note: Add Jabber user group; [root @ localhost ~] # UserAdd Jabber Note: Add Jabber users;
As for the settings that don't set the Jabber user, you look at it. If you are currently operating a normal user, you want to switch to the root user via the su command, then pass the su jabber, so you don't have the password. If you think this is a bit trouble, then you set up a Jabber user Password;
[root @ localhost ~] # Passwd Jabber Note: Set the password of the Jabber user;
2.4, compiling the software environment required to install Jabber Server;
Compiling the Jabber Server in Linux requires compilation tools;
Jabber Server relies on OpenSSL, you have to install; there should be in your Linux sent installation disk; Jabber Server relies on MySQL because we have to store user information with mysql; this is not missing; Libidn this package is also available in major issues; finds themselves; you can also compile themselves;
Reference documentation: "Jabberd 2 Installation and Administration Guide"
2.5, unzip compilation and install Jabber Server;
[root @ localhost ~] # tar zxvf jabberd-2.0s10.tar.gz [root @ localhost ~] # cd jabberd-2.0s10 [root @ localhost jabberd-2.0s10] # ./configure --enable-ssl --enable -mysql --Nable-IDN / --With-extra-include-path = / usr / include / mysql / --with-extra-library-path = / usr / lib / mysql / --prefix = / opt / jabberd2 [root @ localhost jabberd-2.0s10] # make [root @ localhost jabberd-2.0s10] # make install
Note: In ./configure to specify where your MySQL's Include is located, you also specify the location of MySQL's lib where you should know where these things are; my MySQL's include and libs are / usr / include / MySQL and / USR / lib / mysql - prefix are used to specify which position is installed on the Jabberd. I am installed in the / opt / jabberd2 directory; look at it. This is more convenient to specify. When we don't need Jabberd, you will directly delete the / OPT / JABBERD2 directory. It is also convenient to reload; uninstallation is more convenient;
3, simple configuration of Jabber Server;
3.1, create a Jabber Server process to save the directory PID and log storage directory log
[root @ localhost ~ # mkdir -p / opt / jabberd2 / var / jabberd / pid [root @ localhost ~] # mkdir -p / opt / jabberd2 / var / jabberd / log
[root @ localhost ~ # chown -r jabber: jabber / opt / jabberd2 / var
Description: Change / OPT / Jabberd2 / VAR permissions, let users can write data to / opt / jabberd2 / var and subdist directory;
3.2, the operation of the mysql database;
In our unzipped Jabber Server directory, there is a directory Tools, there is a file DB-setup.mysql, which is a script that creates a database;
First we have to start the MySQL server; this process is omitted;
Then we import DB-setup.mysql;
[root @ localhost jabberd-2.0s10] # cd tools [root @ localhost tools] # mysql -uroot -p After another step, we introduced a Jabberd2 database; next step we have to authorize; let Jabberd2 databases have a specialized management user; [root @ localhost Tools] # mysql -uroot -penter password: Note: Enter the management password for the mysql database here Then we run the following instructions in the MySQL database; MySQL> Grant SELECT, INSERT, DELETE, UPDATE ON JABBERD2. * / to jabberd2beinan @ localhost identified by '123456' Note: where jabberd2beinan is administrator of the Jabberd2 database, you can define your own; define yourself; where 123456 is the password of the user's Jabberd2beinan user; If there is no problem, we will use the Jabberd2beinan users to connect the mysql server with Jabberd2beinan users; [root @ localhost Tools] # mysql -ujabberd2beinan -penter password: Enter Jabberd2 database administrator Jabberd2bein's password; mysql> show data; Note: View the database; -------- | Database | -------- | jabberd2 || test | -------- 2 ROWS IN Set (0.00 sec) mysql> quit3.3, Jabber Server configuration file modify; With my installation and configuration environment, I installed Jabber Server in the / opt / jabberd2 directory; the configuration file is in the / opt / jabberd2 / etc / directory; we need to change the document, there are several; C2s.xml resolver.xml router-users.xml router.xml s2s.xml sm.xml I just simply say my configuration, it is not necessarily, but it can be used; Note: All 192.168.1.4 IPs are IP of my Jabber Server machine, you have to make changes according to your own situation; 3.31, C2S.XML file Chapter 77; Important: This is extremely important, LinuxSir is a hostname of the server, and can be identified by each machine of the LAN, that is, what we have to do it yourself, or analyze through the router; general router has this function This requires you to get yourself; Chapter 81; 277 and 278 lines, is the mysql server authentication; 3.32, resolver.xml file Do not make changes, the default will be; 3.33, router-users.xml file Do not make changes; if you want to change, other files must be changed. This document is a simple frame. There is too much not to consider; most of them are default configurations; My suggestion is for security, you still change the user and password; that is, the following; Put the above change, it is best to change the safety; just a simple example; If you do this in Router-users.xml, you have to change it; That is to change the above 3.34, router.xml file Don't make changes, it is good for default; 3.35, S2S.XML file Chapter 77; 3.36, sm.xml file Chapter 7; This is the setup of the server hostname. Hostname you use To be identified in the LAN; this involves DNS; now there are mostly the function of specifying DNS; this requires you to get yourself; my machine is doing it on the router After DNS, it is specified to resolve to LinuxSir; No. 88, 89; These two lines are also connected to the MySQL database server; also changes; 4, Jabber Server launch and management; We have added JABBER users in front, with the purpose of service security, let this user to add and launch Jabber Server; Of course we have to switch to the Jabber user, then let the Jabber user start the JabberD server; [root @ localhost ~ #su jabber [jabber @ localhost ~] $ / opt / jabberd2 / bin / jabberd -d This debug mode is running. If there is any mistake, you can display it; if not, you will press a few times and see if there is any error. If not, the Ctrl C ends running and then turns to the background operation; [jabber @ localhost ~] $ / opt / jabberd2 / bin / jabberd & [jabber @ localhost ~] $ ps -aux | grep jabberd jabber 7048 12.3 1.2 5072 3184 PTS / 0 r 05:33 0:00 Perl -w-00 / Opt / jabberd2 / bin / jabberdjabber 7049 2.3 0.5 4656 1452 PTS / 0 s 05:33 0:00 / OPT / jabberd2 / bin / router -c /opt/jabberd2/etc/jabberd/router.xmljabber 7050 0.6 0.4 4552 1252 PTS / 0 s 05:33 0:00 / OPT / jabberd2 / bin / resolver -c /opt/jabberd2/etc/jabberd/resolver.xmljabber 7051 2.0 0.6 4796 1716 PTS / 0 s 05:33 0:00 / OPT / JABBERD2 / bin / sm --c /opt/jabberd2/etc/jabberd/sm.xmljabber 7052 0.6 0.5 4644 1340 PTS / 0 s 05:33 0:00 / OPT / Jabberd2 / Bin / S2S -C / OPT / Jabberd2 / etc / Jabberd / s2s.xmljabber 7053 1.6 0.6 4752 1672 PTS / 0 s 05:33 0:00 / OPT / Jabberd2 / bin / C2s -c /opt/jabberd2/etc/jabberd/c2s.xmljabber 7055 0.0 0.2 2256 732 PTS / 0 R 05:33 0:00 GREP JABBERD Description: The first line is running in the background; the second line is to see if Jabberd has started; if there is a prompt similar to the above, this means that Jabberd has run; 5. Application of JABBER client; 5.1, the selection of Jabber clients; For client selections, you can use GAIM; or other, I use GAIM; please go to the Jabber client: Jabber Clients to find yourself; If you want to use Gaim, you can download it on http://gaim.sourceforge.net; Windows version and Linux version have; if you use Linux, the major issuers have this package; 5.2, client's DNS configuration; If you are Linux, you have to let the /etc/resolv.conf have the settings of the DNS host; for example, my setting is Nameserver 192.168.1.1 192.168.1.1 This is the DNS server, I use the router, when I configure the DNS, it is this address; If you are using Windows, you have to set this interface on the network card, write this; look at it; 5.3, the use of one of the jabber client; GAIM is simple, we can apply to the LAN Jabber Server to the LAN for GAIM; Step 1: Add an account; Click [Account] => Add = " Agreement: Choose a Jabber Username: First write a favorite, such as the Beinan server I write: that is, the jabber server machine of the Jabber Server set in front; my machine is LinuxSir; resource: Don't take him; password : Write one by yourself; because there is no registration; this is not important; alias: is a nickname, such as the wolf; click [Show main option] Jabber option If you can use TLS, you should select, the other two is [Force Old SSL] and [Allows Pure Text Verification on the Different Switch], these two do not choose; L Port: 5222 Connection server: It is the IP address of the machine where Jabber Server is located. I am 192.168.1.4. Agent type: Do not change, maintain the original state; [use global agent settings] The second step registration account; These are all added, then click [Register]; Then write the username and password; he will prompt to register successfully; Step 3 Modify Accounts We have to come again from the beginning, click [Account], then select the account you just registered; click to modify; it will be modified as before; just change the connection server in [Show Main Options]. . Because this is empty; you have to change it to your own server IP address; my server is 192.168.1.4. I changed to 192.168.1.4; As for the use of GAIM for Windows users; 6, some questions; 6.1, can jabberd2 can talk to users such as MSN, Yahoo Messager, ICQ; Yes; but to install some plugins; I seem to be a little difficulty in these plugins. Because I have tested some plugins; but I can't solve some dependencies; I have solved the dependencies, but I can't apply; the error is. http://www.jabber.org/software/components.shtml 6.2, can jabberd2 support client pass file function; If the default installation is not supported, this also requires a third-party plugin; there are three ways; in the Jabber's home page, if you want to implement the file function, it is related to the client; I tested a variety of kinds, but Or not. PSI is said to be able to travel, I can't test after I test; may rely on the client's biography or a little difficult. Perhaps it will soon solve it? If it is solved by the server side? It is also possible, there are two ways; Proxy65 and a way to define an Apache DAV module; Apache DAV modules are relatively simple. But I have not tried it. According to the foreigners, it is not too safe; Proxy65's method is difficult, he relies too much thing, such as Python, Zope, Twist, Pyopenssl ..., although it can solve the dependencies, but proxy65 is still the same Be unpredictable; Do you still test it yourself; write these things just to let the newcomers walk too much; 6.3, can jabberd2 allow support for voice or telephone functions; There may be this successful case, I didn't look carefully; but I didn't see it through the Jabberd2 document, maybe there is a third-party plugin to solve; perhaps a little difficult; 7. About this article This article is the easiest of the simple Jabber instant messaging server; there is not much function, of course, the security mechanism has not considered; high-level document is not what I can write, of course, I am also trying to write a high level of document. It hasn't been this ability now, so I can only expect the master, or look forward to it to become a master one day; this article is for beginners; 8, reference documentation "Jabberd 2 Installation and Administration Guide" 9, related documentation Accessories size jabberd-2.0s10.tar.gz754.7 kb