ejabberd安装笔记

这几天折腾ejabberd,总算有点眉目,目前看来,ejabberd整合到ldap上,应该是没有问题。

EPEL上的rpm包,是2.05的版本,这个rpm,有一个bug,如果你在root目录下,重新启动ejabberd的服务,就会报错,你切换到其他目录,如/opt的目录下,那么就没有问题,这个bug已经和打包的开发者证实。

在centos下安装,你可以采用rpm包,这样比较简单,不过还可以通过ejabberd网站下载bin包安装,过程也很简单。

安装iredmail0.6

LDAP suffix: dc=test,dc=com
virtual domain: test.com

ejabberd

到官方网站,下载http://www.process-on
e.net/en/ejabberd/downloads

根据你的平台,下载i386或者64bit的ejabber。这是一个bin的包。


# ls e*
ejabberd-2.1.2-linux-x86-installer.bin.gz

# gunzip ejabberd-2.1.2-linux-x86-installer.bin.gz
# chmod +x ejabberd-2.1.2-linux-x86-installer.bin
# ./ejabberd-2.1.2-linux-x86-installer.bin

Language Selection

Please select the installation language
[1] Dutch - Nederlands
[2] English - English
[3] French - Fran?ais
[4] German - Deutsch
[5] Russian - Русский
[6] Simplified Chinese - 简体中文
[7] Spanish - Espa?ol
Please choose an option [2] :

This General Public License does not permit incorporating your program into
proprietary programs.  If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library.  If this is what you want to do, use the GNU Library General
Public License instead of this License.

Press [Enter] to continue :

Do you accept this license? [y/n]: y

----------------------------------------------------------------------------
Please specify the directory where ejabberd will be installed.

Installation Directory [/opt/ejabberd-2.1.2]:

----------------------------------------------------------------------------
ejabberd server domain

Please enter the desired ejabberd domain name. The domain is the visible attribute that is added to the username to form the Jabber Identifier (for example: [email protected]). This computer must be known on the network with this address name.

ejabberd server domain [centos5.test.com]: test.com


Administrator username

Please enter the administrator username for the current ejabberd installation. A Jabber account with this username will be created and granted administrative privileges. Don't use blankspaces in the username.

Administrator username [admin]:

----------------------------------------------------------------------------
Administrator password

Please provide a password for the administrator user (at least 5 characters).

Administrator password :
Retype password :

----------------------------------------------------------------------------
Cluster

Will this node be part of a cluster ? (Please note ejabberd clustering is intended for advanced users).

Cluster [y/N]:


----------------------------------------------------------------------------
Setup is now ready to begin installing ejabberd on your computer.

Do you want to continue? [Y/n]:

----------------------------------------------------------------------------
Please wait while Setup installs ejabberd on your computer.

Installing
0% ______________ 50% ______________ 100%
#########################################

----------------------------------------------------------------------------
Setup has finished installing ejabberd on your computer.

View Readme file? [Y/n]: n

这就把ejabberd装完,是安装到opt的目录下。

启动

# cd /opt/ejabberd-2.1.2/bin
./start

http://192.168.1.69:5280/admin

用户:[email protected]
pass: pass




这个时候,ejabber是采用ejabber自带的数据库验证。


设置ejabberd,采用iRedMail ldap验证

配置文件/opt/ejabberd-2.1.2/conf/ejabberd.cfg


1:注释掉这hosts,统一放到后面,方便维护

%%{hosts, ["test.com"]}.


2:注释掉,这是采用内部验证的意思

{auth_method, internal}.

3:设置admin
设置虚拟domain的管理员,这里我改成www用户,让他可以登录后台管理

{acl, admin, {user, "admin", "test.com"}}.

改成

{acl, admin, {user, "www", "test.com"}}.



3:添加下面

{hosts, ["test.com"]}.
%%% Authenticate against LDAP.
{auth_method, ldap}.
{ldap_servers, ["127.0.0.1"]}.
%%% {ldap_encrypt, tls}.
{ldap_port, 389}.
{ldap_base, "o=domains,dc=test,dc=com"}.
{ldap_rootdn, "cn=vmail,dc=test,dc=com"}.
{ldap_password, "xSSxj1IpZ82z9Ra1oYqIWaUzqPBILP"}.
%%% Enable both normal mail user and mail admin.
{ldap_filter, "(&(object zid="196">{ldap_uids, [{"mail", "%u@%d"}]}.



上面你唯一需要修改的就是ldap_password.


检测

这个时候,你就应该可以通过http://ip:5280/admin

使用[email protected] 登录,这样帐号就实现统一。

你可能感兴趣的:(ejabberd安装笔记)