[不再修正][網路][服務] OpenSER under Fedora 7

3 Comments

因 Fedora 10 與 OpenSIPs 的出現, 此篇文章已不具修改必要性。

REF: http://top12345tw.blogspot.com/2008/05/openser.html (better)

REF: http://www.hk-pub.com/forum/archiver/tid-1064603.html

website: http://www.openser.org/

download: http://ftp.upjs.sk/pub/users/sal/Fedora/7/

Files to donwload:
openser-1.2.2-10.fc7.i386.rpm
openser-mysql-1.2.2-10.fc7.i386.rpm

設定檔:
/etc/openser/openser.cfg
/etc/openser/openserctlrc

# vi /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”)

#if (!www_authorize(“openser.org”, “subscriber”)) {
#       www_challenge(“openser.org”, “0”);
#       exit;
#};
(以上四行裡的 operser.org 改成你主機的 FDQN)

建立資料庫表單在 MySQL 裡
# vi /usr/sbin/openser_mysql.sh (可以先編輯這個檔案, 裡面包含了可能會使的資訊)
# /usr/sbin/openser_mysql.sh (編輯後就執行它)
可用的參數有:
usage: openser_mysql.sh create
openser_mysql.sh drop   (!!entirely deletes tables)
openser_mysql.sh reinit (!!entirely deletes and than re-creates tables
openser_mysql.sh backup (dumps current database to stdout)
openser_mysql.sh restore <file> (restores tables from a file)
openser_mysql.sh copy <new_db> (creates a new db from an existing one)
openser_mysql.sh migrate <old_db> <new_db> (migrates DB from 1.1 to 1.2)
openser_mysql.sh presence (adds the presence related tables)
openser_mysql.sh extra (adds the extra tables – imc,cpl,siptrace,domainpolicy)
openser_mysql.sh serweb (adds the SERWEB specific tables)

建立環境:
export SIP_DOMAIN=your-ip.address (也可以把這行寫到 /etc/profile 裡)

建立一個資料庫給 OpenSER
# /usr/sbin/openser_mysql.sh create (然後會需要你的資料庫管理員的密碼, ex: root 的密碼)
MySQL password for root: xxxxxxxx

設定開機啟動:
chkconfig openser on

手動啟用:
service openser start

紀錄檔管理:
REF: http://www.openser.org/dokuwiki/doku.php/utils:basic-syslog-configuration
# vi openser.cfg

touch /var/log/openser
(選用)安裝管理程式 OpenSER Admin:
REF: http://www.read8.org/20080918/35617/
yum install ruby ruby-libs rubygems
http://sourceforge.net/projects/openseradmin
wget http://nchc.dl.sourceforge.net/sourceforge/openseradmin/openseradmin-0.3.tar.bz2
tar jxvf openseradmin-0.3.tar.bz2

http://lightyror.thegiive.net/2007/06/fedora-7-ruby-on-rails.html
gem i rails -y
gem install rails –include-dependencies

在 /etc/rc.local 裡加入
/var/www/oseradm/script/server -p 3000 -d
(-p 是指定 port , -d 表示以 daemon 執行)

3 Comments (+add yours?)

  1. JoeChen
    2 月 26, 2008 @ 14:58:44

    關於利用 openserctl 來新增 user 時, 會有
    “ERROR 1062 (23000) at line 1: Duplicate entry ” for key 3 “的問題, 可以參看以下網址
    http://www.nabble.com/Openser%2BMysql-td15000962.html

    將 您的 openserctlrc 裡的
    HAS_SERWEB=”yes”
    不要把它給註解了

    回覆

  2. JoeChen
    11 月 23, 2008 @ 22:56:03

    回覆

  3. JoeChen
    11 月 23, 2008 @ 23:40:05

    TANet VoIP
    http://voip.tanet.edu.tw/

    瑪凱電信(MKY, Mackay Telecommunications lnc.)
    http://www.ipbbnet.com/

    回覆

Leave a Reply

Share via
Copy link