Вы находитесь на странице: 1из 4

Lab 1: Installation of SAP ASE

Objective: Installation of SAP ASE - Base Installation


Sequence 1. Prepare the Operating System
1. Disk Space : A full installation needs approx. 1.5 Gb so 4 Gb should give you enough room to handle
upgrades too. In this case we install the software in /opt/sap. Database files will be stored /var/sap.
Add a group "sybase" and a user "sybase" to the system. Also create the needed directories.
useradd -d /opt/sap sybase
passwd sybase
mkdir -p /var/sap
chown sybase:sybase /var/sap
2. Enable the operating system to allow more than the default value for shared memory.
Add following line to /etc/sysctl.conf
kernel.shmmax=4294967296
Now Issue the Command
# sysctl -p
3. Install 32 bit libraries
When installing Sybase ASE 64 bit version on Linux, you need to install the 32 bit shared libraries as
well. This will prevent problems when running isql or bcp.
yum -y install libX11.i686 libXtst.i686 gtk2.i686 glibc.i686 libgcc.i686 webkitgtk.i686

Save the Commands listed in Next Three Steps (4,5 and 6) in /etc/rc.local

4. Create Raw devices from the Partitions (Create Necessary Partitions before doing this Using fdisk).
Sybase recommends to store all database files on raw devices except for temporary databases like
tempdb.
# raw /dev/raw/raw1 /dev/sdb1
# raw /dev/raw/raw2 /dev/sdb2
# raw /dev/raw/raw3 /dev/sdb3
# raw /dev/raw/raw5 /dev/sdb5
# raw /dev/raw/raw6 /dev/sdb6
5. Change permissions on the raw devices...
# chmod 600 /dev/raw/raw1
# chmod 600 /dev/raw/raw2
# chmod 600 /dev/raw/raw3
# chmod 600 /dev/raw/raw5
# chmod 600 /dev/raw/raw6
6. Change ownership on the raw devices to sybase...
# chown sybase:sybase /dev/raw/raw1
# chown sybase:sybase /dev/raw/raw2
# chown sybase:sybase /dev/raw/raw3
# chown sybase:sybase /dev/raw/raw5

Watch Live Demo of this lab here : https://www.youtube.com/watch?v=wK-ysQ70_kg Ram N Sangwan


# chown sybase:sybase /dev/raw/raw6

We shall be using
/dev/raw/raw1 master (100 Mb)
/dev/raw/raw2 sybsystemprocs (200M)
/dev/raw/raw3 sybsystemdb (10M)
/dev/raw/raw5 data01 (We shall use 100MB for testing. You can always add more)
/dev/raw/raw6 log01(we shall use 25MB for testing. You can always add more).

Sequence 2. Installation of the software


1. Switch to the newly created user:
su - sybase
You should now be in the directory /opt/sap. Make a work directory and put the downloaded Sybase
software in it.
# mkdir install
# cd install
# tar -xf ase160_linuxx86-64.tgz
# exit
2. Logout from root and login as "sybase" to Start the installation
# cd install
./setup.bin

If Installation fails to start in GUI, this problem can occur for the following reasons:
1. The file /usr/lib/libstdc++.so.5.0.7 or later is not installed on the system.
2. The $DISPLAY environment variable is not properly set.
3. The necessary X Windows libraries for running the GUI installer are not available.

The solutions below relate to the cause above:


1. Install libstdc++.so.5.0.7 or later.
2. See the AppScan Source Edition release notes, which are included in the docs directory of
the installation files for information on installing this library.
3. Set your $DISPLAY environment variable to a valid display.
Run the installation process with the system's default 64-bit JRE:
./setup.bin LAX_VM /usr/bin/java
If after performing the steps above the issue still persist, this may be variation of the issue
where the issue is the uninstaller is unable to open the display. To validate that issue is due
to lack of access to the display, launch the installer without sudo. If the installer displays as
the user this is an access issue to the display. If VNC was used to connect to the server, then
the following command will need to be ran:
xhost +server.example.com
If physically present at the server or if ssh was used to connect to the server use the following
command:
sudo -E ./setup.bin
3. Complete the Installation
Use /opt/sap as the destination directory, do a full installation. At the list of possible servers to configure,
deselect all options. We will do a manual configuration.

Watch Live Demo of this lab here : https://www.youtube.com/watch?v=wK-ysQ70_kg Ram N Sangwan


When the installation has finished successful you can safely remove the work directory and the installation
package.
4. Setup the environment
In /opt/sap you will find SYBASE.sh. Run this file:
. /opt/sap/SYBASE.sh
Check the value of $SYBASE:
echo $SYBASE
Sequence 3. Create the ASE server
We will create ASE1 and a backupserver called SYB_BACKUP. Configuration files and the errorlog are
stored in the admin directory, database files are stored in /var/sap
1. Create the directories for these servers:
cd ~
mkdir -p admin/ASE1
mkdir -p admin/SYB_BACKUP
mkdir /var/sap/ASE1
When you choose to use raw device it's quite handy when you create symbolic links from
/var/sap/ASE1 to those devices. :
2. Create Symbolic Links in the Data Directory (/var/sap/ASE1) for Devices Created Earlier
ln -s /dev/raw/raw1 /var/sap/ASE1/master.dat
ln -s /dev/raw/raw2 /var/sap/ASE1/sybsystemprocs.dat
ln -s /dev/raw/raw3 /var/sap/ASE1/sybsystemdb.dat
ln -s /dev/raw/raw6 /var/sap/ASE1/log01.dat

3. Go to the "/opt/sap/admin/ASE1" directory. Copy the Sybase supplied resource file,


$SYBASE/$SYBASE_ASE/init/sample_resource_files/srvbuild.adaptive_server.rs to ASE1.rs
# cd /opt/sap/admin/ASE1
# cp $SYBASE/$SYBASE_ASE/init/sample_resource_files/srvbuild.adaptive_server.rs ASE1.rs
# vi ASE1.rs
sybinit.release_directory: USE_DEFAULT
sybinit.product: sqlsrv
sqlsrv.server_name: ASE1
sqlsrv.sa_password: sybase
sqlsrv.new_config: yes
sqlsrv.do_add_server: yes
sqlsrv.network_protocol_list: tcp
sqlsrv.network_hostname_list: server.example.com
sqlsrv.network_port_list: 4000
sqlsrv.application_type: MIXED
sqlsrv.server_page_size: 4096
sqlsrv.force_buildmaster: no
sqlsrv.master_device_physical_name: /var/sap/ASE1/master.dat
sqlsrv.master_device_size: 100
sqlsrv.master_database_size: 60
sqlsrv.errorlog: /opt/sap/admin/ASE1/errorlog
sqlsrv.do_upgrade: no
sqlsrv.sybsystemprocs_device_physical_name: /var/sap/ASE1/sybsystemprocs.dat
sqlsrv.sybsystemprocs_device_size: USE_DEFAULT

Watch Live Demo of this lab here : https://www.youtube.com/watch?v=wK-ysQ70_kg Ram N Sangwan


sqlsrv.sybsystemprocs_database_size: USE_DEFAULT
sqlsrv.sybsystemdb_device_physical_name: /var/sap/ASE1/sybsystemdb.dat
sqlsrv.sybsystemdb_device_size: USE_DEFAULT
sqlsrv.sybsystemdb_database_size: USE_DEFAULT
sqlsrv.tempdb_device_physical_name: /var/sap/ASE1/tempdb.dat
sqlsrv.tempdb_device_size: 100
sqlsrv.tempdb_database_size: 100
sqlsrv.default_backup_server: SYB_BACKUP
#sqlsrv.addl_cmdline_parameters:
PUT_ANY_ADDITIONAL_COMMAND_LINE_PARAMETERS_HERE
sqlsrv.do_configure_pci: no
sqlsrv.sybpcidb_device_physical_name:
PUT_THE_PATH_OF_YOUR_SYBPCIDB_DATA_DEVICE_HERE
sqlsrv.sybpcidb_device_size: USE_DEFAULT
sqlsrv.sybpcidb_database_size: USE_DEFAULT
# If sqlsrv.do_optimize_config is set to yes, both sqlsrv.avail_physical_memory and
sqlsrv.avail_cpu_num need to be set.
sqlsrv.do_optimize_config: yes
sqlsrv.avail_physical_memory: 256
sqlsrv.avail_cpu_num: 1

4. Now build the server with the command:


# srvbuildres -r ASE1.rs
When the srvbuildres command fails with:
Task failed
Unable to boot server 'ASE1'.
Server 'ASE1' was not created.
Look at the last lines of the errorlog created by srvbuildres located at /opt/sap/admin/ASE1/errorlog
The end of the errorlog file will most likely look something like this:
kernel os_create_region: can't allocate 58456064 bytes
kernel kbcreate: couldn't create kernel region.
kernel kistartup: could not create shared memory
When you spot the message "kistartup: could not create shared memory" it means that you did not
configure your system to use more that 55 Mb of shared memory. Reconfigure that parameter and try
again
5. After a successful creation you can connect to the server using the command line tool isql. The login
“sa" has been created, with the password that was specified in ASE.rs file. At the prompt of isql you
can type a command or execute a stored procedure. Type exit to exit.
isql -Usa -Psybase -SASE1
sp_helpdb
go
exit

Watch Live Demo of this lab here : https://www.youtube.com/watch?v=wK-ysQ70_kg Ram N Sangwan