CentOS4.8 install SybaseASE15.0.3

Source: Internet
Author: User
CentOS4.8 install SybaseASE15.0.3

Install Sybase ASE 15.0.3 in CentOS 4.8

I. Preparations before installation
Log On As root and create sybase users, user groups (useradd, groupadd), and installation directory/opt/sybase
# Mkdir/opt/sybase
# Id sybase
# Useradd sybase
# Passwd sybase

Default Value of memory shared by the operating system. For most Linux versions, the value is 32 MB, and the minimum value of Adaptive Server is 64 MB. Check the available operating system size.
# Ipcs-lm | grep 'max seg size'
Max seg size (kbytes) = 32768
Select a new size for the OS Shared Memory parameter. For example, to change the shared memory to 512 MB, enter:
# Echo '2017*512*1024 '| bc>/proc/sys/kernel/shmmax
Verify whether the change takes effect:
# Ipcs-lm | grep 'max seg size'
Max seg size (kbytes) = 524288
To avoid this change after each restart, modify the/etc/sysctl. conf file and add kernel. shmmax = 536870912 memory (in bytes) to the last line)
# Echo kernel. shmmax = 536870912>/etc/sysctl. conf
# Sysctl-p

Checks resources occupied by processes.
# Pmap pid
The database software must use the libaio package. RedHat as4 is not installed by default.
# Rpm-qa | grep libaio
# Rpm-ivh libaio -*

Ii. Install Sybase
Enter the installation directory. For sybase installation, the root user needs to execute xhost +
#./Setup
Note: During the graphical installation process, select "Installation Method" to complete the installation, and do not configure the server after the installation is complete. After the installation is complete, manually configure the server.

Copy/opt/sybase/SYBASE. sh to/etc/profile. d, so that all users can share the sybase environment variables.
# Cp SYBASE. sh/etc/profiled. d/
# Chmod + x/etc/profiled. d/SYBASE. sh
#./Etc/profiled. d/SYBASE. sh
Check whether it is successful
# Set | grep/opt/
SYBASE =/opt/sybase
SYBASE_JRE6 =/opt/sybase/shared/JRE-6_0_6_32BIT
SYBASE_JRE6_32 =/opt/sybase/shared/JRE-6_0_6_32BIT
SYBASE_UA =/opt/sybase/UAF-2_0
SYBROOT =/opt/sybase

Note: The shutdown command of sybase conflicts with the command of the operating system. The root user needs to execute the system shutdown command in the/sbin directory.

Run the script srvbuild. adaptive_server.rs and srvbuild. backup_server.rs to configure the database server and backup server.
Run the script sqllocres. sqlloc. rs to modify the character encoding to cp936.

Note:
1. You must modify the actual IP address of the network_hostname_list item in the script before execution. For other configurations, see
2. Convert the encoding format before execution:
# Dos2unix *. rs
Execute scripts
Create an Adaptive Server
# Srvbuildres-r srvbuildres. adaptive_server.rs
Create Backup Server
# Srvbuildres-r srvbuildres. backup_server.rs
Modify Character Set
# Sqllocres-r sqllocres. sqlloc. rs

Other methods for modifying character sets:
Run asecfg on the terminal to set the language, characters, and sorting (the root user needs to execute xhost + ):
Select Localize Adaptive Server (you can also run $ SYBASE/bin/sqlloc directly) and select the Adaptive Server Name
Select Us English as the installation language,
The character set is Code Page 936,
The sorting method is Binary ordering, for cp936

Check whether sybase is started. The dataserver and backupserver processes are displayed.
# Ps-ef | grep sybase

3. Create a script file sybase to manage server processes. This script is only used in Redhat Linux

#! /Bin/sh

# Source function library.
./Etc/rc. d/init. d/functions

SYBASE =/opt/sybase

If [-n "$ {SYBASE}"-a-d "$ {SYBASE}"]; then

SYBASE_ASE = 'basename $ SYBASE/ASE-15_0'
SYBASE_OCS = 'basename $ SYBASE/OCS-15_0'
PATH = "$ {SYBASE}/$ {SYBASE_ASE}/bin :$ {SYBASE}/$ {SYBASE_OCS }:$ {SYBASE}/$ {SYBASE_ASE}/install: $ {PATH }"
Export SYBASE SYBASE_ASE SYBASE_OCS PATH

# See how we were called.
Case "$1" in
Start)
Echo-n "Starting Sybase ASE ..."
(Cd $ {SYBASE}/$ {SYBASE_ASE}/install ;\
Unset LANG; unset LC_ALL ;\

For run_server in RUN _ *; do \
Su-sybase-c "startserver-f $ {SYBASE}/$ {SYBASE_ASE}/install/$ {run_server}">/dev/null 2> & 1 ;\
Echo-n "$ {run_server }";\
Done)
Echo

Touch/var/lock/subsys/sybase
;;

Stop)
Echo-n "Shuting down Sybase ASE configured servers :"
Killproc dataserver
Killproc backupserver

# Add your own openserver applications.
Echo
;;

Status)
Showserver
;;

Restart)
$0 stop
$0 start
;;
*)
Echo "*** Usage: sybase {start | stop | status | restart }"
Exit 1
Esac

Fi

Exit 0

Copy sybase to/etc/init. d.
# Chkconfig sybase on
In this way, the connection file S85sybase in/etc/rc.3 and/etc/rc.5 will be started automatically when the system is started.

To enable automatic sybase Shutdown
# Ln-sf/etc/init. d/sybase/etc/rc0.d/K25sybase
Procedure
# Service sybase status
# Service sybase start
# Service sybase stop

Or execute Common Startup commands.
# Unset LANG
# Startserver-f/opt/sybase/ASE-15_0/install/RUN_PDCSS-f/opt/sybase/ASE-15_0/install/RUN_PDCSS_BS
Disable the server
# Isql-Usa-P-SPDCSS
> Shutdown SYB_BACKUP
> Go
> Shutdown with nowait

4. SYBASE registration (Development edition Server installation can be skipped)
Use sybase User Login
$/Opt/sybase/SYSAM-1_0/bin/startd. sh $ SYBASE/SYSAM-1_0
$ Cd/opt/sybase/SYSAM-1_0
$ Lmgr
Input:
Serial number, function name, function count, software version, authorization code
The authentication information provided in the Adaptive Server software package is printed in "Sybase Software Asset Management Certification. After entering all the licenses, click "finish "!
Check whether the software is running:
When the lmgrd daemon is started, it automatically starts the SYBASE daemon. Verify that the license management software is running on the system. Usage:
# $ SYBASE/SYSAM-1_0/bin/lmutil lmstat-c
Before continuing to install or start the Adaptive Server, check that lmgrd and SYBASE are running, that is, "up ".
Note: To ensure that the SySAM (Sybase Software Asset Manager) license mechanism is enabled at system startup
Add:/opt/sybase/SYSAM-1_0/bin/startd. sh/opt/sybase/SYSAM-1_0 to:/etc/rc. local

5. modify directory permissions:
Log on as a root user
Chown-R sybase: sybase/opt/sybase
Chmod 755-R/opt/sybase
Note: The following operations on the database use sybase users:

6. Set database character sets
Log On As a sybase user and start the server
Check whether the character set is cp936
# Isql-Usa-P-SPDCSS
> Sp_helpsort
If not, you need to manually set
# Charset-Usa-P-SPDCSS binary. srt cp936
# Isql-Usa-P-SPDCSS
> Select name, id from syscharsets where
> Sp_configure "default character set id", 171
Restart the server twice. The first startup will fail.
# Startserver-f/opt/sybase/ASE-15_0/install/RUN_PDCSS

Set/opt/sybase/locales. dat on the server
[Linux]
Locale = en_US, us_english, cp936
Locale = default, us_english, cp936

Set c: \ sybase \ locales. dat on the client.
[Linux] changing iso_1 to cp936 at the top and bottom lines can display Chinese characters on the client.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.