設定 Jabberd 伺服器
- 編輯 /etc/jabber/multiple.xml,將
<host>
<jabberd:cmdline flag="h">localhost</jabberd:cmdline>
</host>
改為
<host>
<jabberd:cmdline flag="h">Jabber Server 的 FQDN</jabberd:cmdline>
</host>
<!-- commented out so no one can register!!! -->
<register notify="yes">
<instructions>
Choose a username and password to register with this server.
</instructions>
<name/>
<email/>
</register>
<!-- commented out so no one can register!!! -->
<mod_register>/usr/lib/jabberd/jsm.so</mod_register>
- 在 service id="c2s" 中填入欲監聽的 ip 位址,若要變更 port 號也在此修改。若要啟用 ssl 連線的話,則開放 <ssl...></ssl> 設定
<service id="c2s">
<!-- .... -->
<!--
Use these to listen on particular addresses and/or ports.
Example: <ip port="5222">127.0.0.1</ip>
Default is to listen on port 5222 on every interface.
Remove the <ip/> section to disable non-ssl client connections.
<ip port="5222"/>
-->
<ip port="5190">xx.xx.xx.xx</ip><!--
The <ssl/> tag acts pretty much like the <ip/> tag,
except it defines that SSL is to be used on the
ports and IP addresses specified. You must specify
an IP address here, or the connections will fail.
<ssl port='5223'>127.0.0.1</ssl>
<ssl port='5224'>192.168.1.100</ssl>
-->
</pthcsock>
</service>
測試 jabberd 是否正常
jabberd -c /etc/jabber/multiple.xml -D
看到這行訊息表示 jabberd 啟動了
[notice] (-internal): initializing server
- 使用 telnet 登入 jabber server
telnet <Jabber Server 的 FQDN> 5190 # 此為於 service is='c2s' 中指定的 port number
應該要回應以下訊息,如未回應請檢查 jabber server 是否正確啟動
Trying xx.xx.xx.xx
Connected to <Jabber Server 的 FQDN>
Escape character is '^]'.
<stream:stream
to='Jabber Server 的 FQDN'
xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams'>
<stream:stream xmlns:stream='http://etherx.jabber.org/streams'
id='40E04E48' xmlns='jabber:client'
from='jabber.jspbb.net'>
<iq id='reg1' type='get'>
<query xmlns='jabber:iq:register'/>
</iq>
- 若回應如下訊息即表示設定完成,可以開始安裝其他 IM 的轉接器了
<iq id='reg1' type='result'>
<query xmlns='jabber:iq:register'><password/><password/>
<instructions>
Choose a username and password to register with this server.
</instructions>
<name/>
<email/>
<username/></query>
</iq>
沒有留言:
張貼留言