Showing posts with label CentOS. Show all posts
Showing posts with label CentOS. Show all posts

Sunday, October 2, 2011

Installing Sybase 12.5 ASE on CentOS 5.2 and 5.5

INSTALLING LINUX

  1. Install a minimal version of CentOS 6 You will require 3 partitions 
  2. To aid set up ensure that SELinux is disabled and iptables is off 
  3. Set up kernel parameters in /etc/sysctl.conf;
             kernel.exec-shield=0
             kernel.randomize_va_space=0
             kernel.shmmax=67108864 # Only if tis number is bigger than the default
  4. Update kernel parameters;
             sysctl -p /etc/sysctl.conf
  5. Ensure that you have 3 partitions, or seperate disks
  6. export LD_POINTER_GUARD=0
  7. Install the following rpms;
            yum install compat-libstdc++-296
    For this you might want to install the rpmfusion repository
            Do this by downloading the rpm and the epel rpm
            Install using rpm -i rpmfusion epel
INSTALLING SYBASE
  1. Extract your Sybase tgz file
  2. Run the setup command
            ./setup -is:javaconsole -console
                         Use the -options-record
                         Where filename will record your options, note that this option can only be used in GUI mode.

Follow the on screen instructions, which includes agreeing to the T&Cs, deciding where you want to install Sybase, create the directory, typical/full or custom.
If installing client only then use custom and select the following;
        Select everything except Sybase Server

Creating the first database
1. Now we need to create your first database
        cd /opt/sybase
        You will find example resource files in ASE-/init/sample_resource_files
        Select the one appropriate to your install
        (This example will be for the adaptive_server.rs)

2. The resource file
        Copy the srvbuild.adaptive_server.rs to /opt/sybase/ase.rs
        Edit the file as follows;

                sybinit.release_directory: /opt/sybase   (or where you installed it)
                sqlsrv.server_name: STEVE       (SYBASE logical name of the database. This will be the name in the interfaces file, server instance)
                sqlsrv.network_hostname_list: localhost (the real hostname of your server)
                sqlsrv.network_port_list: 4000  (The port number you wish to run this instance on)
                sqlsrv.master_device_physical: /dev/sdb1        (physical partition or filename for master database)
                sqlsrv.sybsystemprocs_device_physical_name: /dev/sdb2
                sqlsrv.sybsystemdb_device_physical_name: /dev/sdb3      (remember this applies to all databases created within this instance)
                sqlsrv.default_backup_server:

3. Update root's enviroment using the SYBASE.sh script
        . ./SYBASE.sh
4. srvbuildres -r ase.rs
5. If the above command results in "Server 'STEVE' was successfully created'
        find . -name RUN*

        Should return /opt/sybase/ASE-12_5/install/RUN_STEVE
6. Test your connection
        isql -Usa -S STEVE
   You should be prompted for a password, just press ENTER
   You should eventually get the   1>   prompt
   Type quit and press enter

Creating the start up script so that SYBASE starts on reboot
1. vi /etc/init.d/sybase
2. Add the following to the file;
#!/bin/bash
# chkconfig: 35 95 95
# description: Start sybase
case $1 in
        'start')
                unset LANG
                export LD_POINTER_GUARD=0
                . /opt/sybase/SYBASE.sh
                startserver -f /opt/sybase/ASE-12_5/install/RUN_STEVE
                ;;
        'stop')
                pkill dataserver
                ;;
esac

3. Save the script and then do;
        chmod +x /etc/init.d/sybase

4. Add the script to the start up and shutdown sequence
        chkconfig --add sybase

5. Test the script;
        - Shutdown the server