OpenSER v1.1.1安裝手冊(07年搞的)

07年剛開始玩OpenSER時搞的,按照這個手冊肯定能裝成功,但是功能還有很多限制,如果想玩功能更全的,可以去看我的SER+SEMS安裝手冊,或者稍等一段時間,我的OpenSER也將會有大動作出來,嘿嘿...
 
廢話少說,下面開始:
 
1、安裝linux開發環境組件包
------------
2、安裝mysql-5.0.27
------------
~> groupadd mysql
~> useradd -g mysql mysql
~> tar xzvf mysql-5.0.27.tar.gz
~> cd mysql-5.0.27
~> ./configure --prefix=/usr/local/mysql --with-charset=gb2312 --enable-thread-safe-client --with-mysqld-ldflags=-all-static
~> make
~> make install
~> ./scripts/mysql_install_db --user=mysql
~> chown -R mysql /usr/local/mysql
~> chgrp -R mysql /usr/local/mysql
~> cp ./support-files/my-medium.cnf /etc/my.cnf
~> cp ./support-files/mysql.server /etc/init.d/mysqld
~> ln -s /etc/init.d/mysqld /etc/rc3.d/S99mysql
~> ln -s /etc/init.d/mysqld /etc/rc0.d/K01mysql
~> chmod +x /etc/init.d/mysqld
~> cd /usr/local/mysql
~> bin/mysqld_safe --user=mysql &
至此mysql安裝過程完畢,下面進行驗證及初步配置:
~> /etc/init.d/mysqld restart
~> cd ~
~> vi .bash_profile
在PATH後加入(不含引號) ":/usr/local/mysql/bin"
保存退出
~>exit
重新登入root
~> mysql
> show databases;
> use mysql;
> update user set password=password("123456") where user="root";
> exit;
~> /etc/init.d/mysqld restart
> mysql -p
輸入密碼
> use mysql;
> update user set host="%" where user="root" and host<>"localhost"; #開放root用戶的遠程訪問權限
> FLUSH PRIVILEGES;
> exit;
//~> /etc/init.d/mysqld restart
然後用mysql-front進行連接測試
將mysql的服務等級設爲4,開機自動加載 #
~> chkconfig --add mysqld
~> chkconfig mysqld on
檢查mysql.h及libmysqlclient.so等是否就位
將libmysqlclient.so及libmysqlclient.so.15從/usr/local/mysql/lib/mysql下cp到/usr/lib下
mysql.h在/usr/local/mysql/include/mysql下,如果mysql不是標準安裝則把mysql目錄cp到/usr/local/include下
至此mysql的驗證及初步配置過程完畢。
3、編譯安裝OpenSER
------------
~> tar xzvf openser-1.1.1_src.tar.gz
~> cd openser-1.1.1
~> make all
~> make install
~> make include_modules="mysql" modules #執行完後進入./modules/mysql下檢查是否生成了mysql.so
~> make include_modules="mysql" install
完了後在/usr/local/sbin下面會生成
openser,openserctl,openserunix,openser_mysql.sh這四個文件
用openser_mysql.sh create創建數據庫:
~> openser_mysql.sh create
MySql password for root:                               //mysql的密碼
Domain (realm) for the default user 'admin':           //直接回車
       creating database openser ...
Install SERWEB tables ?(y/n):y                         //按y然後回車
Domain (realm) for the default user 'admin':           //直接回車
       creating serweb tables into openser ...
      
修改openser的配置文件/usr/local/etc/openser/openser.cfg
接着修改相同目錄下的openserctlrc
此時用openserctl start/stop已經可以啓動/關閉openser了
將啓動腳本openser拷貝到/etc/init.d下
~> chmod +x /etc/init.d/openser
建立新用戶用於測試
~> openserctl add 8001 1111 [email protected]
~> openserctl add 8002 1111 [email protected]
~> openserctl add 8003 1111 [email protected]
在/var/log下做一個messages的快捷方式,爲後面要裝的openseradmin查詢日誌使用:
~> cd /var/log
~> ln -s messages openser
使用終端進行basic call測試。
至此openser core部分安裝完畢。
4、安裝openseradmin
------------
安裝RoR運行環境:
編譯安裝ruby:
以root用戶登錄
~> tar xfvz ruby-1.8.5.tar.gz
~> cd ruby-1.8.5
~> ./configure --prefix=/usr/local/ruby --enable-pthread
~> make
~> make install
~> cd ~
~> vi .bash_profile
在其中加上:
:/usr/local/ruby/bin
驗證:
~> ruby -v
顯示ruby 1.8.5 (2006-08-25) [i686-linux],ruby安裝成功。
安裝rubygems:
以root用戶重新登錄
~> tar xfvz rubygems-0.9.0.tgz
~> cd rubygems-0.9.0
~> ruby setup.rb
安裝rails on ruby:
~> gem install rake
~> gem install activesupport
~> gem install activerecord
~> gem install actionpack
~> gem install actionmailer
~> gem install actionwebservice
~> gem install rails
驗證:
~> rails -v
顯示Rails 1.1.6,安裝成功。
安裝 openseradmin:
~> tar -xjvf openseradmin-0.3.tar.bz2
~> cd openseradmin-0.3
~> mysql -p
mysql>GRANT ALL ON openser.* TO 'openser'@'localhost' IDENTIFIED BY 'openserrw'; //for pgsql: 用postgres登錄進去,然後連到openser表,然後GRANT ALL ON acc,active_sessions,admin_privileges,aliases,dbaliases,domain,grp,gw,gw_grp,lcr,location,missed_calls,pd_multidomain,pending,phonebook,re_grp,server_monitoring,server_monitoring_agg,silo,sip_trace,speed_dial,subscriber,trusted,uri,usr_preferences,usr_preferences_types,version TO openser;
mysql>use openser;
mysql>source /home/zyq/tempfile/OpenSER_ins/openseradmin-0.3/db/database_tables.sql; //for pgsql:用pgAdmin執行database_tables_pg.sql,然後在命令行用postgres登入給openser用戶授新建幾個表的權。
mysql>exit;
~> cd /home/zyq/tempfile/OpenSER_ins/openseradmin-0.3
~> ln -s /home/zyq/tempfile/OpenSER_ins/openseradmin-0.3/public-example/ public
檢查/home/zyq/tempfile/OpenSER_ins/openseradmin-0.3/config/database.yml,一般默認即可。
~> cd /home/zyq/tempfile/OpenSER_ins/
~> mv openseradmin-0.3 /opt/openseradmin
~> cd /opt/openseradmin
~> ./script/server
打開瀏覽器,[url]http://192.168.137.2:3000[/url],即可訪問。
------------
OVER.
 
 
 
 
 
 
 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章