一步一步安装sybase(suse10 x64环境) 之二

2014/11/13 10:07
阅读数 417

本篇主要介绍sybase15(x64)在suse10上的安装,以及依赖的jdk环境的安装和配置。

这里说明一下我们要安装的sybase版本是15   而且是64位的,搜了下很少资料,这也是这系列文章产生的主要原因。

 

JDK的安装

 

你如果suse10是像我一样默认安装,那么一定会遇到这个错误!

A suitable JVM could not be found. Please run the program again using the option -is:javahome <JAVA HOME DIR>

 

乖乖翻出你的suse10安装盘找出下面这2个rpm包把

jpackage-utils-1.6.3-18.8.41.x86_64.rpm

java-1_4_2-ibm-1.4.2_sr13-0.7.1.x86_64.rpm

然后再乖乖的按次序装好它们!

DevServer-9:/media/SUSE-Linux-Enterprise-Server_001/suse/x86_64 # rpm -ivh jpackage-utils-1.6.3-18.8.41.x86_64.rpm
Preparing...                ########################################### [100%]
   1:jpackage-utils         ########################################### [100%]
DevServer-9:/media/SUSE-Linux-Enterprise-Server_001/suse/x86_64 # rpm -ivh java-1_4_2-ibm-1.4.2_sr13-0.7.1.x86_64.rpm
Preparing...                ########################################### [100%]
   1:java-1_4_2-ibm         ########################################### [100%]

 

配置sybase用户、组

# groupadd -g 1000 sybase

# usermod -g sybase -G disk sybase

# passwd sybase

然后把sybase安装文件全部搬上来,确保安装文件属主都是我们刚建立的这个sybase用户!

这里我放到/home/sybase/sybsetup目录下面。

下面操作都用sybase用户咯。

sybase@DevServer-9: cd /home/sybase/sybsetup

sybase@DevServer-9: chmod +x setup

最后改下sybase的.profile

sybase@DevServer-9: vi .profile

加一下export LANG=en_US

保存后重新用sybase用户登录

su – sybase

 

下面用root登录来把前一篇建立的逻辑卷都改给sybase用户

#chown sybase:sybase  /dev/raw/raw1*

然后用sybase用户登录做一下实验看看是否成功:

sybase@DevServer-9: dd if=/dev/raw/raw11 of=/tmp/foo bs=4096 count=8

看到类似内容说明成功:

\8+0 records in
8+0 records out
32768 bytes (33 kB) copied, 0.007031 seconds, 4.7 MB/s

 

安装sybase for linux

 

下面大段的屏幕输出基本都忽略了,操作时候注意哦。

sybase@DevServer-9: cd /home/sybase/sybsetup

sybase@DevServer-9: ./setup –console

向导初始化什么什么………………

Press 1 for Next, 3 to Cancel or 4 to Redisplay [1]    (不管  默认1 next)

地区列表,一堆堆………

Please enter the number of the location you are installing. (1-37) [1] 24  (选24 就是咱郭嘉)

用户协议一大坨…………………

Press ENTER to read the text [Type q to quit] q (按q不看下一页了,你要爱看你继续)

又是一堆协议相关……

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 enter the directory where you would like to install the products or
press ENTER to accept the default.

   Destination Directory [ERROR: ServiceException: (error code = 305; severity
   = 0)]/home/sybase (这里输入要安装应用的目录)

Do you want to continue with installation into this directory? [2] 1 (1是yes 2是no)

-------------------------------------------------------------------------------
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] 2(选择full吧 全装少烦恼)

To select an item enter its number, or 0 when you are finished: [0](选完直接就继续)

-------------------------------------------------------------------------------
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
      ASE Agent Plugin
      ASE SNMP Agent Plugin
   ASE Web Services
   Job Scheduler
Connectivity
   Open Client
      Common ctlib files
      Common dblib files
   Embedded SQL/C
   Monitor Client Library

Press ENTER to read the text [Type q to quit] (确认下要安装的部件)

 

Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1] 1  (next后开始装)

Installing Sybase Adaptive Server Enterprise Suite. Please wait...

|-----------|-----------|-----------|------------|
0%         25%         50%         75%        100%
|||||||||||||||||||||||

装完后会问你licenses的事 ,自己看着办吧………………

接下来要配置那些服务,我们只配1和2,其他都点掉吧:

  [X]  1  -  Configure new Adaptive Server
  [X]  2  -  Configure new Backup Server
  [ ]  3  -  Configure new Monitor Server
  [ ]  4  -  Configure new XP Server
  [ ]  5  -  Configure new Job Scheduler
  [ ]  6  -  Enable Self Management
  [ ]  7  -  Configure Web Services
  [ ]  8  -  Configure Unified Agent

     To select an item enter its number, or 0 when you are finished: [0]  (直接next)

next之后会再给你确认一下:

   [X]  1  -  Custom configure new Adaptive Server
   [X]  2  -  Custom configure new Backup Server

      To select an item enter its number, or 0 when you are finished: [0](2个都叉上后next)

下面配置如下图,悲剧的忘记了15新增了一个sybsysdb.dat,就默认吧!

-------------------------------------------------------------------------------
Please enter custom configuration values for the new Adaptive Server

   Adaptive Server Name [DEVSERVER9] SYBASE9
   Port Number [5000]
   Error Log [/home/sybase/ASE-15_0/install/SYBASE9.log]
   Page Size

      1. 2k
      2. 4k
      3. 8k
      4. 16k

   Select a page size :  [1] 3
   Master Device [/home/sybase/data/master.dat] /dev/raw/raw11
   Master Device Size (MB) [120] 256
   Master Database Size (MB) [52] 120
   System Procedure Device [/home/sybase/data/sysprocs.dat] /dev/raw/raw12
   System Procedure Device Size (MB) [132] 512
   System Procedure Database Size (MB) [132] 510
   System Device [/home/sybase/data/sybsysdb.dat]
   System Device Size (MB) [2]
   System Database Size (MB) [2]

   Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1] 1

-------------------------------------------------------------------------------

Please enter custom configuration values for the new Backup Server

   Backup Server Name [SYBASE9_BS]
   Port Number [5001]
   Error Log [/home/sybase/ASE-15_0/install/SYBASE9_BS.log]

   Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]

再一路next会收到一个/home/sybase/ASE-15_0/bin/srvbuildres: cannot execute错误,没关系,错误是多了点,咱能解决!为什么会错误呢?

sybase@DevServer-9:~> cd ASE-15_0/bin/
sybase@DevServer-9:~/ASE-15_0/bin> ./srvbuildres -r ../sqlsrv.res

The SYBASE_ASE environment variable is not set.

这里的srvbuildres是根据res文件创建,res文件就是保存的咱刚配置的信息。可以vi看一下。  手工去执行一下发现提示是环境变量没有。至于这个环境变量呢是安装sybase才给提供到一个文件里,晕了晕了~~~

加一行到sybase的.profile里:

. SYBASE.sh

注意点和空格!!!!!,然后再来可以了.

sybase@DevServer-9:~/ASE-15_0/bin> ./srvbuildres -r ../sqlsrv.res
Warning: Unable to verify /dev/raw/raw11 device size.  Please verify that this
device is not already in use and that it has sufficient space available. 
Warning: Unable to verify /dev/raw/raw12 device size.  Please verify that this
device is not already in use and that it has sufficient space available. 
Building Adaptive Server 'SYBASE9':
Writing entry into directory services...
Directory services entry complete.
Building master device...
Master device complete.
Writing RUN_SYBASE9 file...
RUN_SYBASE9 file complete.
Starting server...
Server started.
Building sysprocs device and sybsystemprocs database...
sybprocs device and sybsystemprocs database created.
Running installmaster script to install system stored procedures...
installmaster: 10% complete.
installmaster: 20% complete.
installmaster: 30% complete.
installmaster: 40% complete.
installmaster: 50% complete.
installmaster: 60% complete.
installmaster: 70% complete.
installmaster: 80% complete.
installmaster: 90% complete.
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...
Server name added.
Server 'SYBASE9' was successfully created.

至此sybase数据库服务算是完成了~!

下面是backserver,这个backserver如果没有的话就不能用dump的方式来备份和恢复!

sybase@DevServer-9:~/ASE-15_0/bin> ./srvbuildres -r ../bsrv.res

如果你的glibc的版本是2.4以上,可能会遇到一个错误:

line 15:  4168 Segmentation fault

具体的解决办法是去sybase用户的环境变量里加上:export LD_POINTER_GUARD=1(或者=0,具体机器不一样)

 

最终我们sybase的.profile内容如下:

 

export LANG=en_US
export LD_POINTER_GUARD=1
. SYBASE.sh

这时候我们可以到ASE-15_0/install目录下面通过下面2个命令来启动:

./startserver –f RUN_SYBASE

./startserver –f RUN_SYBASE_BS

展开阅读全文
打赏
0
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部