Install the Jabber service On Debian

Source: Internet
Author: User
Tags ldap parameters
Install the Jabber service On Debian-Debian, the Linux release technology. For more information, see. Jabber is a popular open-source instant messaging service. It can also be integrated with MSN, Yahoo, and so on. It can be used for communication over the INTERNET or between employees within an enterprise. This document uses Intranet as an example to describe how to install Jabber + Mysql + LDAP. Jabber uses LDAP for user authentication, stores and uses the Mysql database, and provides the multi-person conference room (conference) function.

I. Required software and environment:
Debian and mysql-server are installed in debian.
Jabberd2-ldap-mysql
Jcr-0.2.4.tar.gz (http://jabber.terrapin.com/JCR/jcr-0.2.4.tar.gz)
Mu-conference-0.6.0.tar.gz (http://jabberstudio.rediris.es/m... erence-0.6.0.tar.gz)

Ii. installation:
The jabber2-ldap-mysql package is experimental in experimental debian. Modify the source. Otherwise, many dependencies cannot be resolved.
Sudo vim/etc/apt/source. list
Add the following two lines:
Deb http://ftp.us.debian.org/debian/ experimental main contrib non-free
Deb http://debian.cn99.com/debian/ sid main contrib non-free
Then execute:
Sudo apt-get update

Sudo apt-get install jabber-common
Sudo apt-get install jabberd2-ldap-mysql
Now, jabber has been installed. Go to/usr/share/doc/jabberd2-ldap-mysql/tools and decompress db-setup.mysql.gz to get the mysql initialization script.
Sudo tar zxvf db-setup.mysql.gz
Sudo mysql-uroot-p <db-setup.mysql
Mysql-uroot-p
Go to mysql and add user permissions:
Mysql> GRANT select, insert, delete, update ON jabberd2 .*
To jabberd2 @ localhost IDENTIFIED by 'secret ';
Here, jabberd2 is the user name, and secret is the password, which can be set by yourself.
Log out of mysql. Edit vim/etc/jabberd2/c2s. xml
Find

Jabberserver
Change Yourhostname Yourhostname is the DNS resolution for this machine.
Find
0.0.0.0
Change Yourip ,
Find Jabberd2
Secret
Change the username and password set in mysql above.
Find In Ip Enter your LDAP server address here, 389 Enter the port used by your LDAP service.
Cn = manager, dc = company, dc = com Change to your LDAP-managed DN.
Password Change to your LDAP management password
Ou = Users, ou = OxObjects, dc = company, dc = com Change to your LDAP user search path. These LDAP parameters must be set according to your own situation.
It is also important to find the segment and XXX Change Ldap , And comment out This section disables the user registration function.
Vim/etc/jabberd2/s2s. xml
Set 0.0.0.0
Change Yourip
Vim/etc/jabberd2/sm. xml
Set Localhost
Change Yourhostname
Set Jabberd2
Secret
Change the username and password of mysql above. For convenience, I will use the default user name and password of jabber when setting mysql. For security reasons, you can modify it.
Several xml files in the/etc/jabberd2 directory contain




127.0.0.1
5347

Jabberd
Secret
The user passwords in these segments must be consistent if they are changed. Here, the jabber installation is complete.

/Etc/jabberd2 has a roster. xml file. You can edit this file and set the group and user according to the format in it. In this way, when a user logs on for the first time, the group or user you have set on the console is displayed in the contact list.
After editing roster. xml, you also need to modify the sm. xml file and find To make it take effect. Add:

/Etc/jabberd2/roster. xml


Iii. Installation of mu-conference:
Unpack jcr and mu-conference respectively.
Sudo tar zxvf jcr-0.2.4.tar.gz
Sudo tar zxvf mu-conference-0.6.0.tar.gz
Cd jcr-0.2.4
Make
Cp jcr-0.2.4/src/main. c mu-conference-0.6.0/src/
Cp jcr-0.2.4/src/jcomp. mk mu-conference-0.6.0/src/
Cd mu-conference-0.6.0/src/
Make-f jcomp. mk
Cp mu-conference/usr/sbin/
If a compilation error occurs, you can find a fully installed linux machine to compile it, and copy the compiled binary file mu-conference to the/usr/sbin directory of the jabber server.
Download the http://ejabberd.jabber.ru/files/efiles/muc-jcr.xml to/etc/jabberd2
Vim/etc/jabberd2/muc-jcr.xml
127.0.0.1 Change Yourip
/Var/log/jabberd2/spool/
/Var/log/jabberd2/ Change to the directory you specified

Create a STARTUP script for mu-conference:
Cd/etc/init. d/
Sudo vim mu-conference
Enter the following content:
#! /Bin/sh
######################################## ######################
#
# Mu-conference -- script to start Mu-Conference.
#
######################################## #####################

DAEMON =/usr/sbin/mu-conference
CONF =/etc/jabberd2/muc-jcr.xml
NAME = mu-conference
USER = ejabberd // enter the USER name for running this script

######################################## #####################

If ["'/usr/bin/whoam '"! = "$ USER"]; then

Echo "You need to be" $ USER "user to run this script ."
Exit 1
Fi

Case "$1" in
Debug)
Test-f $ DAEMON-a-f $ CONF | exit 0
Echo "Starting $ NAME in debugging mode ."
$ DAEMON-B-d 255-c $ CONF &
;;
Start)
Test-f $ DAEMON-a-f $ CONF | exit 0
Echo "Starting $ NAME ."
$ DAEMON-B-c $ CONF &
;;
Stop)
Echo "Stopping $ NAME ."
Killall $ NAME &
;;
Restart | reload)
$0 stop
Sleep 3
$0 start
;;
*)
Echo "Usage: $0 {debug | start | stop | restart }"
Exit 1
Esac

Modify permissions
Chmod 755 mu-conference
4. Run the service:
/Etc/init. d/jabberd2-ldap-mysql start (or stop, restart)
/Etc/init. d/mu-conference start (or stop, restart)
You can also add it to/etc/rc. local to enable automatic startup.
Netstat-an. Check if port 5222 is enabled. OK! The jabber server with the meeting room has been set up.
You can log on to the client using jabber. You can use gaim in linux, or gaim, psi, or pandion in windows. Personally, The Pandion style is similar to that of MSN.

Close the work!
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.