SQL Relay - Getting Started With Sybase - Initializing an 15.0.2 Server

Installing and Initializing an 15.0.2 Server

To install and initialize Sybase Adaptive Server Enterprise, follow these instructions.

Install Required Packages

Sybase ASE version 15.0.2 requires older versions of libstdc++- than ship with most modern Linux distributions. You will need to install compat-libstdc++-33 and compat-libstdc++-296.

You will also need to install libaio.

These packages are available from rpmfind or using yum.

Set Kernel Parameters

The database server requires more shared memory than the typical linux system is configured to allow by default. Run the following command (as root) prior to installation.

> echo 268435456 > /proc/sys/kernel/shmmax

Download Upgrade

Many modern versions of linux use NPTL (Native Posix Theading Library), but Sybase 15.0.2 requires the old Linuxthreads implementation. Some versions of Linux such as Fedora Core 4 support both. But as of Fedora Core 5, Linuxthreads support was dropped. The same may hold true for other modern distro's. The Sybase 15.0.2 installer will run on a linux that doesn't support Linuxthreads, but the DB will fail to start.

However Sybase has released an update that will allow Sybase 15.0.2 to run on an OS that uses NTPL. Go to the Sybase website, search for EBF15682 and download EBF15682.tgz.

Extract The Distribution

The distribution comes as a tarball. Extract it as follows:

> mkdir sybase
> mv ase1502_xe_linux.tgz sybase
> cd sybase
> tar xfz ase1502_xe_linux.tgz

The Sybase update comes as a tarball as well. Extract it as follows:

> mkdir ebf
> mv EBF15672.tgz ebf
> cd ebf
> tar xfz EBF15672.tgz

Install The Software Distribution

Now, go into the directory the sybase software distribution was extracted into and, as root, run the following command:

> ./setup

A java-based installer should run.

When prompted What would you like to install?, check the Adaptive Server Enterprise (Express Edition) check box.
Click Next.

When prompted for the End-user license agreement select All regions from the Please Select pulldown.
Read the license and click the I agree to the terms of the Sybase license, for the install location specified. check box.
Click Next.

When prompted for a Destination Directory, accept the default "/opt/sybase"
Click Next.

If prompted with The directory does not exist. Do you want to create it?
Click Yes.

On the screen titled: Choose the setup type that best suits your needs
Accept the default Typical radio button.
Click Next.

An installation summary page will appear, indicating what will be installed, what directory, and the total size of the installation.
Click Next.

A screen titled Installing Sybase Adaptive Server Enterprise Suite. Please wait... will appear with a progress bar indicating how much of the installation has been completed. When that is finished, click Next.

A screen will pop up asking Do you want to configure email alerts? Click No and click Next.

On the screen titled Please deselect any servers that you do not want to configure now:
Uncheck all checkboxes and Click Next.

A screen will appear titled The installation was successful
Click Finish.

Install The Update

Now, go into the directory the update was extracted into and, as root, run the following command:

> ./setup

A java-based installer should run. On the main page, click Next.

When prompted for the End-user license agreement select the country that you are in from the Please Select pulldown.
Read the license and click the I agree to the terms of the Sybase license, for the install location specified. check box.
Click Next.

When prompted for a Destination Directory, accept the default "/opt/sybase"
Click Next.

When prompted whether you want to continue with the installation even though it will overwrite existing software, click Yes.

On the screen titled: Choose the setup type that best suits your needs
Accept the default Update radio button.
Click Next.

When prompted Choose the , check the Adaptive Server Enterprise (Express Edition) check box.
Click Next.

An page will appear, indicating what will be installed, and what will be updated. Click Next.

An installation summary page will appear, indicating what will be installed, what directory, and the total size of the installation.
Click Next.

A screen titled Installing Sybase Adaptive Server Enterprise Suite. Please wait... will appear with a progress bar indicating how much of the installation has been completed. When that is finished, click Next.

On the screen titled Please deselect any servers that you do not want to configure now:
Check all checkboxes and Click Next.

On the screen titled Please select the products that you want to custom configure:
Leave all checkboxes unchecked and Click Next.

A summary page will appear with values for that each server will be configured with.
Click Next.

A screen will appear titled Configure New Adaptive Server with progress messages indicating what step is currently being executed. This stage will fail at "Starting server" if shmmax wasn't configured properly.

A screen will appear titled Configure New Backup Server with progress messages indicating what step is currently being executed.

A screen will appear titled Configure New Monitor Server with progress messages indicating what step is currently being executed.

A screen will appear titled Configure New XP Server with progress messages indicating what step is currently being executed.

A screen will appear titled The installation was successful
Click Finish.

Starting the Database at Boot Time

To start the database at boot time, you need to install a script like the following. Replace /opt/sybase with whatever directory Sybase ASE is installed in.

>     #!/bin/sh

>     export SYBASE=/opt/sybase

>     export PATH=$PATH:$SYBASE/ASE-15_0/bin:$SYBASE/ASE-15_0/install

>     echo 268435456 > /proc/sys/kernel/shmmax

>     case "$1" in
>             start)
>                     for i in `ls $SYBASE/ASE-15_0/install/RUN_*`
>                     do
>                             su -c "startserver -f $i" > /dev/null 2>&1;
>                     done
>                     ;;
>             stop)
>                     kill `ps -efa | grep sybase | grep -v grep | awk '{print $2}'`
>                     ;;
>             *)
>                     echo $"Usage: $0 {start|stop}"
>                     exit 1
>     esac

>     exit 0

Install this script and run it with the "start" option to start up the database. Running it with the "stop" option shuts the database down. To access a database, it must be running.