惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - Franky
N
Netflix TechBlog - Medium
Google Online Security Blog
Google Online Security Blog
月光博客
月光博客
量子位
酷 壳 – CoolShell
酷 壳 – CoolShell
V
V2EX
腾讯CDC
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 聂微东
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
M
MIT News - Artificial intelligence
Vercel News
Vercel News
The GitHub Blog
The GitHub Blog
Hugging Face - Blog
Hugging Face - Blog
博客园 - 【当耐特】
Apple Machine Learning Research
Apple Machine Learning Research
aimingoo的专栏
aimingoo的专栏
博客园 - 三生石上(FineUI控件)
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
MongoDB | Blog
MongoDB | Blog
H
Help Net Security
The Cloudflare Blog
Blog — PlanetScale
Blog — PlanetScale
F
Full Disclosure
G
Google Developers Blog
罗磊的独立博客
Jina AI
Jina AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Y
Y Combinator Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
J
Java Code Geeks
A
About on SuperTechFans
IT之家
IT之家
大猫的无限游戏
大猫的无限游戏
S
SegmentFault 最新的问题
有赞技术团队
有赞技术团队
GbyAI
GbyAI
雷峰网
雷峰网
T
The Blog of Author Tim Ferriss
The Register - Security
The Register - Security
U
Unit 42
D
Docker
Martin Fowler
Martin Fowler
L
LINUX DO - 热门话题
NISL@THU
NISL@THU
阮一峰的网络日志
阮一峰的网络日志
C
Cybersecurity and Infrastructure Security Agency CISA
博客园_首页
Google DeepMind News
Google DeepMind News

博客园 - nothingnothingnothingnothingnothingnothingnothingnothing

陈安之成功法则 - nothingnothingnothingnothingnothingnothingnothingnothing - 博客园 生意如何谈成 freebsd 架设DNS服务器具 架设jabber服务器 今天搬到公司住了。 一个程序员的成长的六个阶段 成为编程高手的二十二条军规 程序员创业指导书 今天来学校了 昨天踢球,今天同学会 终于快考完了 U盘可以用了 从linux转向windows的12个步骤 12月份最后一期天下足球 期末了 重新回到fvwm的怀抱 个人经常去的几个站点 我的经验总结(1) 不得已之下,只能换linux发行版了。
FreeBSD上做jabber服务器
nothingnothingnothingnothingnothingnothingnothingnothing · 2006-04-19 · via 博客园 - nothingnothingnothingnothingnothingnothingnothingnothing

转自chinaunix

昨晚安装了Jabber 2.0,数据库用的是postgresql,Jabber的资料很少,能找到的都是1.4的
1.4和2.0的最大不同在于2.0支持数据库(1.4之前都是XML的),我自己琢磨了很久才装上,写下来希望对大家有帮助。
知道Jabber是什么吧?Jabber是一种开源的即时通讯软件,类似于QQ, ICQ, MSN。
现在来说一下安装过程,我之前已经安装好了postgresql数据库。
1.安装Jabber服务端
为了省事我采用ports安装,
cd /usr/ports/net/jabberd
make install clean
在上面的ports安装的是Jabber2.0
如果要安装Jabber1.4,则
cd /usr/ports/net/jabber
make install clean
安装过程很顺利,唯一需要注意的是:由于我安装的是2.0,所以安装过程需要选择所需的数据库支持,我选择了postgresql。
2.配置Jabber
默认安装的Jabber是没法正常启动的,因为你还没配置好它
Jabber的配置文件在如下目录:
cd /usr/local/etc/jabberd
我们需要修改sm.xml 和 c2s.xml这两个文件
vi sm.xml
找到<id>localhost</id>
将localhost改为你的域名
例如我改为我的机器名
Jabber2.0默认是用mysql数据库的,如果使用的是别的数据库
则找到<driver>mysql</driver>这行,修改为你是用的数据库
比如我的改为:<driver>pgsql</driver>
修改了使用的数据库,还需要在该文件修改相应的数据库配置,主要修改数据库名,登陆数据库的用户和密码
在sm.xml找到以下段落,然后修改
 <pgsql>
<!-- Database server host and port -->
<host>localhost</host>
<port>5432</port>

<!-- Database name -->下面是数据库名,我使用的是默认值,因为改了数据库名,还必须修改创建数据库的SQL脚本,我嫌麻烦就没改了
<dbname>jabberd2</dbname>

<!-- Database username and password -->
<user>这里改为你的数据库用户名</user>
<pass>这里改为你的密码</pass>

<!-- Transacation support. If this is commented out, transaction          s
will be disabled. This might make database accesses faster,
but data may be lost if jabberd crashes. -->
<transactions/>
</pgsql>

然后还需要修改另一个文件c2s.xml:
vi c2s.xml
找到<id>localhost</id>
将localhost改成在sm.xml文件修改的hostname
找到<module>mysql</module>
改为<module>pgsql</module>
如果使用mysql当作数据库,这里不需要修改,只需要修改下面的数据库名和用户密码
继续找到
 <pgsql>
<!-- Database server host and port -->
<host>localhost</host>
<port>5432</port>
<!-- Database name -->这里修改为Jabber使用的数据库名
<dbname>jabberd2</dbname>
<!-- Database username and password -->
<user>这里修改为数据库用户名</user>
<pass>这里修改为数据库密码</pass>
</pgsql>

3.建立数据库
用postgresql的用户登陆,然后
psql template1
然后执行创建Jabber数据库的脚本
template1=# \i /usr/local/share/jabberd/db-setup.pgsql

如果用mysql的话应该是登陆mysql后执行db-setup.mysql脚本。

到目前为止,Jabber就配置好了,我们来启动它
sh /usr/local/etc/rc.d/jabberd.sh start
FreeBSD# sh /usr/local/etc/rc.d/jabberd.sh start
Starting jabberd.

如果需要开机运行Jabber的话
vi /etc/rc.conf
加入
jabberd_enable="YES"

在Windows下用Gaim连接,OK,大功告成了。
Windows下的Jabber客户端有:Gaim, Exodus, Gush, Pandion, Psi, Trillian Pro 
Linux下有:Gaim, Gajim, Gossip, Gush, Kopete, Psi, Tkabber