|
|
SER SIP server 快速安裝 |
|
|
作者:未知 来源:月光软件站 加入时间:2005-2-28 月光软件站 |
SER SIP server 快速安裝
發表於: 星期四 七月 15, 2004 6:58 pm |
|
SER SIP server 進階設定1 -- mysql
發表於: 星期五 七月 16, 2004 6:05 pm |
|
軟體首頁: http://iptel.org 目前版本:0.8.12 (04.13.2004) 文章日期:07.16.2004 文章作者:bell
SER與MYSQL
當完成SER SIP server 快速安裝之後我們變得到一個可以使用的 SER 伺服器,指示這個伺服器是屬於簡單且陽春的,特別是它並不做使用者的身份認證而且在伺服器重開機之後便會失去使用者的位置資料等。 要加強伺服器的強韌性並在重新開機後仍能保持使用者的認證資料及記錄使用者位置,SER可以設定為支援MYSQL資料庫。
在進行以下設定程序前,你必須先確認你的機器上已經正確安裝好了MYSQL資料庫。
下載與安裝
1. RedHat:
RedHat 7.3: 下載: ftp://ftp.berlios.de/pub/ser/0.8.12/packages/redhat/7.3/ser-mysql-0.8.12-0.i386.rpm 安裝: rpm -ivh ser-mysql-0.8.12-0.i386.rpm
RedHat 8.0: 下載: ftp://ftp.berlios.de/pub/ser/0.8.12/packages/redhat/8.0/ser-mysql-0.8.12-0.i386.rpm 安裝: rpm -ivh ser-mysql-0.8.12-0.i386.rpm
RedHat 9: 下載: ftp://ftp.berlios.de/pub/ser/0.8.12/packages/redhat/9/ser-mysql-0.8.12-0.i386.rpm 安裝: rpm -ivh ser-mysql-0.8.12-0.i386.rpm
2. debian: 下載: ftp://ftp.berlios.de/pub/ser/0.8.12/packages/debian/stable/ser-mysql-module_0.8.12_i386.deb 安裝: dpkg -i ser-mysql-module_0.8.12_i386.deb
3. fedora core 1: ftp://ftp.berlios.de/pub/ser/0.8.12/packages/fedora/1/ser-mysql-0.8.12-0.i386.rpm rpm -ivh ser-mysql-0.8.12-0.i386.rpm
4. tar.gz: ser-mysql的支援已放在tar.gz檔案中,執行檔路徑為 /usr/local/sbin/
建立資料庫表格
當上述套件正確安裝完畢之後,可以利用ser_mysql.sh指令來執行建立或是刪除資料庫等相關工作。
如果是全新安裝的SER: /usr/sbin/ser_mysql.sh createl (rpm/deb安裝) 或 /usr/local/sbin/ser_mysql.sh create (tar.gz安裝) 以上指令會建立新的SER資料庫的相關表格。
如果是要升級舊版SER程式的話,請執行: /usr/sbin/ser_mysql.sh reinstall (rpm/deb安裝) 或 /usr/local/sbin/ser_mysql.sh reinstall (tar.gz安裝)
ser_mysql.sh其他相關使用語法:
ser_mysql.sh create 新建立資料庫 ser_mysql.sh drop 完全刪除SER資料庫 ser_mysql.sh reinit 完全刪除並重新建立SER資料庫表格 ser_mysql.sh backup 傾印現行資料庫並輸出到stdout ser_mysql.sh restore <file> 從指定的檔案中回存資料庫 ser_mysql.sh copy <new_db> 從已經存在的資料庫中產生一個新的資料庫 ser_mysql.sh reinstall 更新並產生新的資料庫
要確認資料庫是否被正確產生出來,可以登入mysql伺服器後連結ser資料庫:
mysql> connect ser; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A
Connection id: 278 Current database: ser
然後列出資料庫表格:
mysql> show tables; +-----------------------+ | Tables_in_ser | +-----------------------+ | acc | | active_sessions | | aliases | | config | | domain | | event | | grp | | location | | missed_calls | | pending | | phonebook | | preferences | | reserved | | server_monitoring | | server_monitoring_agg | | silo | | subscriber | | uri | | version | +-----------------------+ 19 rows in set (0.00 sec)
看到以上表格便表示資料庫已經正確建立好了。
修改SER相關組態設定
現在我們已經有一個可以用的mysql資料庫,我們需要去修改SER的組態設定來使用mysql資料庫, SER的設定所放的位置在 /etc/ser/ser.cfg (redhat及rpm安裝),或是 /usr/local/etc/ser/ser.cfg(tar.gz安裝)
要啟動支援新的mysql資料庫功能,必須載入正確的模組。這功能可藉由反註解(拿掉行首的#號)以下這行來達成:
loadmodule "/usr/lib/ser/modules/mysql.so"
接下來我們要設定SER將變動的資料寫入資料庫中來取代僅存放在記憶體上的快取資料。先註解(在行首加入#號) 掉以下這行:
modparam("usrloc", "db_mode", 0)
然後反註解掉(拿掉行首的#號)以下這行:
modparam("usrloc", "db_mode", 2)
關於db_modes的說明:
* Mode 0 (模式0) 關閉寫入資料庫。聯絡資料等會在系統重開機後流失。 * Mode 1 (模式1) 立刻將所有變更寫入資料庫中,聯絡資料等會立刻寫入資料庫。會使用戶端連線時的反應速度變慢。 * Mode 2 (模式2) 週期性的將聯絡資料等從記體體快取區中寫入到資料庫。
要啟動身份認證功能要將以下兩行反註解掉:
loadmodule "/usr/lib/ser/modules/auth.so" loadmodule "/usr/lib/ser/modules/auth_db.so"
我們可以選擇將儲存在資料庫中的密碼以未加密模式存放。這樣可以讓密碼的回復以及初始設定與測試工作更容易進行。 要啟動這項功能請反註解掉以下兩行:
modparam ("auth_db", "calculate_ha1", yes) modparam ("auth_db", "password_column", "password")
這兩行是一起工作的。第一行告訴卅R產生使用者名稱、密碼、及relam的雜湊(hash)。 第二行則告訴SER在資料庫中的那個欄位是放置未加密密碼的位置。
最後,我們需要更新路尤以辨識我們的realm。
變更 (uri=="myself") 為 (uri=~"mydomain.com")
反註解掉以下數行並用mydomain.com代替iptel.org
if (!www_authorize("mydomain.com", "subscriber")) { www_challenge("mydomain.com", "0"); break; };
注意! 以上範例中的mydomain.com僅作為範利使用,正式使用時須填入正確的主機名稱。
下載支援mysql的ser.cfg設定檔
rpm安裝者: http://bell.idv.tw/bell/doc/SER相關資料/cfg/ser.cfg.mysql.rpm_install(0.8.12)
tar安裝者: http://bell.idv.tw/bell/doc/SER相關資料/cfg/ser.cfg.mysql.tar_install(0.8.12_0.8.14)
下載完之後記得修改檔名為 ser.cfg 然後複製或移至 /usr/local/etc/ser 目錄下, 並將檔案內主機網址 bell.idv.tw 修改為適當的主機名稱即可使用。
重新啟動SER伺服器
執行 /etc/rc.d/init.d/ser restart or /etc/init.d/ser restart (RPM/deb套件安裝者) 或 /usr/local/sbin/serctl restart (tar.gz安裝者)
現在我們已經擁有支援 mysql 資料庫功能的SER SIP proxy server了。 |
SER SIP server 進階設定2 -- serctl
發表於: 星期二 七月 20, 2004 6:21 pm |
|
軟體首頁: http://iptel.org 目前版本:0.8.12 (04.13.2004) 文章日期:07.20.2004 文章作者:bell
serctl使用法
為你的realm增加新的管理者
現在我們已經有了一個可用的資料庫且SER也能正確使用它了,現在可以加入一些使用者並且最少讓其中一位使用者具有管理者的權限。如果你想要使用網頁管理工具如serweb的話這就很重要了。
簡單的號操作可以透過serctl這個指令稿程式來達成,程式位置 rpm檔安裝: /usr/sbin tar.gz 安裝: /usr/local/sbin
新增一個使用者可以使用以下指令:
serctl add bell password [email protected]
系統將會提示"Type MYSQL Password",而預設的密碼是 heslo
要讓bell成為一個系統管理者,我們必須登入 mysql 並且更改資料庫。
mysql> connect ser; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A
Connection id: 82 Current database: ser
mysql> update subscriber set perms=?admin? where USER_ID=?JoeUser?;
[b] 註:在0.8.12版中測試時此指令無效!
倒數第三欄會顯示bell已經被設定為系統管理者了。 |
SER 0.8.14 版已經 Release!
表於: 星期四 八月 05, 2004 3:07 pm |
|
軟體首頁: http://iptel.org 目前版本:0.8.14 (07.27.2004) 文章日期:08.05.2004 文章作者:bell
說明:
SER 已經推出新版 0.8.14 ,按照網站上README的說法, 此版本並未新增功能,純粹是0.8.12的 bug fixed版。
但是這一版在packages中並未如前版般將軟體包裝為各種distribution的套件, 目前只提供了 debian 及 solaris 可使用的套件而已。
所以要嘗試使用本版的人不是要自行從 source code打包,不然便是得用 .tar.gz 檔安裝,tar.gz 檔安裝方式同 0.8.12版。
ser.cfg 支援mysql資料庫的設定檔下載:
http://bell.idv.tw/bell/doc/SER相關資料/cfg/ser.cfg.mysql.tar_install(0.8.12_0.8.14)
注意:
下載完之後記得修改檔名為 ser.cfg 然後複製或移至 /usr/local/etc/ser 目錄下, 並將檔案內主機網址 bell.idv.tw 修改為適當的主機名稱即可使用。 |
SER (Sip Express Router) SIP server
發表於: 星期五 六月 11, 2004 9:30 am |
|
軟體首頁: http://iptel.org 目前版本:0.8.12 (04.13.2004) 文章日期:04.13.2004 文章作者:bell
軟體安裝
RedHat 及使用RPM套件安裝者: rpm -ivh ser-0.8.12-0.i386.rpm
Debian使用deb套件安裝者: dpkg -i ser_0.8.12_i386.deb
使用tar.gz安裝者: cd / tar zxvf ser-0.8.12_linux_i386.tar.gz (這會將軟體安裝到/usr/local/目錄下,而設定檔會被放到/usr/local/etc/ser/ser.cfg)
啟動伺服器
redhat使用RPM套件安裝者: /etc/rc.d/init.d/ser start
debian: 安裝完軟體之後程式便會自動啟動。(某些狀況若沒有自動啟動的話可以執行/etc/init.d/ser start指令來啟動程式)
tar.gz: tar.gz檔案不包含init.d的script檔案,執行/usr/local/sbin/ser可以啟動程式。
檢查伺服器的狀態
利用serctl這個工具程式可以顯示伺服器的狀態,首先在環境變數裡加入SIP_DOMAIN參數,在B shell中執行:export SIP_DOMAIN="your.domain" 其中"your.domain"請填入正確的SER主機名稱。 要每次開機都能自動加入這個環境變數的話,請修改/etc/profile這個檔案,將這一行敘述加到最後面。
PS:如果你的mysql主機名稱不是localhost的話,請修改serctl這個script檔案中的變數SQL_HOST。
執行/usr/sbin/serctl moni(rpm及deb安裝) 或是/usr/local/sbin/serctl moni(tar.gz安裝)
即可看到伺服器的狀態。
登入伺服器
使用microsoft的windows messenger: 工具 -> 選項 -> 帳號 -> SIP通訊服務 登入名稱處輸入:使用者名稱@伺服器位址(例:[email protected]) 然後選進階 -> 組態設定 伺服器名稱或IP位址:輸入伺服器位址(例:192.168.0.252) 連線使用:選UDP
進階設定
完成以上設定之後的SER伺服器是非常簡單的,功能也很少,例如,它不做使用者認證,且每次重新開機便會失去使用者位址的資料庫。要改善這些問題如使用者身份認證,重開機仍能記住使用者的定址資料等,SER可以設定使用MYSQL資料庫來管理這些資料。
在你進行這個程序之前,你必須先確定MYSQL伺服器已經在你的電腦上跑起來了,你的MYSQL伺服器必須設定為可接受大量的連線要求,要增加可接受的連線要求,請修改/etc/rc.d/init.d/mysqld(or /etc/init.d/mysqld)這個script檔案,找到以下變數修改: set-variable=max_connection=500
安裝支援mysql的套件
RedHat: rpm -ivh ser-mysql-0.8.12-0.i386.rpm
debian: dpkg -i ser-mysql_module_0.8.12_i386.deb
tar.gz: ser-mysql的支援以放在tar.gz檔案中,路徑為 /usr/local/sbin/
建立MYSQL資料庫表格
如果是要升級舊版SER程式的話,請執行 /usr/sbin/ser_mysql.sh reinstall (rpm/deb安裝) or /usr/local/sbin/ser_mysql.sh reinstall (tar.gz安裝)
如果是全新安裝的SER: /usr/sbin/ser_mysql.sh createl (rpm/deb安裝) or /usr/local/sbin/ser_mysql.sh create (tar.gz安裝) 以上指令會建立新的SER資料庫的相關表格。
ser_mysql.sh其他相關使用語法:
ser_mysql.sh drop 刪除SER資料庫 ser_mysql.sh reinit 刪除並重新建立SER資料庫 ser_mysql.sh backup 備份資料庫 ser_mysql.sh restore 回存資料庫 ser_mysql.sh copy <new_db> 從已經存在的資料庫中複製 ser_mysql.sh reinstall ser_mysql.sh create
設定SER以使用MYSQL
修改/etc/ser/ser.cfg(rpm/deb安裝)或是/usr/local/etc/ser.cfg,將以下數行反註解掉(即拿掉行前的#號)
loadmodule "/usr/lib/ser/modules/mysql.so" loadmodule "/usr/lib/ser/modules/auth.so" loadmodule "/usr/lib/ser/modules/auth_db.so" modparam("usrloc", "db_mode", 2) modparam("auth", "calculate_ha1", yes) modparam("auth_db", "password_column", "password") if (!www_authorize("iptel.org", "subscriber")) { www_challenge("iptel.org", "0"); break; };
PS:以上iptel.org請填入正確的SER主機名稱。
重新啟動伺服器
執行 /etc/rc.d/init.d/ser restart or /etc/init.d/ser restart (RPM/deb套件安裝者) 或 /usr/local/sbin/serctl restart (tar.gz安裝者)
現在已可利用serctl程式來管理SER伺服器了,查看伺服器狀態:
serctl moni
如SER伺服器以正確執行中,可以利用帳號admin及密碼heslo來登入SER伺服器。
要新增使用者帳號可以利用以下指令:
serctl add <name> <password> <email>
這樣的格式來新增使用者。例:serctl add test 1234 test@localhost 在新增使用者時會詢問mysql的密碼,請使用heslo密碼。 |

|
|
相关文章:相关软件: |
|