1、安裝要求
平台 硬件 軟件 最小內存 支持的協議
IBM RS/6000 AIX 4.1.4 256MB TCP,SPX
2、為Sybase創建用戶、文件系統和環境設置
創建用戶和用戶組
必須為syabse在系統中創建用戶組Sybase和用戶Sybase,用戶Sybase的基本組為Sybase。
# gounpadd Sybase
# useradd –g sybase Sybase
創建文件系統 建議為Sybase的系統文件創建一個單獨的文件系統,最好加載一塊新硬盤,不然就在/下mkdir一個新目錄(空間要求足夠大),一般為/Sybase,建議大小為1000M以上。
將文件系統mount上,修改目錄/Sybase的用戶屬主為Sybase用戶,組屬主為Sybase組。
# cd /
# mkdir Sybase
# chown sybase:Sybase /Sybase
3、設置安裝環境
環境變量設置,可以設置在用戶Sybase的.profile或系統/etc/profile中。
.profile部分參考設置
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$home/bin:/usr/bin/X11:/sbin
export PATH
SYBASE = /sybase (Sybase的安裝目錄)
export DISPLAY = 80.20.16.28:0.0
DISQUERY = F50
export DISQUERYexport LD_LIBRARY _PATH = $Sybase/lib
export PATH = $PATH: $SYBASE/install:$Sybase/bin
NLSDATH (略)
export NLSDATH
LANG = en_US
4、軟件包處理
軟件包來源一般有兩種,光盤或tar壓縮包
例:
光盤: # mount /dev/cdrom /mnt/cdrom
壓縮包:# tar xvf syb1192_AIX.tar
5、安裝Sybase相關軟件
Adaptive Server Enterprise或SQL Server是server端產品,其他的都是clIEnt端產品,一般只需要安裝ASE就可以了。
安裝Adaptive Server Enterprise
1). 以用戶Sybase登錄。
2). 在用戶Sybase的HOME目錄下,執行相應產品光盤的安裝命令。 先取得對應產品的CAS,一般寫在光盤的標簽上,或者在該產品的install/cas文件中。如 Adaptive Server Enterprise 11.9.2的CAS在文件install/cas中。
運行以下安裝命令:
$ /cdrom/ase119/sybload -D
SYBLOAD - Product Distribution Program
Sybase (c) 1996
Current directory is "/Sybase".
Is this the correct directory for installation?
If so, please enter 'y' or 'Y': y
Is this a Local or Remote installation, as defined in your Installation Guide?
Please enter L for Local or R for Remote.
> L
Please enter the full name of the disk file of the global archive:
> /cdrom/ase1192/sybimage (/Sybase/ase1192/sybimage)
You specifIEd /cdrom/aix/sybimage for the media device. Is this correct?
please enter 'y' or 'Y' to continue: y
Please enter your Customer Authorization String, letters only:
> JLBKBK BKGKCM BYBKBF GZBYBK BKBKQP QDRX (注冊碼)
Sybase Products available for installation:
Product No. 1: Adaptive Server Enterprise, RS6000, 11.9.2
Product No. 2: Monitor Server for 11.9.2 ASE, RS6000, 11.9.2
Product No. 3: Monitor Server for 11.0.x SQL Server, RS6000, 11.9.2
Product No. 4: Monitor ClIEnt Library, RS6000, 11.9.2
Product No. 5: Historical Server, RS6000, 11.9.2
Product No. 6: Language Module Brazilian Portuguese, RS6000, 11.9
Product No. 7: Language Module Chinese, RS6000, 11.9
Product No. 8: Language Module French, RS6000, 11.9
Product No. 9: Language Module German, RS6000, 11.9
Product No. 10: Language Module Japanese, RS6000, 11.9
Product No. 11: Language Module Korean, RS6000, 11.9
Product No. 12: Language Module Spanish, RS6000, 11.9
Please enter the Product Numbers that you wish to install, one per line.
Terminate your entrIEs with a blank line.
> 1
> 2
> 7
>
The following products were chosen for installation:
Choice No. 1: Adaptive Server Enterprise, RS6000, 11.9.2
Choice No. 2: Monitor Server for 11.9.2 ASE, RS6000, 11.9.2
Choice No. 3: Language Module Chinese, RS6000, 11.9
If this list is correct as shown,
please enter 'y' or 'Y' to continue, 'q' or 'Q' to quit,
or any other character to make another set of choices: y
x ./bin/backupserver, 1038645 bytes, 1015 tape blocks
x ./bin/bcp, 826875 bytes, 808 tape blocks
.
.
The following products have been distributed from tape:
Adaptive Server Enterprise, RS6000, 11.9.2
Monitor Server for 11.9.2 ASE, RS6000, 11.9.2
Language Module Chinese, RS6000, 11.9
This concludes the tape distribution portion of the Sybase Installation.
Please consult your Installation Guide for further installation instructions.
至此,Adaptive Server Enterprise, RS6000, 11.9.2已安裝成功。
安裝Open ClIEnts/Server 11.1
$ /cdrom/opencli/sybload -D
SYBLOAD - Product Distribution Program
Sybase (c) 1996
Current directory is "/Sybase".
Is this the correct directory for installation?
If so, please enter 'y' or 'Y': y
Is this a Local or Remote installation, as defined in your Installation Guide?
Please enter L for Local or R for Remote.
> L
Please enter the full name of the disk file of the global archive:
> /cdrom/opencli/sybimage
You specifIEd /cdrom/opencli/sybimage for the media device. Is this correct?
please enter 'y' or 'Y' to continue: y
Please enter your Customer Authorization String, letters only:
> BKBYBK BOUOBY BYBYBY BOBYBY IOWJPN DCZS
Sybase Products available for installation:
Product No. 1: Open ClIEnt/C, RS6000, 11.1
Please enter the Product Numbers that you wish to install, one per line.
Terminate your entrIEs with a blank line.
> 1
>
The following products were chosen for installation:
Choice No. 1: Open ClIEnt/C, RS6000, 11.1
If this list is correct as shown, please enter 'y' or 'Y' to continue,
'q' or 'Q' to quit,
or any other character to make another set of choices: y
x ./bin/bcp, 716653 bytes, 700 tape blocks
x ./bin/bcp_dce, 732487 bytes, 716 tape blocks
x ./bin/defncopy, 656517 bytes, 642 tape blocks
.
.
.
安裝ESQL-C
$ /cdrom/esql/sybload -D
SYBLOAD - Product Distribution Program
Sybase (c) 1996
Current directory is "/Sybase".
Is this the correct directory for installation?
If so, please enter 'y' or 'Y': y
Is this a Local or Remote installation, as defined in your Installation Guide?
Please enter L for Local or R for Remote.
> L
Please enter the full name of the disk file of the global archive:
> /cdrom/esql/sybimage
You specifIEd /cdrom/esql/sybimage for the media device. Is this correct?
please enter 'y' or 'Y' to continue: y
Please enter your Customer Authorization String, letters only: > BKBYSO DIBYBY BYBODD BYBYBY BKHSKR MEUD
Sybase Products available for installation:
Product No. 1: Embedded SQL/C, RS6000, 11.1
Please enter the Product Numbers that you wish to install, one per line.
Terminate your entrIEs with a blank line.
> 1
>
The following products were chosen for installation:
Choice No. 1: Embedded SQL/C, RS6000, 11.1
If this list is correct as shown, please enter 'y' or 'Y' to continue,
'q' or 'Q' to quit,
or any other character to make another set of choices: y
Positioning Media For Loading - Please Wait.
x ./bin/bcp, 750177 bytes, 733 tape blocks
x ./bin/bcp_dce, 690248 bytes, 675 tape blocks
x ./bin/cpre, 917577 bytes, 897 tape blocks
x ./bin/cpre_dce, 934562 bytes, 913 tape blocks
x ./bin/defncopy, 665826 bytes, 651 tape blocks
.
. >.
安裝XA LIBRARY FOR CICS
$ /cdrom/xa11.1/sybload -D
SYBLOAD - Product Distribution Program
Sybase (c) 1996
Current directory is "/Sybase".
Is this the correct directory for installation?
If so, please enter 'y' or 'Y': y
Is this a Local or Remote installation, as defined in your Installation Guide?
Please enter L for Local or R for Remote.
> L
Please enter the full name of the disk file of the global archive:
> /cdrom/xa11.1/sybimage
You specifIEd /cdrom/xa11.1/sybimage for the media device. Is this correct?
please enter 'y' or 'Y' to continue: y
Please enter your Customer Authorization String, letters only:
> QFBKBY IOBXBK BYBYBO BKBKBY BYBOLO OBJZ
Sybase Products available for installation:
Product No. 1: XA Library for CICS and Encina, RS6000, 11.1.1
Please enter the Product Numbers that you wish to install, one per line. >
Terminate your entrIEs with a blank line.
> 1
>
The following products were chosen for installation:
Choice No. 1: XA Library for CICS and Encina, RS6000, 11.1.1
If this list is correct as shown, please enter 'y' or 'Y' to continue,
'q' or 'Q' to quit,
or any other character to make another set of choices: y
x ./devlib/libxa.a, 150644 bytes, 148 tape blocks
x ./install/SPR/cpr_xa, 2198 bytes, 3 tape blocks
x ./install/SPR/spr_xa, 800 bytes, 1 tape blocks
x ./install/setperm_xa, 1209 bytes, 2 tape blocks
.
.
.
x ./scripts/xASProc.sql, 7985 bytes, 8 tape blocks
x ./scripts/xASPropt.sql, 8639 bytes, 9 tape blocks
The following products have been distributed from tape:
XA Library for CICS and Encina, RS6000, 11.1.1
This concludes the tape distribution portion of the Sybase Installation.
Please consult your Installation Guide for further installation instructions.
6、安裝補丁
以Sybase用戶登錄
ASE補丁:
將ase1192/ebf/ ebf9455/目錄下的所有包拷貝到/Sybase/dbsys
$ mkdir dbsys
$ cd ase1192//ebf/ebf9455
$ cp –r ﹡ /Sybase/dbsys
7、建服務
ASE安裝完成後,查看sybase用戶的.profile文件的Sybase的路徑是否正確,正確的話就可以建服務了,建服務最好直接使用向導。
以Sybase用戶登錄
$ cd /Sybase/bin
$ ./srvbuild
出現向導後開始配置服務器,具體配置略。
下來列部分配置:
sqlsrv.server_name:Sybase (server名稱)
sqlsrv.Network_protocol_list:tcp
sqlsrv.Network_hostname_list:192.168.0.253
sqlsrv.Network_port_list:4100
sqlsrv.master_device_physical_name:/Sybase/data_lv/rmster_lv&nb
sqlsrv.master_device_size:90
sqlsrv.master_database_size:60
sqlsrv.sybsystemprocs_device_physical_name:/Sybase/data_lv /rsybproc_lv
sqlsrv.sybsystemprocs_device_size:90
sqlsrv.sybsystemprocs_database_size:80
sqlsrv.default_backup_server:SYB_BACKUP(backup server名稱)
bsrv.server_name SYB_BACKUP(backup server名稱)
bsrv.Network_protocol_list:tcp
bsrv.Network_hostname_list:192.168.0.253
bsrv.Network_prot_list:4200
bsrv.language:USE_DEFAULT
bsrv.character_set:iso_1
sqlsrv.server_name:Sybase
sqlsrv.sa_login:sa
sqlsrv.sa_passWord:
sqlsrv.default_language:us_english
sqlsrv.default_characterset: iso_1 sqlsrv.sort_order:binary
建庫成功後,啟動Sybase,確定Sybase服務正常。
# ps –A
可以查看到進程dataserver 、backupserver
以Sybase用戶登陸
$ showserver
8、加載自動啟動的腳本
腳本文件run內容:
# !/bin/kch
su - Sybase
/Sybase/install/startserver -f /sybase/install/RUN_Sybase(服務名)
/Sybase/install/startserver -f /Sybase/install/RUN_SYB_BACKUP(備份服務名)
sleep 20
更改文件的權限,確保可以執行。加載到 /etc/inittab文件裡
9、Sybase部分執行命令(中止服務)
# su - Sybase
$ isql -Usa -P -SSybase(服務名)
< shutdown Sybase(服務名)
< shutdown SYB_BUCKUP(固定名稱)
< go