博客 | 彩信 | 影视 | 两性 | 笑话 | 文学 | QQ酷 | 游戏 | 动漫 | 健康 | 人才 | 星座 | 心理 | 网摘 | 图库 | 下载 | 旅游 | 交友 |
社会百态 | 美图写真 | 精彩网文 | 动漫卡通 | 搞笑猎奇 | 历史军事 | 文化旅游 | 明星娱乐 | 两性话题 | 恐怖灵异 | FLASH小游戏 |
您的位置: 首页>操作系统>Linux>正文
 

Sybase 11.0.3.3落户FreeBSD

时间:2006-5-29 9:50:45 | 来自:网络收集 | 浏览:收藏到新浪ViVi 收藏到365KEY

Sybase 11.0.3.3落户FreeBSD

一、准备工作
  调整内核参数
  如果你的FreeBSD是缺省安装的,为了在FreeBSD下运行Sybase11.0.3.3,那么很可能你要重新编译自己的内核。这是因为缺省情况下,核心提供给Linux使用的最大内存空间不能满足运行Sybase的需要。笔者在安装过程中发现,配置完SQL Server后,服务器无法启动,于是查看了安装日志(见例1):

  00:2001/01/08 09:41:28.02 kernel Max fd 1064 exceeds internal limit of 1024

  00:2001/01/08 09:41:28.18 kernel Using config area from primary master device.

  00:2001/01/08 09:41:28.18 kernel Configuration Error: Configuration file, '/usr/opt/sybase/sybase/SYBASE.cfg',does not exist.

  00:2001/01/08 09:41:28.19 kernel Warning: A configuration file was not specified and the default file '/usr/opt/sybase/sybase/SYBASE.cfg' does not exist. SQL Server creates the default file with the default configuration.

  00:2001/01/08 09:41:28.19 kernel os_create_region: can't allocate 11665408 bytes

  00:2001/01/08 09:41:28.19 kernel kbcreate: couldn't create kernel region.

  00:2001/01/08 09:41:28.19 kernel kistartup: could not create shared memory

  很明显:现在的内核无法分配启动SQL服务器所需的足够内存,所以要对核心参数进行调整。

  调整FreeBSD核心参数的过程
  # cd /usr/src/sys/i386/config

  # vi MyKernel (我的核心名为MyKernel,你应该编辑GENERIC这个文件)

  在文件中加入如下内容:

  options SHMMAXPGS=200000

  options SHMMNI=100

  options SHMSEG=10

  options SEMMNS=200

  options SEMMNI=70

  options SEMMSL=61

  存盘退出

  # /usr/sbin/config MyKernel

  #cd ../../compile/MyKernel

  # make depend

  #make

  #make install

  OK,至此完成核心的编译与安装。

  重新启动机器,如果你编译的核心不能显示正确的提示,请键入命令:

  kernel.old

  系统将以老的核心再启动你的FreeBSD系统。

二、安装Linux支持环境
  Sybase在FreeBSD下的运行实际上是依赖于FreeBSD对Linux的仿真实现的,如同以前在Linux运行SCO环境下的Oracle一样。所以首先要为FreeBSD安装一个Linux仿真环境。

  下面开始安装Linux_base软件包

 软件包可以在FreeBSD安装光盘上找到:

  # mount -t iso9660 /dev/acd0c /cdrom

  # cd /cdrom/packages

  # cd linux_base

  #pkg_add linux_base6.1.tgz

  由于要安装很多软件包,所以要花10分钟左右的时间。如果你没有安装光盘,还可以直接通过port安装Linux支持环境。

  方法如下:

  以root身份登录:

  # cd /usr/port/emulators

  # cd linux_base

  #make install

  安装程序将自动从网络上下载所需软件,校验软件包,并最终完成安装。

  这种安装方式,要求你的电脑能通过拨号上网或FreeBSD主机所在LAN上有路由器或网关可以连接到Internet上。

  以root登录,加载Linux核心模块,也即启动Linux支持

  # linux 或

  # kldload linux

  查看核心模块,以确保已成功加载Linux核心模块:

  #kldstat

  显示:

  Id Refs Address Size Name

   1 2 0xc0100000 1b1c60 kernel

   2 1 0xc0a9c000 10000 linux.ko

  第2行显示的结果表示已成功完成加载。

  至此准备工作完成,以下开始正式安装。

三、下载软件及解压
  到Sybase的站点下载最新的sybase-ase-11.0.3.3更新包。Sybase对这一版本进行了多次改进,目前推出了专为FreeBSD准备的一个软件包,其中包括以下三个文件:

  sybase-ase-11_0_3_3-FreeBSD-6_i386.tgz

  sybase-doc-11_0_3_3-FreeBSD-6_i386.tgz

  sybase-ocsd-10_0_4-FreeBSD-6_i386.tgz

  可以看出这已是该版本的第6次更新了。

  以root登录FreeBSD主机,增加用户sybase
  #adduser

  根据提示增加一个Sybase用户,同时增加一个Sybase组用户。

  将下载的软件包拷贝到/opt/sybase目录中

  # cd Sybase

  以sybase用户登录,解压以上三个压缩文件:

  $ gunzip -c Sybase-ase-11_0_3_3-FreeBSD-6_i386.tgz|tar vxpf -

  $ gunzip -c Sybase-doc-11_0_3_3-FreeBSD-6_i386.tgz|tar vxpf -

  $ gunzip -c Sybase-oscd-10_0_4-FreeBSD-6_i386.tgz|tar vxpf -

  解压完成,以下开始配置SQL服务器。

  配置数据库服务器
  以sybase用户登录FreeBSD主机

  $ cd Sybase

  $ cd install

  $ ./sysinit

  屏幕显示以下画面选单项:

  SYBINIT

  1. Release directory: /opt/sybase

  2. Edit / View Interfaces File

  3. Configure a Server product

  4. Configure an Open Client/Server product

  Ctrl-a Accept and Continue, Ctrl-x Exit Screen, ? Help.

  Enter the number of your choice and press return:3

  选择3后:出现以下提示:

  CONFIGURE SERVER PRODUCTS

  Products:

  Product Date Installed Date Configured

  1. SQL Server Mar 22 2000 21:22

  2. Backup Server Mar 22 2000 21:22

  Ctrl-a Accept and Continue, Ctrl-x Exit Screen, ? Help.

  Enter the number of your choice and press return: 1

  选择1后,出现以下提示:

  EXISTING SYBASE SERVER

  1. Configure a new Adaptive Server

  2. Configure an existing Sybase Server

  3. Upgrade an existing Sybase Server

  Ctrl-a Accept and Continue, Ctrl-x Exit Screen, ? Help.

  Enter the number of your choice and press return: 1

  再选择1

  ADD NEW ADAPTIVE SERVER

  1. Adaptive Server name: SYBASE

  Ctrl-a Accept and Continue, Ctrl-x Exit Screen, ? Help.

  Enter the number of your choice and press return: 1

  如果你要更改adaptive Server 的名称,选择1,键入你想用的名称,完成后使用Ctrl-a接受目前配置,出现以下提示,开始对服务器进行具体配置。

  SYBASE SERVER CONFIGURATION

  1. CONFIGURE SERVER'S INTERFACES FILE ENTRY Incomplete

  2. MASTER DEVICE CONFIGURATION Incomplete

  3. SYBSYSTEMPROCS DATABASE CONFIGURATION Incomplete

  4. SET ERRORLOG LOCATION Incomplete

  5. CONFIGURE DEFAULT BACKUP SERVER Incomplete

  6. CONFIGURE LANGUAGES Incomplete

  7. CONFIGURE CHARACTER SETS Incomplete

  8. CONFIGURE SORT ORDER Incomplete

  9. CONFIGURE AUDITING Incomplete

  Ctrl-a Accept and Continue, Ctrl-x Exit Screen, ? Help.

  Enter the number of your choice and press return:

  可以选择1~9各项,对以上9项内容进行配置。

  例如,选择第1项,配置完成后显示如下:

  SERVER INTERFACES FILE ENTRY SCREEN

  Server name: SYBASE

  1. Retry Count: 0

  2. Retry Delay: 0

  3. Add a new listener service

  Modify or delete a service

  Listener services available:

  Protocol Address Port Name Alias

  4. tcp freebsd 7100 syb1103

  Ctrl-a Accept and Continue, Ctrl-x Exit Screen, ? Help.

  Enter the number of your choice and press return:

  配置完全部1~9项后,结果如下:

  SYBASE SERVER CONFIGURATION

  1. CONFIGURE SERVER'S INTERFACES FILE ENTRY Complete

  2. MASTER DEVICE CONFIGURATION Complete

  3. SYBSYSTEMPROCS DATABASE CONFIGURATION Complete

  4. SET ERRORLOG LOCATION Complete

  5. CONFIGURE DEFAULT BACKUP SERVER Complete

  6. CONFIGURE LANGUAGES Complete

  7. CONFIGURE CHARACTER SETS Complete

  8. CONFIGURE SORT ORDER Complete

  9. CONFIGURE AUDITING Complete

  Ctrl-a Accept and Continue, Ctrl-x Exit Screen, ? Help.

  Enter the number of your choice and press return:

  选择ctrl-a之后,出现以下警告:

  WARNING: '/home/sybase/master.dat' is a regular file which is not recommended for a Server device.

  Press <return> to continue.

  这是因为我们正在使用的数据库文件不是直接放置在raw设备上,而是使用了操作系统屏蔽下的文件系统,没有关系,直接回车即可。接着程序生成设备、数据库文件等,整个过程要2~3分钟。最后程序提示“configuration completed successfully”,SQL Server的配置完成。

  据说,在Sybase-11.0.3.3中加入了对raw设备的支持,有兴趣的朋友可以自己试试看。至此,服务器配置完成。

  配置备份服务器
  SQL Server配置好后,连按Ctrl-a进入如下选单画面:

  SYBINIT

  1. Release directory: /opt/sybase

  2. Edit / View Interfaces File

  3. Configure a Server product

  4. Configure an Open Client/Server product

  此时,选择2配置BACKUP Server,配置过程如下:

  选择要配置的服务器名(SYB_BACKUP),输入相应的主机名称、TCP端口号、别名等如下所示:

  SERVER INTERFACES FILE ENTRY SCREEN

  Server name: SYB_BACKUP

  1. Retry Count: 0

  2. Retry Delay: 0

  3. Add a new listener service

  Modify or delete a service

  Listener services available:

  Protocol Address Port Name Alias

  4. tcp freebsd 8000 SYB_BACKUP_Alias

  Ctrl-a Accept and Continue, Ctrl-x Exit Screen, ? Help.

  Enter the number of your choice and press return:

  本例中,笔者用了端口号8000,别名为:SYB_BACKUP_Alias(容易记)。之后按Ctrl-a确认。

  然后,配置BACKUP Server的日志文件位置、语言、字符集等,如下所示:

  Enter the number of your choice and press return:

  BACKUP SERVER CONFIGURATION

  1. Backup Server errorlog: /opt/sybase/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

  5. Backup Server tape configuration file: /opt/sybase/sybase/backup_tape.cfg

  Ctrl-a Accept and Continue, Ctrl-x Exit Screen, ? Help.

  Enter the number of your choice and press return:

  按Ctrl-a确认完成配置,之后安装程序会保存配置,并试图启动BACKUP Server。

  至此,备份服务器配置完成。

四、使用数据库
  启动数据库服务

  $ ./startserver -f ./RUN_SYBASE

  $./startserver -f ./RUN_SYB_SYBASE

  关闭数据库服务

  如果要停止服务器,则输入:

  $ isql -Usa -P

  1> shutdown SYB_BACKUP

  2> go

  Backup Server: 3.48.1.1: The Backup Server will go down immediately.

  Terminating sessions.

  输入以下,关闭数据库服务器:

  1> shutdown

  2> go

  使用isql

  $ isql -Usa -P

  >select @@version


打印
上一篇:ORACLE8.1.7+TOMCAT3.2.1安装手册 下一篇:RedHat7.0下安装Oracle的经历 

版权申明:
  本站属于54stu个人网站,大部分文章来自网络搜集,大家可以自由转载本站的文章,但原作者和来自我站的链接必须保留。文章版权归原作者所有。
  五四电脑技术资讯网(54stu.com)依法保护知识产权,如果我们的文章有涉及或侵犯您的有关权益,请即时与我们联系,注明网址及文章,我们会即时处理或删除,感谢您的合作!

站点最新

·06月22日值得注意病毒列表
·Work 2.0时代,服务决定一切
·06月21日值得注意病毒列表
·紫光华宇拼音输入法5.0版正式发布
·微软即付即用计划:无奈还是阴谋
·期盼:微软正在开发Windows XP S
·9991阴魂不散!多多QQ表情病毒奥
·隐藏文档索财 国内截获首例敲诈病
·没有防火墙的安全 是明智还是愚蠢
·SoBus公交搜宝让您成为公交通(上
·SoBus公交搜宝让您成为公交通(下
·既然有妙笔,干嘛你不来?——纽
·病毒伪装成世界杯球票 已出现多个
·让P2P穿透防火墙:微软再推两新服
·中望CAD2006发布会在广州成功举行
·笔记本的噩耗:Vista将是电量杀手
·江苏省软件产品检测中心对浩辰IC
·腾讯将于6月15日推出QQ会员等级体
·可标记文章已读:IE7 Beta3八月推
·电脑病毒“班沃母”现身为世界杯
·全球最大BT网站即将重新开张!
·微软杀毒新贵Live OneCare正式发
·全球最大BT下载网站遭警方突袭
·病毒借达芬奇密码作乱 教您如何防
·找客户--为您找到新客户,开拓新财
·腾讯公司关于“QQ密码修改方式”
·专业助手!Excel 2007 beta 2 试用
·专业助手!Excel 2007 beta 2 试用
·木马防线2005+试用暨木马防御技巧
·Asianux 2.0 SP1即将发布 将支持

站点推荐

Adobe Premiere 6.0认证考试大纲
网络工程师专业术语大集合之路由

支持我们
 
五四娱乐网--新五四,新娱乐!-WwW.54stu.com 用心生活-娱乐万家(本站法律顾问:陈律师)
五四娱乐网版权所有 All Rights Reserved 蜀ICP备05025894号  投诉QQ:3458124