天天看點

sybase-ase1252_de_linux install on as4u5

<b></b>

<b>Sybase install on AS4 U5</b>

一、安裝前準備

1.         軟體準備

官方網站注冊并下載下傳開發版

sybase:服務端ase1252_de_linux和用戶端pcclient_1252  OS:RedHat AS4 U5 

Tools:Xmanager3.0企業版

2.         設定共享記憶體

1)        顯示共享記憶體

# /sbin/sysctl kernel.shmmax

2)        設定共享記憶體

# /sbin/sysctl -w kernel.shmmax=67108864(64*1024*1024,臨時生效,如果不加人/etc/rc.d/rc.local)

3)        /etc/rc.d/rc.local

為了保證每次重新啟動系統都生效,修改如下,編輯/etc/rc.d/rc.local (/etc/init.d/boot.local onSuSE)末尾加入,保證每次系統重新啟動共享記憶體都是這個數值。

[root@AS4-test cdrom]$ vi /etc/rc.d/rc.local

#!/bin/sh

# This script will be executed *after* all the other init scripts.

# You can put your own initialization stuff in here if you don't

# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

sysctl -w kernel.shmmax=67108864

3.         添加sybase使用者和軟體目錄

1)        建立使用者

[root@AS4-test ~]# useradd sysbase

[root@AS4-test ~]# passwd sybase

Changing password for user sybase.

New UNIX password:

BAD PASSWORD: it is too simplistic/systematic

Retype new UNIX password:

passwd: all authentication tokens updated successfully.

2)        建立目錄

[root@AS4-test ~]# mkdir /opt/sybase-12.5

[root@AS4-test ~]# chown –R sybase.sybase /opt/sybase-12.5/

[root@AS4-test ~]# cd /opt

[root@AS4-test opt]# ll

total 8

drwxr-xr-x  34 informix informix 4096 Dec 29 11:58 informix

drwxr-xr-x   2 sybase   sybase   4096 Jan  8 06:27 sybase-12.5

3)        安裝包目錄設定

還要保證sybase使用者對安裝包所在的目錄擁有所有權

[sybase@AS4-test home]$ ll

total 294532

drwx------  3 Andy     Andy          4096 Dec 29 09:11 Andy

drwxrwxrwx  5 sybase   sybase        4096 Jan  8 05:36 cdrom

-rw-r--r--  1 root     root     301281280 Dec 29 09:49 iif.11.50.UC3DE.Linux-RHEL4.tar

drwx------  5 informix informix      4096 Dec 30 09:50 informix

drwx------  4 sybase   sybase        4096 Jan  8 06:46 sybase

drwx------  3 sysbase  sysbase       4096 Jan  8 06:47 sysbase

[sybase@AS4-test ~]$ cd /home/cdrom/

 [sybase@AS4-test cdrom]$ ll

total 380444

drwxrwxrwx  2 sybase sybase      4096 Jul  7  2004 archives

-rw-r--r--  1 sybase sybase 388514438 Jan  8 05:22 ase1252_de_linux.tgz

drwxrwxrwx  5 sybase sybase      4096 Jan  8 05:56 JVM

-rwxrwxrwx  1 sybase sybase        12 Jul  7  2004 media.inf

-rwxrwxrwx  1 sybase sybase    649647 Jul  7  2004 setup

drwxrwxrwx  5 sybase sybase      4096 Jul  7  2004 suite

[sybase@AS4-test cdrom]$

二、執行安裝任務

安裝分成圖形界面 和console兩種方式

1.         圖形安裝方式

首先作業系統要啟用圖形界面服務

1)        設定顯示變量

[root@AS4-test opt]# xhost(空格)+

access control disabled, clients can connect from any host

[root@AS4-test opt]# su – sybase(切換到sybase使用者)

[sybase@AS4-test ~]$ export DISPLAY=10.8.1.238:0.0

驗證DISPLAY變量設定是否生效

[sybase@AS4-test ~]$ env

HOSTNAME=AS4-test

SHELL=/bin/bash

TERM=xterm

HISTSIZE=1000

QTDIR=/usr/lib/qt-3.3

USER=sybase

LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:

KDEDIR=/usr

MAIL=/var/spool/mail/sybase

PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/sybase/bin

INPUTRC=/etc/inputrc

PWD=/home/sybase

LANG=en_US.UTF-8

SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass

SHLVL=1

HOME=/home/sybase

LOGNAME=sybase

LESSOPEN=|/usr/bin/lesspipe.sh %s

DISPLAY=10.8.1.238:0.0

G_BROKEN_FILENAMES=1

_=/bin/env

2)        轉到安裝目錄/home/cdrom/,執行setup

[sybase@AS4-test ~]$ cd /home/cdrom/

[sybase@AS4-test cdrom]$ ls

archives  ase1252_de_linux.tgz  JVM  media.inf  setup  suite

[sybase@AS4-test cdrom]./ setup

2.         Console 安裝方式(主要以此方式為主)

1)        選擇“1”(繼續)

[sybase@AS4-test cdrom]$ ./setup -console

InstallShield Wizard

Initializing InstallShield Wizard...

Searching for Java(tm) Virtual Machine...

........

Running 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

2)        選擇安裝地區“36”(其它地區)

 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] 36

3)        閱讀并接受許可協定

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

4)        輸入“q”

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 [url]www.sybase.com/softwarelicenses[/url] and read it there

before agreeing.

5)        同意協定,輸入“y”

I agree to the terms of the Sybase license for the install location

specified.(Y/N) [N]y

6)        輸入“1”

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

7)        輸入安裝目錄 /opt/sybase-12.5

Destination Directory [/opt/sybase] /opt/sybase-12.5

8)        輸入“1”

9)        選擇安裝方式“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] 回車

(0代表安裝方式選擇完畢,保持預設選擇)

<b>注意</b>:選擇其它安裝方式,輸入相應數字(1,2,3),如選擇2

To select an item enter its number, or 0 when you are finished: [0] 2

[ ] 1 - Typical

        Recommended for most users.                                                                             [X] 2 - Full

                                                                                 [ ] 3 - Custom

To select an item enter its number, or 0 when you are finished: [0]回車(選擇完畢後回車)

10)     進入下一個步驟,輸入“1”

Performing install checks. Please wait...

Please wait...

Sybase Adaptive Server Enterprise Suite will be installed in the following

location:

/opt/sybase-12.5

with the following features:

Sybase Servers

   Adaptive Server Enterprise

      ASE Diagnostic Server

   Replicator

   SQL Remote for ASE

Connectivity

   Open Client

      Common ctlib files

      Common dblib files

ASE Data Providers

Language Modules

jConnect 5.5 for JDBC

jConnect 6.0 for JDBC

11)     輸入“回車”

Press ENTER to read the text [Type q to quit] 回車

Shared

ASE Adminstration Tools

   Sybase Central

   Adaptive Server Plugin

   Job Scheduler Templates and Utilities

Sybase Software Asset Management

for a total size:

 577.5 MB

12)     輸入“1”

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%

||||||||||||||||||||||||||||||||||||||||||||||||||

Creating uninstaller...

The InstallShield Wizard has successfully installed Sybase Adaptive Server

Enterprise Suite. Choose Next to continue the wizard.

13)     輸入“1”

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

The Adaptive Server Enterprise product contains a number of programs in

addition to the Adaptive Server Enterprise database server. At this point in

the installation you can choose to create a new Adaptive Server Enterprise

server installation and to configure Backup Server, XP Server, and Monitor

Server components. If you select the options on this screen, you will be given

the option of specifying configuration options for each server or to allow the

installer to set default values for these on the next screen. If you do not

choose to configure the servers at this time, you can configure them using the

ASE configuration utility at a later time.

Configure New Servers

Please deselect any servers that you do not want to configure now :

 [X]  1  -  Configure new Adaptive Server

 [X]  2  -  Configure new Backup Server  

 [X]  3  -  Configure new Monitor Server 

 [X]  4  -  Configure new XP Server      

14)        輸入“0”

To select an item enter its number, or 0 when you are finished [0]:0

You have chosen to configure the servers listed below. You can accept default

configuration values or provide customized values for the configuration options

required by each server. If you do not select custom configuration below, this

installer will configure the servers you have selected with default values. If

you accept default values at this time you can change the configuration values

for a server at a later time.

Custom Configure New Servers

Please select the servers that you want to custom configure.

 [ ]  1  -  Custom configure new Adaptive Server

 [ ]  2  -  Custom configure new Backup Server  

 [ ]  3  -  Custom configure new Monitor Server 

 [ ]  4  -  Custom configure new XP Server      

To select an item enter its number, or 0 when you are finished [0]: 1

 [X]  1  -  Custom configure new Adaptive Server

To select an item enter its number, or 0 when you are finished [0]: 0

到此基本安裝完成,建立了一個Custom configure new Adaptive Server

三、資料庫管理

1.         資料庫變量設定

将/opt/sybase-12.5/ 目錄下的SYBASE.sh檔案内容複制到/home/sybase目錄下的bash_profile

# .bash_profile

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

        . ~/.bashrc

fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

unset USERNAME

以上為檔案原有

#!/bin/sh(注釋掉)

SYBASE_ASE="ASE-12_5"

export SYBASE_ASE

LD_LIBRARY_PATH="/opt/sybase-12.5/ASE-12_5/lib":$LD_LIBRARY_PATH

export LD_LIBRARY_PATH

PATH="/opt/sybase-12.5/JS-12_5/bin":$PATH

SYBASE_FTS="EFTS-12_5_2"

export SYBASE_FTS

PATH="/opt/sybase-12.5/\$SYBASE_FTS/bin":$PATH

PATH="/opt/sybase-12.5/RPL-12_5/bin":$PATH

LD_LIBRARY_PATH="/opt/sybase-12.5/SQLRemote/lib":$LD_LIBRARY_PATH

SYBASE_WS="WS-12_5"

export SYBASE_WS

SYBASE="/opt/sybase-12.5"

export SYBASE

SYBASE_OCS="OCS-12_5"

export SYBASE_OCS

PATH="/opt/sybase-12.5/OCS-12_5/bin":$PATH

LD_LIBRARY_PATH="/opt/sybase-12.5/OCS-12_5/lib:/opt/sybase-12.5/OCS-12_5/lib3p":$LD_LIBRARY_PATH

LD_LIBRARY_PATH="/opt/sybase-12.5/ODBC-12_5/lib":$LD_LIBRARY_PATH

SYBASE_SYSAM="SYSAM-1_0"

export SYBASE_SYSAM

LM_LICENSE_FILE="/opt/sybase-12.5/SYSAM-1_0/licenses/license.dat"

export LM_LICENSE_FILE

~

2.         啟動資料庫伺服器

[sybase@localhost ~]$startserver

[sybase@SybaseServer ~]$ RUN_LOCALHOST(LOCALHOST為資料庫伺服器名稱)

3.         顯示資料庫

[sybase@localhost bin]$ showserver

F S UID        PID  PPID  C PRI  NI ADDR SZ WCHAN  STIME TTY          TIME CMD

0 S sybase   18306 18305  0  76   0 - 17277 -      12:50 pts/1    00:00:00 /opt/sybase-12.5/ASE-12_5/bin/monserver -SLOCALHOST -Usa -P -l/opt/sybase-12.5/ASE-12_5/install/LOCALHOST_MS.log -L/opt/sybase-12.5/ASE-12_5/LOCALHOST_MS.cfg -m/opt/sybase-12.5/ASE-12_5 -MLOCALHOST_MS

0 S sybase   18295 18294  0  77   0 -  2215 -      12:50 pts/1    00:00:00 /opt/sybase-12.5/ASE-12_5/bin/backupserver -e/opt/sybase-12.5/ASE-12_5/install/LOCALHOST_BS.log -N25 -C20 -M/opt/sybase-12.5/ASE-12_5/bin/sybmultbuf -SLOCALHOST_BS

0 S sybase   18283 18282  0  75   0 - 24434 -      12:49 ?        00:00:14 /opt/sybase-12.5/ASE-12_5/bin/dataserver -sLOCALHOST -d/opt/sybase-12.5/data/master.dat -e/opt/sybase-12.5/ASE-12_5/install/LOCALHOST.log -c/opt/sybase-12.5/ASE-12_5/LOCALHOST.cfg -M/opt/sybase-12.5/ASE-12_5

4.         登入資料庫

[sybase@localhost bin]$ isql -SLOCALHOST -Usa -P

Msg 2401, Level 11, State 2:

Server 'LOCALHOST':

Character set conversion is not available between client character set 'utf8'

and server character set 'iso_1'.

No conversions will be done.

1&gt;

注意:

安裝後預設,使用者名:sa密碼:空 伺服器名稱:LOCALHOST

5.         停止資料庫伺服器

[sybase@SybaseServer ~]$ isql -Usa -SLOCALHOST -P

1&gt; shutdown with nowait

2&gt; go

Server SHUTDOWN by request.

The SQL Server is terminating this process.

CT-LIBRARY error:

       ct_results(): network packet layer: internal net library error: Net-Library operation terminated due to disconnect

[sybase@SybaseServer ~]$ showserver

[sybase@SybaseServer ~]$

四、用戶端連接配接

1.         安裝用戶端

安裝pcclient_1252的setupconsole程式元件

在winxp中地區選擇中華人民共和國

Full(完全方式)安裝

2.      建立連接配接

指定sybase資料庫的IP:端口方式使用sa使用者連接配接,第一次連接配接密碼為空

單擊ok

本文轉自 pgmia 51CTO部落格,原文連結:http://blog.51cto.com/heyiyi/125714

上一篇: Unicode Tips