會員登入 新朋友?立刻註冊
[說明]
文章會慢慢移新精讚 //n.sfs.tw
2019/2/23 星期六     [文章分類及列表]
精讚Blog logo 部落格是自己寫爽的
精讚部落 > 系統應用 > LINUX
Openser 網路電話伺服器Linux下安裝記錄 無次要群組 列印 推薦
作者或來源 瘦河馬 2010-03-01 15:57:44
關鍵字 1openser 2網路電話 3安裝記錄
此文完整連結 http://n.zipko.info/392.html
文章歡迎轉載,請尊重版權註明連結來源。

Openser 網路電話伺服器Linux下安裝記錄---我96.7辛苦爬行的痕跡

Linux pc.er 2.6.23.15-80.fc7 #1 SMP Sun Feb 10 17:29:10 EST 2008 i686 i686 i386 GNU/Linux
一、利用yum安裝openser # yum install openser*
openser-1.3.2-2.fc7

二、修改  /etc/openser/openserctlrc 大部分的 '#' 都被我拿掉了

三、建立資料庫
[root@pc openserctl]# openserdbctl create
INFO: test server charset
INFO: creating database openser ...
/usr/lib/openser/openserctl/openserdbctl.mysql: line 155: /usr/share/openser//mysql/#-create.sql: 沒有此一檔案或目錄
ERROR: Creating core tables failed!

看一下/usr/lib/openser/openserctl /openserdbctl.mysql: line 155
for TABLE in $STANDARD_MODULES; do
        mdbg "Creating core table: $TABLE"
        sql_query $1 < $DB_SCHEMA/$TABLE-create.sql
        if [ $? -ne 0 ] ; then
                merr "Creating core tables failed!"
                exit 1
        fi
done

再去看/etc/openser/openserctlrc原來這行的 '#'沒有拿乾淨,把資料庫刪了重新執行。
STANDARD_MODULES="standard acc lcr domain group permissions registrar usrloc msilo
                   alias_db uri_db speeddial avpops auth_db pdt dialog dispatcher"

[root@pc openser]# openserdbctl create
INFO: test server charset
INFO: creating database openser ...
INFO: Core OpenSER tables succesfully created.
Install presence related tables? (y/n): y
INFO: creating presence tables into openser ...
INFO: Presence tables succesfully created.
Install tables for imc cpl siptrace domainpolicy carrierroute? (y/n): y
INFO: creating extra tables into openser ...
INFO: Extra tables succesfully created.
Install SERWEB related tables? (y/n): y
INFO: creating serweb tables into openser ...

                  WARNING                       
                                                
 1. There was a default admin user created:     
    username: admin@pc.er
    password: openserrw
                                                
 Please change this password or remove this user
 from the subscriber and admin_privileges table.
                                                
 2. Make sure to set HAS_SERWEB=yes in your   
    openserctlrc file (default: /etc/openser/)  

INFO: SERWEB tables succesfully created.
有四十三個表。

四、修改 /etc/openser/openser.cfg 拿掉註解
loadmodule "mysql.so"
loadmodule "auth.so"
loadmodule "auth_db.so"

modparam("usrloc", "db_mode",   2)

modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password")
modparam("auth_db", "db_url",  "mysql://openser:openserrw@localhost/openser")
modparam("auth_db", "load_credentials", "")

                # authenticate the REGISTER requests (uncomment to enable auth)
                if (!www_authorize("ip196051.ntcu.edu.tw", "subscriber"))
                {
                        www_challenge("ip196051.ntcu.edu.tw", "0");
                        exit;
                }

                if (!check_to())
                {
                        sl_send_reply("403","Forbidden auth ID");
                        exit;
                }

五、啟動測試
[root@pc ~]# service openser start
正在啟動 openser:                                          [  確定  ]

六、 加入使用者
格式 openserctl  add
[root@pc ~]# openserctl  add U0 123456 U0@ip196051.ntcu.edu.tw
new user 'U0' added

修改密碼
[root@pc ~]# openserctl passwd U1 512656
INFO: password change succeeded

移 除使用者
[root@pc ~]# openserctl rm U1

直接翻看資料庫,表名為'subscriber'
[root@pc ~]# openserctl db show subscriber

實機測通軟體話機即ok!
有關 openserctl 的指令 http://linux.die.net/man/8/openserctl

 

END
F B 留 言 版

留言結束請重新整理網頁顯示留言
相 關 文 章
同 群 組 其 他 文 章
隨 機 文 章
精讚部落版權所有(c) JinZan Blog http://n.zipko.info Author axer@tc.edu.tw. 最佳瀏器為Firefox,本網頁不支援IE6。[文章分類及列表]
本站最佳瀏覽解析度1024x768 網站建置 2009.11