- 论坛徽章:
- 0
|
Sybase怎样安装
看看我原来的帖子,是实战篇,肯定可以装上
http://www.chinaunix.net/forum/viewtopic.php?t=68239
SYBASE11.0.3在SCO5.05/5.0.6中的安装
[此方案在浪潮英信NC2000测试通过,并投入生产]
一.SCO5.05核心参数的配置
1 共享内存修改:
ROOT用户进入:
建SYBASE组和SYBASE用户,把SYBASE用户的组设为SYBASE
运行scoadmin, 进入Account Manager. 增加SYBASE组和SYBASE用户
编辑/etc/conf/cf.d/stune
加入:
SHMMAX 107073741824(SHMMAX 为总内存的80%到100%) 如1024M 1024*1024*1024*80%=107073741824*80%
NFILE 11000
NOFILES 1024
2 激活异步IO
将/etc/conf/sdevice.d/aio 文件”N”改为”Y”
/etc/conf/sdevice.d/suds文件”N”改为”Y”
3 编辑/etc/rc2
在文件最后加入/etc/suds_ctrl –a 100
#说明:100为sybase组ID
4 .重建内核
# /etc/conf/cf.d/link_unix
5 重新启动
# reboot
二.安装SYBASE11.0.3(DATASERVER和BACKUPSERVER)
1 SYBASE11.0.3的安装
root用户进入
确定SYBASE的安装文件在哪里,安装包包括sybload 和sybimage
# su –sybase
#cd 安装包的目录下
# ./sybload –D
确认安装目录 /usr/sybase Y
本地安装 L
输入CAS号:
选择产品序号: Y(确认)
等待安装完成.
2.安装 EBF补丁
cd /usr/sybase
tar xvf ebf7575.tar 说明:一定要在/usr/sybase路径下解包
3. 配置 SQL Server
sybase 用户进入
/usr/sybase/install/sybinit
显示:
1. release directory #说明:SYBASE配置的路径
2. Edit/view interfaces file #说明:编辑服务的端口号
3. configure a server product #说明:配置SQL SERVER服务器
4. …
其中SYBASE服务器端配置1, 2, 3项. SCO下的SYBASE客户端只配置1, 2项
确认release directory 为 /usr/sybase
选2 进入:
1. Add new entry
2. Modify an existing entry
3. View an existing entry
4. Delete an existing entry
按1 出现
1. Server name:
输入1 后再输入SYBASE名字: SYBASE
按 Ctrl+a后出现
1. Retry count : 0;
2. Retry delay: 0;
3. Add new listerner service:
分别选1和2 , 将其值改为 10
选 3 后出现:
1. Hostname/Address
2. Port:
3. Name Alias:
4. Delete this Service from the interfaces entry
选 1 输入: 本机IP
选 2 输入: 3000
Ctrl+a 接受并确认.
返回主菜单:
选 3 进入
1. SQL Server #说明:SQL Server配置
2. Backup Server #说明:Backup Sever配置
选 1 后出现
1. Configure a new SQL Server
2. Configure an exiting SQL
3. Update an existing SQL Server
选 1, Ctrl+a 确认后出现 9 项.按提示逐个确认.
若配置成功SQL Server 会成功启动.
返回主菜单:
配置Backup Server, 按提示进入
1. Backup Server errorlog: /usr/sybase/install/backup.log
2. Enter / Modify Backup Server interfaces file information
3. Backup Server language: us_english
4. Backup Server character set: iso_1
按 2 进入 Backup Server 端口号的配置, 增加备份服务的侦听端口3001 ,
不能与SQL Server的侦听端口(778 重复, 其余都接受默认值.
Ctrl+a确认返回,若配置成功,备份服务会成功启动.
在/usr/sybase/install路径下,运行 showserver, 可以查看服务启动的信息.
3.修改SYBASE11.0.3的系统参数
配置完成后,在/usr/sybase下产生 master.dat, sybprocs.dat, interfaces , SYBASE.cfg
等文件
SYBASE.cfg 为 SYBASE参数配置文件. 改以下参数:
Total memory = 系统内存的50% #注意以2K单位
number of user connections = 50
重启SQLSERVER使配置生效 ,若不能成功启动,则把Total memory 值稍微改小.
4. 启动与关闭
cd /usr/sybase/install路径下
$RUN_SYBASE& #启动SQL_Server
$RUN_SYB_BACKUP& #启动BACKUP_Server
$isql –Usa –P #进入系统
>;shutdown SYB_BACKUP
>;go #关闭BACKUP_Server
>;
>;shutdown
>;go #关闭SQL_Server
5.建数据库设备
5. 1 建裸设备
在ROOT用户下, 执行divvy
出现
+-------------------+------------+--------+---+-------------+------------+
| Name | Type | New FS | # | First Block | Last Block |
+-------------------+------------+--------+---+-------------+------------+
| boot | EAFS | no | 0 | 0| 15359|
| swap | NON FS | no | 1 | 15360| 209919|
| root | HTFS | no | 2 | 209920| 9952256|
| | NOT USED | no | 3 | -| -|
| | NOT USED | no | 4 | -| -|
| | NOT USED | no | 5 | -| -|
| recover | NON FS | no | 6 | 9952257| 9952266|
| hd0a | WHOLE DISK | no | 7 | 0| 10008462|
+-------------------+------------+--------+---+-------------+------------+
9952267 1K blocks for divisions, 56196 1K blocks reserved for the system
n[ame] Name or rename a division.
c[reate] Create a new file system on this division.
t[ype] Select or change filesystem type on new filesystems.
p[revent] Prevent a new file system from being created on this division.
s[tart] Start a division on a different block.
e[nd] End a division on a different block.
r[estore] Restore the original division table.
Enter your choice or q to quit: e #编辑结束块
which division? (0 through 6)?2 #选择root分区,ID为 2
Ending block number? 6000000 #输入结束块号
注:修改root分区结束块, 为建裸设备准备空间.
+-------------------+------------+--------+---+-------------+------------+
| Name | Type | New FS | # | First Block | Last Block |
+-------------------+------------+--------+---+-------------+------------+
| boot | EAFS | no | 0 | 0| 15359|
| swap | NON FS | no | 1 | 15360| 209919|
| root | HTFS | no | 2 | 209920| 6000000|
| | NOT USED | no | 3 | -| -|
| | NOT USED | no | 4 | -| -|
| | NOT USED | no | 5 | -| -|
| recover | NON FS | no | 6 | 9952257| 9952266|
| hd0a | WHOLE DISK | no | 7 | 0| 10008462|
+-------------------+------------+--------+---+-------------+------------+
9952267 1K blocks for divisions, 56196 1K blocks reserved for the system
n[ame] Name or rename a division.
c[reate] Create a new file system on this division.
t[ype] Select or change filesystem type on new filesystems.
p[revent] Prevent a new file system from being created on this division.
s[tart] Start a division on a different block.
e[nd] End a division on a different block.
u[ndo] Undo the last change.
r[estore] Restore the original division table.
Enter your choice or q to quit: n #命名裸设备名称
which division? (0 through 7)?3 #选择ID号
what do you want to call it? data
+-------------------+------------+--------+---+-------------+------------+
| Name | Type | New FS | # | First Block | Last Block |
+-------------------+------------+--------+---+-------------+------------+
| boot | EAFS | no | 0 | 0| 15359|
| swap | NON FS | no | 1 | 15360| 209919|
| root | HTFS | no | 2 | 209920| 6000000|
| data | NOT USED | no | 3 | -| -|
| | NOT USED | no | 4 | -| -|
| | NOT USED | no | 5 | -| -|
| recover | NON FS | no | 6 | 9952257| 9952266|
| hd0a | WHOLE DISK | no | 7 | 0| 10008462|
+-------------------+------------+--------+---+-------------+------------+
9952267 1K blocks for divisions, 56196 1K blocks reserved for the system
n[ame] Name or rename a division.
c[reate] Create a new file system on this division.
t[ype] Select or change filesystem type on new filesystems.
p[revent] Prevent a new file system from being created on this division.
s[tart] Start a division on a different block.
e[nd] End a division on a different block.
u[ndo] Undo the last change.
r[estore] Restore the original division table.
Enter your choice or q to quit: s #为bms_db设定起始块值
which division? (0 through 6)?3 #与name的ID相同
Starting block number? 6000001 #起始块值,每块的单位为1k
+-------------------+------------+--------+---+-------------+------------+
| Name | Type | New FS | # | First Block | Last Block |
+-------------------+------------+--------+---+-------------+------------+
| boot | EAFS | no | 0 | 0| 15359|
| swap | NON FS | no | 1 | 15360| 209919|
| root | HTFS | no | 2 | 209920| 6000000|
| data | NOT USED | no | 3 | 6000001| 0|
| | NOT USED | no | 4 | -| -|
| | NOT USED | no | 5 | -| -|
| recover | NON FS | no | 6 | 9952257| 9952266|
| hd0a | WHOLE DISK | no | 7 | 0| 10008462|
+-------------------+------------+--------+---+-------------+------------+
9952267 1K blocks for divisions, 56196 1K blocks reserved for the system
n[ame] Name or rename a division.
c[reate] Create a new file system on this division.
t[ype] Select or change filesystem type on new filesystems.
p[revent] Prevent a new file system from being created on this division.
s[tart] Start a division on a different block.
e[nd] End a division on a different block.
u[ndo] Undo the last change.
r[estore] Restore the original division table.
Enter your choice or q to quit: e #为bms_db设定结束块值
which division? (0 through 6)?3
Ending block number? 9000000 #j结束块值,
注: (结束块值 - 起始块值 + 1 ) * 1k 为裸设备的空间大小(单位为字节)
+-------------------+------------+--------+---+-------------+------------+
| Name | Type | New FS | # | First Block | Last Block |
+-------------------+------------+--------+---+-------------+------------+
| boot | EAFS | no | 0 | 0| 15359|
| swap | NON FS | no | 1 | 15360| 209919|
| root | HTFS | no | 2 | 209920| 6000000|
| data | NOT USED | no | 3 | 6000001| 9000000|
| | NOT USED | no | 4 | -| -|
| | NOT USED | no | 5 | -| -|
| recover | NON FS | no | 6 | 9952257| 9952266|
| hd0a | WHOLE DISK | no | 7 | 0| 10008462|
n[ame] Name or rename a division.
c[reate] Create a new file system on this division.
t[ype] Select or change filesystem type on new filesystems.
p[revent] Prevent a new file system from being created on this division.
s[tart] Start a division on a different block.
e[nd] End a division on a different block.
u[ndo] Undo the last change.
r[estore] Restore the original division table
Enter your choice or q to quit: c #激活data分区
which division? (0 through 6)?3
+-------------------+------------+--------+---+-------------+------------+
| Name | Type | New FS | # | First Block | Last Block |
+-------------------+------------+--------+---+-------------+------------+
| boot | EAFS | no | 0 | 0| 15359|
| swap | NON FS | no | 1 | 15360| 209919|
| root | HTFS | no | 2 | 209920| 6000000|
| data | HTFS | yes | 3 | 6000001| 9000000|
| | NOT USED | no | 4 | -| -|
| | NOT USED | no | 5 | -| -|
| recover | NON FS | no | 6 | 9952257| 9952266|
| hd0a | WHOLE DISK | no | 7 | 0| 10008462|
+-------------------+------------+--------+---+-------------+------------+
Enter your choice or q to quit: q
i[nstall] Install the division set-up shown
r[eturn] Return to the previous menu
e[xit] Exit without installing a division table
Please enter your choice: I #使以上配置生效
Making filesystems
建裸设备完成,
cd /dev
ls -l *data*
brw-r----- 1 sysinfo sysinfo 1, 43 Aug 22 13:58 data
crw-r----- 1 sysinfo sysinfo 1, 43 Aug 22 13:58 rdata
可以看到两个设备文件
修改data的属性
chown sybase:sybase data
5. 2 建数据库
isql –Usa –P
>;create database ustcboy
>;go
>;create table address(id int,name varchar(12))
>;go
>;insert into address(id,name) valuese(1,"ustcboy"
>;go
>;select * from address
>;go
这时应该可以显示数据
sybase 自启动:
编辑 /etc/rc2.d/SStartsybase 文件
echo "starting sybase..."
SYBASE=/usr/sybase
DSQUERY=SYBASE
export SYBASE DSQUERY
/usr/sybase/install/RUN_SYBASE& |
|