Home Database Mysql Tutorial CentOS 4.8 安装 Sybase ASE 15.0.3

CentOS 4.8 安装 Sybase ASE 15.0.3

Jun 07, 2016 pm 05:05 PM
centos sybase

CentOS 4.8 安装 Sybase ASE 15.0.3

一、安装前的准备工作
以 root 登录,,创建sybase用户、用户组(useradd,groupadd)和安装目录/opt/sybase
# mkdir /opt/sybase
# id sybase
# useradd sybase
# passwd sybase

操作系统共享内存缺省值,对于大多数 Linux 版本为 32MB,Adaptive Server 的最小要求为 64MB。检查可用的操作系统的大小。
# ipcs -lm | grep 'max seg size'
max seg size (kbytes) = 32768
为操作系统共享内存参数选择新的大小。例如,要将共享内存更改为 512MB,可以输入:
# echo '512 * 1024 * 1024'|bc > /proc/sys/kernel/shmmax
检验该更改是否生效:
# ipcs -lm | grep 'max seg size'
max seg size (kbytes) = 524288
若要避免每次重新启动后必须进行此更改,修改/etc/sysctl.conf文件,最后一行加入kernel.shmmax=536870912 内存数(以字节为单位)
# echo kernel.shmmax=536870912 >> /etc/sysctl.conf
# sysctl -p

检测进程占用资源的情况
# pmap pid
数据库软件需要使用libaio包,RedHat as4 默认没有安装
# rpm -qa | grep libaio
# rpm -ivh libaio-*

二、安装 Sybase
进入安装目录,sybase用户安装需要root用户执行 xhost +
# ./setup
注意,图形方式安装过程中“安装方式”选择完全安装,并且安装完成后不配置服务器,结束后手工配置。

把/opt/sybase/SYBASE.sh 拷贝到/etc/profile.d下,这样所有的用户就可以共用sybase的环境变量
# cp SYBASE.sh /etc/profiled.d/
# chmod +x /etc/profiled.d/SYBASE.sh
# . /etc/profiled.d/SYBASE.sh
检查是否成功
# 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

注意:sybase的 shutdown 命令与操作系统本身的命令冲突,root用户需要到/sbin目录下执行系统的关机命令

执行脚本 srvbuild.adaptive_server.rs 和 srvbuild.backup_server.rs 配置数据库服务器和备份服务器
执行脚本 sqllocres.sqlloc.rs 修改字符编码为cp936

注意:
1、执行前一定修改脚本中的“network_hostname_list”项的实际IP,其它配置可参考
2、执行前转化编码格式:
# dos2unix *.rs
执行脚本
创建 Adaptive Server
# srvbuildres -r srvbuildres.adaptive_server.rs
创建 Backup Server
# srvbuildres -r srvbuildres.backup_server.rs
修改字符集
# sqllocres -r sqllocres.sqlloc.rs

修改字符集的其它方法:
在终端运行asecfg 设置语言 、字符和排序(需要 root 用户执行 xhost +):
选择Localize Adaptive Server(也可以直接运行$SYBASE/bin/sqlloc),并选择Adaptive Server名称
选择安装语言为Us English,
字符集为Code Page 936,
排序方式为Binary ordering, for cp936

检查sybase是否启动,出现 dataserver 和 backupserver 两个进程
# ps -ef|grep sybase

三、创建脚本文件 sybase 管理服务器进程,该脚本仅用于 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

把sybase拷贝到/etc/init.d下
# chkconfig sybase on
这样就会在/etc/rc.3 和/etc/rc.5 连接文件S85sybase,开机自动起动sybase

为了能在关机时自动关sybase
# ln -sf /etc/init.d/sybase /etc/rc0.d/K25sybase
操作方法
# service sybase status
# service sybase start
# service sybase stop

或者执行通用的启动命令
# unset LANG
# startserver -f /opt/sybase/ASE-15_0/install/RUN_PDCSS -f /opt/sybase/ASE-15_0/install/RUN_PDCSS_BS
关闭服务器
# isql -Usa -P -SPDCSS
> shutdown SYB_BACKUP
> go
> shutdown with nowait

四、SYBASE 注册(开发版服务器安装可略过)
用sybase用户登陆
$ /opt/sybase/SYSAM-1_0/bin/startd.sh $SYBASE/SYSAM-1_0
$ cd /opt/sybase/SYSAM-1_0
$ lmgr
输入:
序列号、功能名、功能计数、软件版本、授权代码
Adaptive Server 软件包中提供的认证信息,打印在“Sybase 软件资产管理认证”中。输入了全部许可证以后,单击“完成”!
检验软件是否在运行:
当lmgrd 守护程序启动时,它将自动启动SYBASE守护程序。要检验许可证管理软件是否运行在系统上。使用:
# $SYBASE/SYSAM-1_0/bin/lmutil lmstat -c
继续安装或启动 Adaptive Server 前,先确认 lmgrd 和 SYBASE 在运行,即“up”。
注意:为了保证系统启动时启动SySAM(Sybase 软件资产管理器)许可机制
在:/etc/rc.d/rc.local中加入 : /opt/sybase/SYSAM-1_0/bin/startd.sh /opt/sybase/SYSAM-1_0

五、修改目录权限:
以root用户登录
chown -R sybase:sybase /opt/sybase
chmod 755 -R /opt/sybase
注意,以下对数据库的操作均使用 sybase 用户

六、设置数据库字符集
以sybase 用户登录,启动服务器
检测字符集设置是否cp936
# isql -Usa -P -SPDCSS
> sp_helpsort
如果不是则需要手工设置
# charset -Usa -P -SPDCSS binary.srt cp936
# isql -Usa -P -SPDCSS
> select name,id from syscharsets where
> sp_configure "default character set id",171
重新启动服务器两次,第一次启动会失败
# startserver -f /opt/sybase/ASE-15_0/install/RUN_PDCSS

在服务器设置/opt/sybase/locales/locales.dat中
[linux]
locale = en_US, us_english, cp936
locale = default, us_english, cp936

在客户端也要设置c:\sybase\locales\locales.dat中
[linux]最上和最下一行把iso_1 改成cp936这样一来,在客户端才能显示中文

linux

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Centos configuration IP address Centos configuration IP address Apr 14, 2025 pm 09:06 PM

Steps to configure IP address in CentOS: View the current network configuration: ip addr Edit the network configuration file: sudo vi /etc/sysconfig/network-scripts/ifcfg-eth0 Change IP address: Edit IPADDR= Line changes the subnet mask and gateway (optional): Edit NETMASK= and GATEWAY= Lines Restart the network service: sudo systemctl restart network verification IP address: ip addr

How to optimize CentOS HDFS configuration How to optimize CentOS HDFS configuration Apr 14, 2025 pm 07:15 PM

Improve HDFS performance on CentOS: A comprehensive optimization guide to optimize HDFS (Hadoop distributed file system) on CentOS requires comprehensive consideration of hardware, system configuration and network settings. This article provides a series of optimization strategies to help you improve HDFS performance. 1. Hardware upgrade and selection resource expansion: Increase the CPU, memory and storage capacity of the server as much as possible. High-performance hardware: adopts high-performance network cards and switches to improve network throughput. 2. System configuration fine-tuning kernel parameter adjustment: Modify /etc/sysctl.conf file to optimize kernel parameters such as TCP connection number, file handle number and memory management. For example, adjust TCP connection status and buffer size

Difference between centos and ubuntu Difference between centos and ubuntu Apr 14, 2025 pm 09:09 PM

The key differences between CentOS and Ubuntu are: origin (CentOS originates from Red Hat, for enterprises; Ubuntu originates from Debian, for individuals), package management (CentOS uses yum, focusing on stability; Ubuntu uses apt, for high update frequency), support cycle (CentOS provides 10 years of support, Ubuntu provides 5 years of LTS support), community support (CentOS focuses on stability, Ubuntu provides a wide range of tutorials and documents), uses (CentOS is biased towards servers, Ubuntu is suitable for servers and desktops), other differences include installation simplicity (CentOS is thin)

Centos shutdown command line Centos shutdown command line Apr 14, 2025 pm 09:12 PM

The CentOS shutdown command is shutdown, and the syntax is shutdown [Options] Time [Information]. Options include: -h Stop the system immediately; -P Turn off the power after shutdown; -r restart; -t Waiting time. Times can be specified as immediate (now), minutes ( minutes), or a specific time (hh:mm). Added information can be displayed in system messages.

CentOS HDFS performance tuning tips CentOS HDFS performance tuning tips Apr 14, 2025 pm 06:00 PM

CentOS Platform Hadoop Distributed File System (HDFS) Performance Optimization Guide Optimizing HDFS Performance is a multi-faceted issue, and multiple parameters need to be adjusted for specific situations. The following are some key optimization strategies: 1. Memory management adjusts the NameNode and DataNode memory configuration: reasonably configure the HADOOP_NAMENODE_OPTS and HADOOP_DATANODE_OPTS environment variables according to the actual memory size of the server to optimize memory utilization. Enable large page memory: For high memory consumption applications (such as HDFS), enabling large page memory can reduce memory page allocation and management overhead and improve efficiency. 2. Disk I/O optimization uses high-speed storage

What is the CentOS MongoDB backup strategy? What is the CentOS MongoDB backup strategy? Apr 14, 2025 pm 04:51 PM

Detailed explanation of MongoDB efficient backup strategy under CentOS system This article will introduce in detail the various strategies for implementing MongoDB backup on CentOS system to ensure data security and business continuity. We will cover manual backups, timed backups, automated script backups, and backup methods in Docker container environments, and provide best practices for backup file management. Manual backup: Use the mongodump command to perform manual full backup, for example: mongodump-hlocalhost:27017-u username-p password-d database name-o/backup directory This command will export the data and metadata of the specified database to the specified backup directory.

Centos stops maintenance 2024 Centos stops maintenance 2024 Apr 14, 2025 pm 08:39 PM

CentOS will be shut down in 2024 because its upstream distribution, RHEL 8, has been shut down. This shutdown will affect the CentOS 8 system, preventing it from continuing to receive updates. Users should plan for migration, and recommended options include CentOS Stream, AlmaLinux, and Rocky Linux to keep the system safe and stable.

CentOS Stream 8 troubleshooting methods CentOS Stream 8 troubleshooting methods Apr 14, 2025 pm 04:33 PM

CentOSStream8 system troubleshooting guide This article provides systematic steps to help you effectively troubleshoot CentOSStream8 system failures. Please try the following methods in order: 1. Network connection testing: Use the ping command to test network connectivity (for example: pinggoogle.com). Use the curl command to check the HTTP request response (for example: curlgoogle.com). Use the iplink command to view the status of the network interface and confirm whether the network interface is operating normally and is connected. 2. IP address and gateway configuration verification: Use ipaddr or ifconfi

See all articles