程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> SyBase數據庫 >> SyBase綜合文章 >> sybase 數據庫for centos5.2安裝

sybase 數據庫for centos5.2安裝

編輯:SyBase綜合文章
一、在Linux下裝sybase軟件前一定要建立sybase帳戶並用這個賬戶登錄進來。確保安裝的軟件目錄(比如/opt/sybase)下的全部文件的屬主是Sybase用戶。在CENTOS中,如果沒有完全安裝,有時在安裝一些RPM包中出錯提示,提示找不到libstdc++.so.5這個文件,解放方法在光盤中找到compat-libstdc++這個包安裝就可以了,還可以用yum install libstdc++.so.5就可以了.不然會出現找不到libstdc++so.5什麼的
還有個包是libaio和libaio-devel
(1)創建ASE Server前的准備工作操作系統共享內存缺省值,對於大多數 Linux 版本為 32MB。
Adaptive Server 的最小要求為 64MB。 # ipcs -lm | grep ’max seg size’
max seg size (kbytes) = 32768Sybase15.0.2 for Linux 安裝步驟
修改/etc/sysctl.conf文件,會後一行加入kernel.shmmax=400*1024*1024(400M)內存數(以字節為單位)
sysctl -p 使生效
cenost5上安裝Sybase15.x(簡單記錄下)root
1.mkdir /opt/sybase //創建SybaseASE的安裝目錄
2.useradd/groupadd //添加用戶/用戶組sybase 要建立有sybase的環境變量(export LD_POINTER_GUARD=0 這個是重要的,不然建不了RUN_SYBASE主服務,我的uljcentos是主服務)或(useradd -d /opt/sybase -s /bin/bash sybase 再建立mkdir /opt/sybase 更改所屬chown sybase:sybase /opt/sybase) (Sybaser 的環境變量如1和 2
1文件.bash_profile內容
# .bash_profile # Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi # User specific environment and startup programs PATH=$PATH:$HOME/bin
export LD_POINTER_GUARD=0
export PATH 2文件.bashrc內容
# .bashrc # Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi # User specific aliases and functions
) 4.su - sybase //切換到sybase用戶進行安裝 RHEL5 (centos5)已經通過Sybase的認證,但是當前的版本不能用Sybase的setup程序配置服務器,需要用svrbuildres工具進行配置(或 svrbuild)。還有需要 export LD_POINTER_GUARD=0,最好把這一行寫到sybase用戶的.bash_profile裡面去。 5. ./setup -console //執行Sybase字符安裝程序, Installing Sybase Adaptive Server Enterprise Suite. Please wait... 0% 25% 50% 75% 100%
|||||||||||||||||||||||||||||||||||||||||||||||||| Creating uninstaller... Dublin, CA 94568, USA
00:00000:00000:2008/12/12 12:59:20.51 kernel Using /opt/sybase as the 'Sybase'
environment variable, found during startup.
00:00000:00000:2008/12/12 12:59:20.51 kernel Using OCS-15_0 as the 'Sybase_OCS'
environment variable, found during startup.
00:00000:00000:2008/12/12 12:59:20.51 kernel ASE booted on Linux release
2.6.27.4 version #6 SMP Fri Nov 14 15:43:37 CST 2008.
00:00000:00000:2008/12/12 12:59:20.51 kernel Using '/opt/Sybase/uljcentos.cfg'
for configuration information.
00:00000:00000:2008/12/12 12:59:20.51 kernel Logging ASE messages in file
'/opt/Sybase/ASE-15_0/install/uljcentos.log'.
00:00000:00000:2008/12/12 12:59:20.51 kernel Platform TCP network is forced to
IPv4-only.
00:00000:00000:2008/12/12 12:59:20.51 kernel ASE booted with TCP_NODELAY
enabled.
00:00000:00000:2008/12/12 12:59:20.51 kernel SSL Plus v5.0.4 security modules
loaded successfully.
Server 'uljcentos' was not created.
00:00000:00000:2008/12/12 12:59:20.51 kernel Network and device connection
limit is 1009. Press ENTER to read the text [Type q to quit]
interface have sybase_bs sybase_xp sybase_ms service but no Sybase service
提示Server 'uljcentos' was not created.建不了主服務,這時要改SYBASE.sh執行權(//設置腳本的可執行權限.該文件會設置一些必要的環境變量.這一步暈了好一陣。) 7 在root用戶下把 SYBASE.sh COPY到/etc/profile.d目錄下,訪問權限改為755,logout然後用Sybase用戶login就可以。
chomod +x /opt/sybase/Sybase.sh (開另一終端用root執行)
(安裝了Sybase ASE軟件以後會在安裝目錄下安裝SYASE.sh配置文件。根據配置文件配置相應的環境變量,加入系統.bash_profile中)
再用root執行 xhost +
然後Sybase用戶到安裝目錄bin下運行svrbuild
[Sybase@uljcentos bin]$ pwd
/opt/Sybase/ASE-15_0/bin
[Sybase@uljcentos bin]$ svrbuild
出現圖形界面(如果改動東西容易卡死X,不改注意看它的默認來建就沒事)建sybase服務(可用svrbuildre -r /opt/sybase/db.rs 腳本方式(配對的話很順利)建sybase服務,腳本有兩個,一個是db.rs主服務,一個是bk.rs備份服務.腳本可放Sybase目錄,到時指定就可)
腳本db.rs: sybinit.release_directory: USE_DEFAULT
sybinit.product: sqlsrv
sqlsrv.server_name:uljcentos
sqlsrv.new_config: yes
sqlsrv.do_add_server: yes
sqlsrv.Network_protocol_list: tcp
sqlsrv.Network_hostname_list: uljcentos
sqlsrv.Network_port_list: 5000
sqlsrv.server_page_size: USE_DEFAULT
sqlsrv.force_buildmaster: no
sqlsrv.master_device_physical_name: /opt/Sybase/data/master.dat
sqlsrv.master_device_size: USE_DEFAULT
sqlsrv.master_database_size: USE_DEFAULT
sqlsrv.errorlog: USE_DEFAULT
sqlsrv.do_upgrade: no
sqlsrv.sybsystemprocs_device_physical_name: /opt/Sybase/data/sysprocs.dat
sqlsrv.sybsystemprocs_device_size: USE_DEFAULT
sqlsrv.sybsystemprocs_database_size: USE_DEFAULT
sqlsrv.sybsystemdb_device_physical_name: /opt/Sybase/data/sybsystemdb.dat
sqlsrv.sybsystemdb_device_size: USE_DEFAULT
sqlsrv.sybsystemdb_database_size: USE_DEFAULT
sqlsrv.default_backup_server: SYB_BACKUP
sqlsrv.addl_cmdline_parameters:
腳本 bk.rs sybinit.release_directory: USE_DEFAULT
sybinit.product: bsrv
bsrv.server_name: uljcentos_bs
bsrv.new_config: yes
bsrv.do_add_backup_server: yes
bsrv.do_upgrade: no
bsrv.Network_protocol_list: tcp
bsrv.Network_hostname_list: uljcentos
bsrv.Network_port_list: 5001
bsrv.language: USE_DEFAULT
bsrv.character_set: USE_DEFAULT
bsrv.tape_config_file: USE_DEFAULT
bsrv.errorlog: USE_DEFAULT
sqlsrv.related_sqlsrvr: uljcentos
sqlsrv.sa_login: sa
sqlsrv.sa_passWord: USE_DEFAULT
bsrv.addl_cmdline_parameters: 然後
[Sybase@uljcentos bin]$ srvbuildres -r db.rs
installmaster: 100% complete.
installmaster script complete.
Creating two-phase commit database...
Two phase commit database complete.
Installing common character sets (Code Page 437, Code Page 850, ISO Latin-1,
Macintosh and HP Roman-8)...
Character sets installed.
Setting server name in Adaptive Server... [Sybase@uljcentos bin]$ srvbuildres -r bk.rs
Building Backup Server 'uljcentos_bs':
Writing entry into directory services...
Directory services entry complete.
Writing RUN_uljcentos_bs file...
RUN_uljcentos_bs file complete.
Starting server...
Server started.
Server 'uljcentos_bs' was successfully created. 這樣安裝基本完成.後面的使用見官方手冊.前三步使用root用戶操作.後面的都是使用新加的Sybase用戶.
8 連Sybase庫看看,查看版本如下
Sybase@CentOS ~]$ isql -Usa -Suljcentos -P
1> select @@VERSION
2> go ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Adaptive Server Enterprise/15.0.2/EBF 14331/P/Linux Intel/Linux 2.4.21-47.ELsmp
i686/ase1502/2486/32-bit/FBO/Thu May 24 08:15:50 2007 (1 row affected)
1>
9 停止數據庫
停止SYB_BACKUP shutdown SYB_BACKUP
停止Sybase shutdown 或 shutdown with nowait
10 啟動數據庫
啟動時執行:su - Sybase
cd install startserver -f RUN_Sybase 或RUN_SYB_BACKUP 注意一 locale ,我用的是[root@uljcentos ulj]# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
如果不是的話聽說也可以用C的locale安裝時
[Sybase@CentOS ~]$ export LC_ALL=C
注意二 不知interface用不用改,改的話重要改內存最大值地方就可
[root@uljcentos]# vi /opt/Sybase/ASE-15_0/uljcentos.cfg
[Physical Memory]
max memory = DEFAULT(我的用默認,我內存是1.5G,一般可改為512M #單位為2k max memory =262144)    
  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved