SYBASE ASE12.5.3 For Linux安装配置

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

۩f
在Suse Linux Enterprise 3.0上安装Sybase ASE
12.5.3
一.安装准备
1.1系统软件包信息
操作系统:Suse Linux Enterprise AS Release 3
JA V A包:java1.4
数据库:Sybase ASE 12.5.3
1.2创建cdrom文件系统(如果没有cdrom文件系统)
该步骤可以不做!
1.3创建SYBASE文件系统 (Linux :)
例如:/home/sybase 空间要求: 5G disk( local disk)
该步骤可以不做!
1.4创建SYBASE组和用户(Linux : useradd)
增加sybase组和sybase用户,将sybase用户加入sybase组。

修改sybase文件系统的属主:chown –R sybase:sybase /home/sybase
1.5确认基本安装信息:(安装后的情况)
Master device /dev/rsybmaster
Sybsystemprocs device: /dev/rsybproc
Server name: SYBASE
Errorlog location /home/sybase/ASE-12_5/install/errorlog
Backerup Server name SYBASE_backup
Language u s_english
Character set utf8
Sort order nocase
PageSize 8k (12.5以上可以是2k-16k) 1.6创建SYBASE逻辑设备
例:(卷组及逻辑卷的创建应由操作系统的工程师划分)
修改设备权限:
#chown sybase:sybase /dev/ rsyb* /dev/ syb*
#chmod 660 /dev/ rsyb* /dev/ syb*
二.SYBASE产品安装
2.1SYBASE数据库的安装
2.1.1安装数据包
以sybase用户登录到主机,在Linux命令行下执行如下命令:#mount –r /dev/cd0 /mnt/cdrom
$ cd /mnt/cdrom
$./setup –console(字符安装模式) 或$./setup(图形方式)
Initializing InstallShield Wizard........
Launching InstallShield Wizard........
-------------------------------------------------------------------------------
Welcome to the InstallShield Wizard for Sybase Adaptive Server Enterprise Suite version 12.5.2 GA
The InstallShield Wizard will install Sybase Adaptive Server Enterprise Suite
on your computer.
To continue, choose Next.
Press 1 for Next, 3 to Cancel or 4 to Redisplay [1] 1
-------------------------------------------------------------------------------
1) Argentina 2) Australia
3) Belgium(English) 4) Belgium(French)
5) Brazil 6) Canada
7) Denmark 8) Europe,Middle East, and Africa - General 9) France(English) 10) France(French)
11) Germany(English) 12) Germany(German)
13) Hong Kong 14) India
15) Italy(English) 16) Italy(Italy)
17) Japan 18) Korea
19) Malaysia 20) Mexico
21) Netherlands 22) New Zealand
23) Norway 24) People's Republic of China(PRC)
25) Philippines 26) Singapore
27) Spain(English) 28) Spain(Spanish)
29) Sweden 30) Switzerland(English)
31) Switzerland(German) 32) Taiwan
33) Thailand 34) United Kingdom
35) United States of America 36) Any Other Locations
Please enter the number of the location you are installing. (1-37) [1] 35
?
LICENSE AGREEMENT
United States and Canada
IMPORTANT NOTICE: Read this License Agreement ("Agreement") carefully before
using the enclosed Program. You may Use the Program acquired in the United States and Canada only, in accordance with the following terms and conditions.
IF YOU DO NOT AGREE TO BE BOUND BY THESE TERMS, YOU MAY NOT USE THE PROGRAM. By
installing or using the Program in any way, You acknowledge that You have read,
understand and agree to the terms of this Agreement. If You do not agree with these terms, promptly return the Program and package (and all other product contents, including Documentation) with Your receipt or other proof of purchase to the entity from which You obtained this product within 30 days and request a refund. THIS IS A LICENSE AND NOT A SALE.
click the "I agree" button if you wish to install the program.
If You, Your company, or Your public agency have signed a written software license agreement with Sybase, Inc., or Sybase Canada Limited ("Sybase") or a Press ENTER to read the text [Type q to quit] q
If you cannot read the agreement for the related location, you may not have the fonts installed on your system to view the agreement properly. If you cannot read this agreement, go to /softwarelicenses and read it there before agreeing.
I agree to the terms of the Sybase license for the install location
specified.(Y/N) [N]Y
Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1] 1
Please wait...
-------------------------------------------------------------------------------
Please enter the directory where you would like to install the products or
press ENTER to accept the default.
Destination Directory [/home/sybase]
Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1] 1
1. Yes
2. No
You have chosen to install into an existing directory. Any older versions of the products you choose to install that are detected in this directory will
be
replaced. Do you want to continue with installation into this directory? [2]1 -------------------------------------------------------------------------------
Choose the setup type that best suits your needs.
[X] 1 - Typical
The program will be installed with the suggested configuration.
Recommended for most users.
[ ] 2 - Full
The program will be installed with all the products and features. [ ] 3 - Custom
The program will be installed with the features you choose.
Recommended for advanced users.
To select an item enter its number, or 0 when you are finished: [0]
Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1] 1 Performing install checks. Please wait...
Please wait...
------------------------------------------------------------------------------- Sybase Adaptive Server Enterprise Suite will be installed in the following location: /home/sybase
with the following features:
Sybase Servers
Adaptive Server Enterprise
ASE Diagnostic Server
Replicator
Connectivity
Open Client
Common ctlib files
Common dblib files
Language Modules
jConnect 5.5 for JDBC
jConnect 6.0 for JDBC
Shared
ASE Adminstration Tools
Press ENTER to read the text [Type q to quit]
Sybase Central
Adaptive Server Plugin
Job Scheduler Templates and Utilities
Sybase Software Asset Management
for a total size:
762.6 MB
Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1] 1 Installing Sybase Adaptive Server Enterprise Suite. Please wait... |-----------|-----------|-----------|------------|
0% 25% 50% 75% 100% ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2.1.2设置环境变量
编辑/home/sybase/.profile文件,如下:
在PATH中加入路径/home/sybase/ASE-12_5/install
SYBASE=/home/sybase
DSQUERY=SYBASE
SYBASE_ASE=ASE-12_5
SYBASE_OCS=OCS-12_5
LD_LIBRARY_PATH=$SYBASE/$SYBASE_ASE/lib
export SYBASE DSQUERY PATH SYBASE_ASE SYBASE_OCS LD_LIBRARY_PATH
PATH=$PATH: $SYBASE/$SYBASE_ASE/bin:
export PATH
../SYBASE.sh
编辑/home/sybase/.bash_profile文件,如下
SYBASE=/home/sybase
DSQUERY=SYBASE
SYBASE_ASE=ASE-12_5
SYBASE_OCS=OCS-12_5
LD_LIBRARY_PATH=$SYBASE/$SYBASE_OCS/lib
export SYBASE DSQUERY PATH SYBASE_ASE SYBASE_OCS LD_LIBRARY_PATH
PATH=$PATH:$SYBASE/$SYBASE_ASE/bin:$SYBASE/$SYBASE_OCS/bin: export PATH
SYBPLATFORM=linux
export SYBPLATFORM
LANG=CP936
export LANG
2.2SYBASE数据库的配置
2.2.1配置ASE服务器
1.在Sybase系统文件安装完成后,利用init文件夹中已建立配置文件的样例来创建SYBASE数据库服务器
(/home/sybase/ASE-12_5/init/sample_resource_files/srvbuild.adaptive_s erver.rs)
1) 在/home/sybase下建立rs文件夹(mkdir rs);将样例文件拷贝到/home/sybase/rs文件夹下,并改名为sql.rs,在/home/sybase/ASE-12_5/init/sample_resource_filesl路径下执行下述命令:$ cp srvbuild.adaptive_server.rs /home/sybase/rs/sql.rs
2) 用vi 命令修改配置参数
$ vi sql.rs
2.具体配置参数如下:
sybinit.release_directory: /home/sybase
sybinit.product: sqlsrv
sqlsrv.server_name: SYBASE
sqlsrv.new_config: yes
sqlsrv.do_add_server: yes
work_protocol_list: tcp
HOSTNAME(对应IP:本机IP,应已记录在/etc/hosts中,下同)
work_port_list: 7788
sqlsrv.server_page_size: 8K (逻辑页大小)
sqlsrv.force_buildmaster: no
sqlsrv.master_device_physical_name: /dev/rsybmaster
sqlsrv.master_device_size: 160
sqlsrv.master_database_size: 110
sqlsrv.errorlog: /home/sybase/ASE-12_5/install/errorlog
sqlsrv.do_upgrade: no
sqlsrv.sybsystemprocs_device_physical_name:/dev/rsybproc
sqlsrv.sybsystemprocs_device_size: 130
sqlsrv.sybsystemprocs_database_size: 120
sqlsrv.sybsystemdb_device_physical_name:USE_DEFAULT
sqlsrv.sybsystemdb_device_size: USE_DEFAULT
sqlsrv.sybsystemdb_database_size: USE_DEFAULT
sqlsrv.default_backup_server: SYBASE_backup
注意:sqlsrv.sybsystemprocs_device_size、sqlsrv.sybsystemdb_device_size 两个参数数值要略小于实际sybsystemprocs及sybsystemdb所建逻辑卷的大小(10M-25M左右);
2.2.2初始化sybase adaptive server
进入/home/sybase/ASE-12_5/bin路径中,在命令行下执行srvbuildres命令:
$ srvbuildres–r /home/sybase/rs/sql.rs
./srvbuildres: Building Adaptive Server 'SYBASE':
./srvbuildres: Building master device...
./srvbuildres: Master device complete.
./srvbuildres: Writing entry into directory services...
./srvbuildres: Directory services entry complete.
./srvbuildres: Writing RUN_SYBASE file...
./srvbuildres: RUN_SYBASE file complete.
./srvbuildres: Starting server...
./srvbuildres: Server started.
./srvbuildres: Building sysprocs device and sybsystemprocs database...
./srvbuildres: sybprocs device and sybsystemprocs database created.
./srvbuildres: Running installmaster script to install system stored procedures...
./srvbuildres: /home/sybase/ASE-12_5/scripts/installmaster: 10% complete.
./srvbuildres: /home/sybase/ASE-12_5/scripts/installmaster: 20% complete.
./srvbuildres: /home/sybase/ASE-12_5/scripts/installmaster: 30% complete.
./srvbuildres: /home/sybase/ASE-12_5/scripts/installmaster: 40% complete.
./srvbuildres: /home/sybase/ASE-12_5/scripts/installmaster: 50%
complete.
./srvbuildres: /home/sybase/ASE-12_5/scripts/installmaster: 60% complete.
./srvbuildres: /home/sybase/ASE-12_5/scripts/installmaster: 70% complete.
./srvbuildres: /home/sybase/ASE-12_5/scripts/installmaster: 80% complete.
./srvbuildres: /home/sybase/ASE-12_5/scripts/installmaster: 90% complete.
./srvbuildres: /home/sybase/ASE-12_5/scripts/installmaster: 100% complete.
./srvbuildres: installmaster script complete.
./srvbuildres: Installing common character sets (Code Page 437, Code Page 850,
ISO Latin-1, Macintosh and HP Roman-8)...
./srvbuildres: Character sets installed.
./srvbuildres: Setting server name in Adaptive Server...
./srvbuildres: Server name added. The name will be visible from SQL after
restarting the server.
./srvbuildres: Server 'SYBASE' was successfully created.
完成服务器安装;
2.2.3设置客户端字符集
在/home/Sybase/locaels目录下,打开locales.dat文件,找到有[linux]的位置,将[linux]部分locale = default改为
在.profile文件中添加如下内容
LANG=default
SYBLANG=cp936
export LANG SYBLANG
2.2.4服务器的启动与停止
1. 手工启动数据库:
$ cd /home/sybase/ASE-12_5/install
$ startserver -f RUN_SYBASE
2. 关闭数据库:
isql –Usa –P -SSYBASE
1>shutdown SYB_BACKUP <关闭备份数据库>
2>go
1>checkpoint
2>go
1>shutdown
2>go
2.3创建用户数据库例子
3.4.1建立一个4000M的名为portal的数据设备为例
$ isql –Usa –P –SSYBASE
1> disk init name=“portaldb”, --数据库逻辑设备名
2> physname=“/dev/rportaldb”,--逻辑卷名称
3> vdevno=7, --设备号
4> size=2048000 --数据设备大小
5> go
3.4.2建立一个1000M的名为logdb的日志设备为例
$ isql –Usa –P –SSYBASE
1> disk init name=“logdb”, --数据库逻辑设备名
2> physname=“/dev/rlogdb”,--逻辑卷名称
3> vdevno=8, --设备号
4> size=512000 --日志设备大小
5> go
3.4.3创建用户数据库portal
1> create database portal on portaldb=4000 log on logdb=1000
2> go
一般数据库的日志设备大小是数据设备大小的20-30%。

2.4增加用户
增加portal用户
1>sp_addlogin portal, “000000”, portal
2>go
1>use portal
2>go
1>sp_adduser portal
2>go
2.5修改userdb及tempdb的设置
1>use master
2>go
1>sp_dboption portal, “selcect into”, true
2>go
1>sp _dboption portal, “trunc log”, true
2>go
1>sp _dboption portal, “abort tran”, true
2>go
1>checkpoint
2>go
1>use tempdb
2>go
1>sp_dboption tempdb “trunc log”, true
2>go
1>sp_dboption tempdb “abort tran”, true
2>go
1>check point
2>go。

相关文档
最新文档