Difference between revisions of "Installation guidelines RepServer 15.7.1"

From SybaseWiki
Jump to: navigation, search
(Created page with 'This page describes how to install and configure a Sybase Replication Server version 15.7.1. You will also learn how to connect to the server, stop and restart it. ==Get the sof…')
(No difference)

Revision as of 11:03, 29 April 2013

This page describes how to install and configure a Sybase Replication Server version 15.7.1. You will also learn how to connect to the server, stop and restart it.

Get the software

First download the software for Replication Server.

For a licensed version you need to go here: http://sybase.subscribenet.com (account required) or to the eShop at sybase.com: http://eshop.sybase.com/eshop/buy?id=22574 Downloads are also available at the Sybase download center at http://downloads.sybase.com/swd/base.do?client=support. Once registered you can download the latest EBF (patch) for the desired platform. An EBF can sometimes also be used for a full installation.

Storage requirements

Make sure that the filesystem for the Sybase software is big enough. A full installation needs approx. 570 Mb so 2 Gb should give you enough room to handle upgrades too. In this case we install the software in /opt/sybase/rep1571.

Replication server partitions (stable devices) will be stored /var/sybase. The mininum size of the initial partition is 20 Mb. Additional partitions that may be needed to queue up data must be taken into account as well. The requirements vary per environment and usage. When you run out of space in partitions you can always add more.

The partitions can be created on raw devices or on filesystem files (opened with Direct I/O).

Memory requirements

When running replication server on a virtualized environment, you need 300 Mb of RAM as a bare minimum. Increase memory when needed.

Prepare the operating system

Become root and add a group "sybase" and a user "sybase" to the system. Also create the needed directories. Strictly spoken, the usage of the username and groupname called "sybase" is not needed, any username is fine.

mkdir -p /opt/sybase
mkdir -p /var/sybase
groupadd sybase
useradd -g sybase -d /opt/sybase sybase
passwd sybase
chown sybase:sybase /opt/sybase
chown sybase:sybase /var/sybase

Installation of the software

Now, switch to the newly created user:

su - sybase

You should now be in the directory /opt/sybase. Make a work directory and put the downloaded Sybase software in it.

mkdir install
cd install
<put the software in this directory>
tar -xf <software-distro>

Start the installation (when using an EBF download as installation file you may need to go into a subdirectory)

./setup.bin

Use /opt/sybase/rep1571 as the destination directory, do a full installation, and continue installation without a license key, no e-mail alerts. Do not start the sample replication server as we will do a manual configuration.

When the installation has finished successful you can safely remove the work directory and the installation package.

Errors when running setup.bin

java not found

When you get an error like this

exec: 2508: /tmp/install.dir.527/Linux/resource/jre/bin/java: not found

you need to install software to run 32 bit binaries on a 64 bit machine. Become root again and install the required packages.

On ubuntu:

apt-get install ia32-libs

On Redhat

yum install glibc-devel.i386

Fontconfig error

Ignore the error "Fontconfig error: Cannot load default config file" if you get it.

Setup your environment

In /opt/sybase/rep1571 you will find files like SYBASE.csh, SYBASE.sh and SYBASE.env. Depending on the type of shell you use you need to source in one of these. For instance, when your default shell is bash you should do this:

. /opt/sybase/rep1571/SYBASE.sh

By doing:

echo $SYBASE

it should return /opt/sybase/rep1571. Is is fairly common to activate the SYBASE.sh script (or similar one) from your login script.

When you have generated a licence file through http://sybase.subscribenet.com install it in the directory $SYBASE/SYSAM-2_0/licenses

You can run without a license for 30 days (grace period).

Create the Replication Server

A Replication Server needs an system database (RSSD) to store its definitions. You can choose between a Sybase ASE (RSSD) or an embedded SQL Anywhere database (ERSSD). The choice between them depends on licensing costs, availabity of hardware or personal preference. After configuring replication server with either RSSD or ERSSD you cannot switch between them.

When you select an ERSSD you do not need to manage it, it is all handled automatically. When choosing an RSSD (Sybase ASE) there is an extra layer of software that you need to install, manage and probably pay for as well.

In this document an ERSSD server will be used for the Replication Server System Database.

Create the directories for these servers:

cd /opt/sybase
mkdir admin
mkdir admin/REP1
mkdir admin/REP1_ERSSD
mkdir /var/sybase/REP1
mkdir -p /var/sybase/REP1_ERSSD/database
mkdir /var/sybase/REP1_ERSSD/translog
mkdir /var/sybase/REP1_ERSSD/backup

Now go to the "/opt/sybase/admin/REP1" directory and create a resource file. Use the following template as an example, call it REP1.rs. You can also use the Sybase supplied resource file, it's $SYBASE/$SYBASE_REP/init/rs/install.rs

sybinit.product: rs
rs.rs_operation: rs_install
rs.rs_idserver_name: REP1
rs.rs_id_server_is_rs_server: yes
# Password for rs_REP1_id_user (RS to RS connectivity)
rs.rs_idserver_pass: secret123
rs.rs_name: REP1
# Password for "sa" user
rs.rs_rs_sa_pass: secret123
rs.rs_needs_repagent: yes
rs.rs_rs_errorlog: /opt/sybase/admin/REP1/REP1.errorlog
rs.rs_rs_cfg_file: /opt/sybase/admin/REP1/REP1.cfg
rs.rs_rssd_embedded: yes
rs.rs_erssd_name: REP1_ERSSD
rs.rs_erssd_database_dir: /var/sybase/REP1_ERSSD/database
rs.rs_erssd_translog_dir: /var/sybase/REP1_ERSSD/translog
rs.rs_erssd_backup_dir: /var/sybase/REP1_ERSSD/backup
rs.rs_erssd_errorlog_dir: /opt/sybase/admin/REP1_ERSSD
# Password for REP1_RSSD_prim
rs.rs_rssd_prim_pass: secret123
# Password for REP1_RSSD_maint
rs.rs_rssd_maint_pass: secret123
rs.rs_diskp_name: /var/sybase/REP1/part1.dat
rs.rs_diskp_lname: part1
# Password for REP1_rsi
rs.rs_rs_pass: secret123
# Password for REP1_ltm
rs.rs_ltm_rs_pass: secret123
rs.rs_id_server_network_protocol_list: tcp
rs.rs_idserver_hostname: <put your hostname here>
rs.rs_idserver_port: 5000
rs.rs_rs_port: 5000

When the partition as defined by "rs.rs_diskp_name" is on filesystem, you need to create the file with the "touch" command.

touch /var/sybase/REP1/part1.dat

Add the entries for repserver and ERSSD to $SYBASE/interfaces

REP1
	master tcp ether <put your hostname here> 5000
	query tcp ether <put your hostname here> 5000

REP1_ERSSD
	query tcp ether <put your hostname here> 5001

Now build the server with the command:

$SYBASE/$SYBASE_REP/install/rs_init -r REP1.rs

After a successful creation you can connect to the replication server using the command line tool isql. The login “sa" has been created, with the password that was specified in REP1.rs file. At the prompt of isql you can type a command or type exit to exit.

isql -Usa -Psecret123 -SREP1
admin who
go
exit

To connect to the ERSSD server cou can use the REP1_RSSD_prim login.

isql -UREP1_RSSD_prim -Psecret123 -SREP1_ERSSD
sa_conn_info
go
exit

Basic Replication server tasks

To shutdown Replication Server

isql -Usa -Psecret123 -SREP1
shutdown
go

To start Replication Server

cd /opt/sybase/admin/REP1
nohup ./RUN_REP1 &

Check status

When replication server has been started you can check if the status is ok by running the "admin health" command. It should return "HEALTHY". When the status is not healthy check the errorlog file (at /opt/sybase/admin/REP1/REP1.errorlog) for the cause. Please note that immediately after a start of replication server it may take a couple of minutes before all processes are up and running.

isql -Usa -Psecret123 -SREP1
admin health
go
exit

Recommended settings

The following settings are recommended to improve stability and performance. To change a setting, use isql and log on with the sa account

isql -Usa -Psecret123 -SREP1

Enable direct i/o

Set sqm_write_flush to dio to enable direct I/O on the partitions. A reboot is needed to activate the setting.

configure replication server set sqm_write_flush to 'dio'
go
shutdown
go

sqt_max_cache_size

Increase sqt_max_cache_size when the following message is shown the errorlog:

WARNING #24068 SQT(105:1 DIST PRIM.tpcc) - t/sqtint.c(1333)
SQT cache size is too low to load more than one transaction into the cache.

As a rule of thumb you can double the value (default is 1048576 for 32 bit, 20971520 for 64 bit) but don't overdo it. Retrieve the current value with

admin config,sqt_max_cache_size
go
configure replication server set sqt_max_cache_size to '41943040'
go

Increasing the value may require that you increase the allocated amount of memory for replication server (setting memory_limit).

sts_cachesize

Increase the value for sts_cachesize when this message is printed in the errorlog:

I. 2013/01/12 15:39:53. A cached row for system table ‘rs_columns’ was swapped out of the cache in order to accomodate another row.
configure replication server set sts_cachesize to '2000'
go

You can retrieve the current value with

admin config,sts_cachesize
go

All done

Happy Sybase-ing with your new server!!

Further reading:

Installation guide for Unix http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc32237.1571/doc/html/title.html

Getting started http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc10114.1571/doc/html/title.html

Reference manual http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc32410.1571/doc/html/title.html