Cluster ejabberd
来源:互联网 发布:长得肥影响恋爱知乎 编辑:程序博客网 时间:2024/05/18 00:07
2007-12-4
Cluster ejabberd
for example, we want to do a cluster for two machines.
1. Ejabberd server name
we must have one name of ejabberd server, Fox example “cluster.com”
2. Node name
we need to know what is the node name.
For example, this node name is ejabberd@li_chao_PC
remark : node name can't be changed after installation. In general, node name is same as machine name.
3. Erlang cookie
Shutdown the two machines, and make sure the content of file /root/.erlang.cookie are same between two machines. Of cause, you can modify it, for example, change the content to “BYJY”
vim /root/.erlang.cookie
BYJY
so, the first machine's erlang cookie is “BYJY” and the second machines's erlang cookie is “BYJY” too.
4. Connect nodes
Start ejabberd at one machine. For example :
one node name is “ejabberd@li_chao_PC”
another node name is “ejabberd@wei-jun”
we assume you start node “ejabberd@li_chao_PC”, start node mean start ejabberd.
You want to connect node “ejabberd@wei-jun”, then enter below command :
erl -sname ejabberd -mnesia extra_db_nodes “['ejabberd@wei-jun']” -s mnesia
you will see the below information
running db nodes = [ejabberd@wei-jun, ejabberd@li_chao_PC ]
if you don't see the information above then mean failure.
Now run the following command in the same 'erl' session:
mnesia:change_table_copy_type(schema, node(), disc_copies).
Run below command to exit from the Erlang shell.
Init:stop().
Restart node ejabberd@li_chao_PC, finished.
5. Test cluster
open the administarte webiste
if the two machine's ip is
10.135.192.7
10.135.192.37
you can modify file /etc/hosts in the others machine.
10.135.192.7 cluster.com
or
10.135.192.37 cluster.com
that's ok!
There are two machine named “cluster.com” , you can use XMPP client to connect any one which you like to.
Of cause, you'd better configure DNS to accomplish load balance.
- Cluster ejabberd
- ejabberd
- ejabberd
- ejabberd 安装
- Install Ejabberd
- Ejabberd Gateway
- Ejabberd优化
- 安装ejabberd
- ejabberd集群
- ejabberd笔记
- ejabberd聊天记录
- cluster
- Cluster
- cluster
- Cluster
- Cluster
- ejabberd 搭建 webim 备忘
- Ejabberd安装过程
- 日语语法实践篇八——新编日语第一册第九课之前文篇
- 浅议中国电子商务差在哪儿
- [设计模式]head first 设计模式之PHP实现 第三章 装饰者模式
- 探讨计算机多媒体在教学中的功能
- oracle数据导入导出
- Cluster ejabberd
- 改变IT世界的11大Apache开源技术
- 取mysql表和字段注释
- 一些开源项目网址
- 悟透delphi 第一章 delphi的原子世界
- VS2005和SQL2005的安装冲突问题
- asp sqlserver存储过程类库(开源)
- Trac and Subversion On Windows
- Java 7新特性及简单性能对比测试