作者 主題: [筆記]架IM Server-Jabberd+Pandion  (閱讀 5045 次)

0 會員 與 1 訪客 正在閱讀本文。

myz

  • 活潑的大學生
  • ***
  • 文章數: 433
    • 檢視個人資料
[筆記]架IM Server-Jabberd+Pandion
« 於: 2006-02-26 12:55 »
Instant Messaging:
Server: Jabberd http://www.jabber.org/
Client: Pandion http://www.pandion.be/

在此選用 MySQL做為Jabberd的Data Storage Package & Authentication Package

==========安裝Jabberd 2.x http://www.jabber.org/software/jabberd2x.shtml==========

1. 安裝環境: CentOS 4.2 (安裝時選擇Custom套件群組全不選)
  server name: imserver.myz.mylocal
  註:請先建立好DNS的對應

2. 先安裝必要套件
代碼: [選擇]

#yum install mysql-server mysql-devel
#yum install libidn libidn-devel
#yum install gcc


3. create jabber user and group
代碼: [選擇]

#adduser jabber


4. create Directories for PID’s and Logs
代碼: [選擇]

#mkdir -p /usr/local/var/jabberd/pid/
#chown -R jabber:jabber /usr/local/var/jabberd/pid/


5. Install Prerequisites
  5.1 OpenSSL ( > 0.9.6b ): 步驟2已安裝
  5.2 Libidn ( > 0.3.0 ): 步驟2已安裝
  5.3 Data Storage Package: 步驟2已安裝,使用MySQL
  5.4 Authentication Package: 步驟2已安裝,使用MySQL

6. Install Jabberd 2
  6.1 到官方網站下載 jabberd-2.0s10.tar.gz
  6.2 編譯jabberd
代碼: [選擇]

# tar zxvf jabberd-2.0s10.tar.tar
# cd jabberd-2.0s10
# ./configure --enable-mysql --enable-ssl --enable-idn --with-extra-include-path=/usr/include/mysql/ --with-extra-library-

path=/usr/lib/mysql/
#make
#make install
# chown -R root:jabber /usr/local/etc/jabberd/*
# chmod -R 640 /usr/local/etc/jabberd/*
# ln -s /usr/local/etc/jabberd/ /etc/jabberd


7. Basic Configuration
  7.1 Set Host Name in sm.xml and c2s.xml 在 /usr/local/etc/jabberd/
代碼: [選擇]

In sm.xml :

      <!-- Session manager configuration -->
      <sm>
        <!-- Our ID on the network. Users will have this as the domain part of
             their JID. If you want your server to be accessible from other
             Jabber servers, this ID must be resolvable by DNS.s
             (default: localhost) -->
        <id>imserver.myz.mylocal</id>    

In c2s.xml :

      <!-- Local network configuration -->
      <local>
        <!-- Who we identify ourselves as. This should correspond to the
             ID (host) that the session manager thinks it is. You can
             specify more than one to support virtual hosts, as long as you
             have additional session manager instances on the network to
             handle those hosts. The realm attribute specifies the auth/reg
             or SASL authentication realm for the host. If the attribute is
             not specified, the realm will be selected by the SASL
             mechanism, or will be the same as the ID itself. Be aware that
             users are assigned to a realm, not a host, so two hosts in the
             same realm will have the same users.
             If no realm is specified, it will be set to be the same as the
             ID. -->
        <id>imserver.myz.mylocal</id>


  7.2 Provision and Configure for Storage and Authentication Package(s)
   7.2.1 Provision and Configure for MySQL
    7.2.1.1 Provision for MySQL
代碼: [選擇]

#cd tools
#mysql -u root -p

mysql>\. db-setup.mysql
mysql>GRANT select,insert,delete,update ON jabberd2.* to jabberd2@localhost IDENTIFIED by 'secret';
mysql> \q

#ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

    7.2.1.2 Configure for Storage using MySQL (sm.xml)
代碼: [選擇]

<!-- MySQL driver configuration -->
      <mysql>
        <!-- Database server host and port -->
        <host>localhost</host>
        <port>3306</port>

        <!-- Database name -->
        <dbname>jabberd2</dbname>

        <!-- Database username and password -->
        <user>jabberd2</user>
        <pass>secret</pass>

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

             This will need to be disabled if you are using a MySQL
             earlier than v3.23.xx, as transaction support did not appear
             until this version. -->
        <transactions/>
      </mysql>

    7.2.1.3 Configure for Authentication using MySQL (c2s.xml)
    Authentication Data Package
代碼: [選擇]

      <!-- Authentication/registration database configuration -->
      <authreg>
        <!-- Backend module to use -->
        <module>mysql</module>  

    MySQL User and Password
代碼: [選擇]

      <!-- MySQL module configuration -->
      <mysql>
        <!-- Database server host and port -->
        <host>localhost</host>
        <port>3306</port>

        <!-- Database name -->
        <dbname>jabberd2</dbname>

        <!-- Database username and password -->
        <user>jabberd2</user>
        <pass>secret</pass>
      </mysql>


8. Test Server
  8.1 啟動Jabberd Server
代碼: [選擇]
/usr/local/bin/jabberd
  8.2 啟動Jabberd Server除錯模式
代碼: [選擇]
/usr/local/bin/jabberd -D
  8.3 若啟動正常,則放到 /etc/rc.d/rc.local 裡,開機順便啟動。


==========安裝Pandion http://www.pandion.be/==========
1. 下載 Pandion http://www.pandion.be/download/start/
2. 安裝完成後,執行Pandion,左下角有註冊按鈕
代碼: [選擇]

註:
1. 註冊時會問 伺服器(s): 這裏改成imserver.myz.mylocal?#93;就是你的imserver,請自行對應修改。
2. 註冊成功後,你的IM位?#125;就是 xxx@imserver.myz.mylocal

3. 登入 - Pandion
代碼: [選擇]

位?#125;: 就填入你的IM 位?#125;

4. 加入聯絡人
代碼: [選擇]
動作->新增聯絡人
5. 其他
代碼: [選擇]

待補

keaotw

  • 可愛的小學生
  • *
  • 文章數: 14
    • 檢視個人資料
[筆記]架IM Server-Jabberd+Pandion
« 回覆 #1 於: 2006-03-27 12:59 »
關於封鎖名單好像有點問題
我用MSN Transport上線後,發現之前MSN封鎖的人全都出現在我的LIST了
雖然對方並不會看到我上線
這是PANDION的問題嗎?