• 11th 七月 2008 - By Devil

    logo

    相信大家對 Web 型態的即時通應該已經不陌生了吧!

    今天介紹的這一套 Ajax Im 也是一樣

    透過 Web 的方式來達到即時通訊的功能!

    詳細的介紹大家可以去參考官方網站

    http://www.ajaxim.com/

    基本上會找到這套也是因為公司啦,老闆又要禁止使用 msn 了!

    但是他又希望有一套只有公司員工的即時通系統!

    記得最早的時候我們用 Jabber 再搭配 OpenSource 的 Client 軟體

    效果當然是比網頁的好!但是麻煩真的也不少!

    要防東防西、要跟著官網更新版本、最討厭使用者在哀嚎要加功能!

    所以透過網頁的方式簡簡單單最好,

    不只使用簡單、功能簡單、連安裝都很簡單!

    開始安裝吧!

    環境說明:

    Cent OS 5.1、httpd-2.2.3-11、php-5.1.6-15、mysql-5.0.22-2.2

    Step 1

    先建立資料庫囉!

    1
    
    mysqladmin -u root -p create ajaxim

    建立資料庫使用者與密碼

    先登入 mysql

    1
    
    mysql -u root -p
    1
    2
    3
    4
    5
    
    grant all privileges on ajaxim.* to <a href="mailto:ajaxim@localhost">ajaxim@localhost</a> identified by 'ajaxim';
     
    flush privileges;
     
    exit;

    Step 2

    下載今天的主角 AjaxIm

    官方網站下載 ( 3.4 )

    本站下載:ajax_im_34_yui

    另外小弟用簡體中文版直接簡繁轉了一份繁體的,自己在 Key 幾個字

    所以要感謝對岸同胞喔!

    繁體語言檔下載:simplified_chinese_05022008

    想自己轉的朋友可以去官網下載簡體語言檔

    官網簡體語言檔下載

    Step 3

    將剛下載來的檔案解壓縮後,上傳檔案至網頁根目錄

    例:/var/www/html/ajaxim

    設定讓 Apache 擁有檔案

    1
    
    chown -R apache:apache /var/www/html/ajaxim

    將 config-sample.php 複製一份並命名為 config.php

    1
    2
    3
    
    cd /var/www/html/ajaxim
     
    cp config-sample.php config.php

    編輯 config.php

    1
    
    vi config.php

    修改以下

    1
    2
    3
    4
    5
    6
    
    $sql_user   = 'ajaxim'; //使用者帳號
    $sql_pass   = 'a1q5D4w2'; //使用者密碼
    $sql_host   = 'localhost'; //資料庫位置
    $sql_db     = 'mamu_ajaxim'; //資料庫名稱
     
    $maxBuddyIconSize = 10000; //頭像的檔案大小限制,0為禁止

    接下來要修改 ajaxim/js/config.js 這個檔案

    1
    
    vi js/config.js

    這個檔是一些設定,可按自己喜好設定,我列出我目前有修改的!

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    
    // Configuration //
     
    // Title //
    var siteName           = 'Ajax Im';      // 網頁名稱
     
    // Registration //
    var allowNewUsers      = true;           // 開放或關閉註冊
     
    // Languages //
    // Format: [
    //          ['folderName', 'properName'],
    //          ['language2Folder', 'Language 2 Proper Name'],
    //          ...
    //         ]
    // Note: The first language will be used as the default language.
    var languageOptions    = [
    ['chinese', 'Chinese']
    ]//預設語言
     
    // Theme Settings //
    var theme              = 'default';         // 預設版型

    Step 4

    最後從瀏覽器執行 install.php

    http://localhost/ajax/install.php

    ajaxim_01

    填入 ADMIN 的帳號密碼與 Email 後即可開始安裝!

    ajaxim_02

    無錯誤的話,就可以登入囉!

    登入前記得刪除 install.php、update.php

    這樣就安裝完成囉,最後來兩張成品圖!

    ajaxim_03 ajaxim_04

    VN:F [1.8.0_1031]
    Rating: 4.0/5 (3 votes cast)
    我的即時通 AJAX Instant Messenger4.053
    與大家分享
    • Print
    • Digg
    • del.icio.us
    • Facebook
    • Google Bookmarks
    • Hemidemi
    • MyShare
    • email
    • RSS
    • Twitter
    • Live
    • MySpace
  • 5 Responses to “我的即時通 AJAX Instant Messenger”

    • Victor on 八月 28, 2008

      COOL!!

      用windows xp appserv appatch,PHPMYADMIN

      可以裝嗎,好像挺複雜的

      UN:F [1.8.0_1031]
      Rating: 0.0/5 (0 votes cast)
      UN:F [1.8.0_1031]
      Rating: 0 (from 0 votes)
    • Devil on 十月 7, 2008

      官方並沒有特別說明安裝需求

      但是用appserv應該是可以的

      安裝其實也不會很複雜!

      可能我寫的太複雜了…..

      官方的install只有短短幾行而已

      UA:F [1.8.0_1031]
      Rating: 0.0/5 (0 votes cast)
      UA:A [1.8.0_1031]
      Rating: 0 (from 0 votes)
    • joy168 on 一月 20, 2009

      很完整的建置說明,感謝!~

      UN:F [1.8.0_1031]
      Rating: 0.0/5 (0 votes cast)
      UN:F [1.8.0_1031]
      Rating: 0 (from 0 votes)
    • Devil on 一月 20, 2009

      喜歡就好~不用客氣!

      UA:F [1.8.0_1031]
      Rating: 0.0/5 (0 votes cast)
      UA:A [1.8.0_1031]
      Rating: 0 (from 0 votes)
    • pintaso on 九月 6, 2009

      可以請問一下嗎?AJAX的傳輸方式嗎?
      當A裡用此系統傳送訊息給B時?訊息會先經過server,是server主動將訊息轉給B,還是B需要訂時與server要訊息呢?
      謝謝@@a…

      UN:F [1.8.0_1031]
      Rating: 0.0/5 (0 votes cast)
      UN:F [1.8.0_1031]
      Rating: 0 (from 0 votes)

    Leave a Reply


Ad