1. Several simple concepts to be understood
Adaptive Server:
A relational database Server generally includes Adaptive Server, Backup Server, Monitor Server, XP Server, Adaptive Server utility, scripts, and configuration files.
Backup Server:
Backup Server is an Open Server-based application that is used to manage all database Backup (Dumping) and recovery (loading) operations of the Adaptive Server. Generally, you can install the Backup Server service when installing a new Adaptive Server.
Device and System database:
A device is an operating system file used to store databases and database objects. The Adaptive Server uses the O_SYNC option with the operating system file to ensure reliable data writing to the disk. Adaptive Server requires the following devices:
Master device-used to store system databases.
Sysprocsdev device-used to store system processes.
Of course, you do not need to manually create these two devices. When you create a new Adaptive Server, the master and sysprocsdev devices are also created.
What are System databases used:
The Master device includes the following system databases by default:
Master-controls the operations of the Adaptive Server and stores information about all users, user databases, devices, objects, and system table entries. The Master database is completely contained on the Master device and cannot be extended to any other device.
Model-provides templates for new user databases. The Model database contains the required system tables, which are copied to the new user database by the create database Command.
The workspace of the Tempdb-Adaptive Server. When the system starts the Adaptive Server, the tempdb database is cleared and rebuilt from the model database.
Note: The sample database is stored on the master device during installation, but should be moved to the User-Defined device after installation.
Sybsystemdb device:
The Sybsystemdb device stores the sybsystemdb database, which stores information about transactions being processed and can also be used during recovery.
Sybprocsdev device:
The Sybprocsdev device stores the sybsystemprocs database, which contains most of the system processes provided by sybase. A system process is a collection of SQL statements and control flow statements used to execute system tasks.
Optional devices and databases:
Of course, the above are the necessary devices and databases of the Adaptive Server. Optional sybsecurity devices and databases for auditing, sample databases pubs2, pubs3, the sytbsyntax database (for example, the database can use sp_syntax "select" to view related syntaxes), which is used to store the results of the database consistency check program (dbcc.
Ii. Pre-installation task
1: Environment Variables
Useradd sybase-g sybase add sybase user, passwd sybase modify password, I prefer to use this configuration: Use bash shell, it has simple historical commands available, however, csh previously used in FreeBSD is a smart history command. It does not seem to have been used in Linux. It can also be edited by clicking Esc and using vi. This is very convenient. So my. bashrc file is as follows:
If [-f/etc/bashrc]; then
./Etc/bashrc
Fi
If [-f./. profile]; then
. Profile
Fi
The. profile file is as follows:
#! /Bin/sh
LANG = en_US
SYBASE = "/home/sybase"
SYBASE_ASE = "ASE-12_5"
SYBASE_FTS = "FTS-12_5"
SYBASE_OCS = "OCS-12_5"
SYBASE_SYSAM = "SYSAM-1_0"
LM_LICENSE_FILE = "$ {SYBASE}/SYSAM-1_0/licenses/license. dat"
# SYBASE_JRE = "$ {SYBASE}/shared-1_0/JRE-1_3"
# PATH = "$ {SYBASE}/JS-12_5/bin": $ PATH
# PATH = "$ {SYBASE}/RPL-12_5/bin": $ PATH
PATH =.: "$ {SYBASE}/ASE-12_5/bin :$ {SYBASE}/ASE-12_5/install :$ {SYBASE}/OCS-12_5/bin :$ {SYBASE}/$ SYBASE_FTS/bin ": $ PATH
LD_LIBRARY_PATH = "$ {SYBASE}/ASE-12_5/lib: $ {SYBASE}/$ SYBASE_FTS/verity/_ ilnx21/bin: $ {SYBASE }/
$ SYBASE_FTS/verity/_ ilnx21/filters :$ {SYBASE}/SQLRemote/lib :$ {SYBASE}/OCS-12_5/lib :$ {SYBASE}/OCS-12_5/lib3p: $ {SYBASE}/ODBC-
12_5/lib ": $ LD_LIBRARY_PATH
Export lang sybase SYBASE_ASE SYBASE_FTS SYBASE_OCS SYBASE_SYSAM LM_LICENSE_FILE PATH LD_LIBRARY_PATH
2: System Adjustment
Default Value of memory shared by the operating system. For most Linux versions, 32 MB is used, and the minimum value of Adaptive Server is 64 MB. Check the available operating system size:
# Cd/proc
# Ipcs-lm | grep 'max seg size'
Max seg size (Kbytes) = 32768
To completely change the size of this shared memory parameter, you can add the following in/etc/rc. d/rc. local:
Echo '1970*512*1024 | bc>/proc/sys/kernel/shmmax
Or Add the following content to/etc/sysctl. conf:
Kernel. shmmax = 67108864
Iii. Installation
# Mount-t iso9660/dev/cdrom/mnt/cdrom
Check any installed sybase-related rpm packages. If any, use rpm-e to delete them first:
# Rpm-qa | grep Sybase
Sybase is installed under/opt by default, so you can use the following method to change it to/home/sybase:
[Root @ localhost sybInstall] $ rpm-ivh-prefix =/home/Sybase sybase-common-12.5-3.i386.rpm \
> Sybase-ase-12.5-3.i386.rpm \
> Sybase-esql-12.5-3.i386.rpm \
> Sybase-openclient-12.5-3.i386.rpm \
> Sybase-chinese-12.5-3.i386.rpm \
> Sybase-efts-12.5-3.i386.rpm \
> Sybase-portuguese-12.5-3.i386.rpm
I basically only need to use these things, so I only install these things.
Iv. Post-installation tasks
In fact, if no environment variable is set before rpm, you can run the following script in the installation directory after installation :. SYBASE. sh (bash) or source SYBASE. csh (csh) to correctly set environment variables.
Use sybase User Login
# Cd/opt/Sybase-12.5/SYSAM
# Lmgr
Enter the corresponding registration information (see certification)
You can run the showserver command to check which servers are running. Of course, I have not installed the servers. So the following uses srvbuild to install: resource files from/home/sybase/ASE/init/sample_resource_files/srvbuild. adaptive_server.rs copy the template to modify the final EXB server resource file EXB. rs:
Sybinit. release_directory:/home/sybase
Sybinit. product: sqlsrv
Sqlsrv. server_name: EXB
Sqlsrv. new_config: yes
Sqlsrv. do_add_server: yes
Sqlsrv. network_protocol_list: tcp
Sqlsrv. network_hostname_list: localhost
Sqlsrv. network_port_list: 5000
Sqlsrv. server_page_size: USE_DEFAULT
Sqlsrv. force_buildmaster: no
Sqlsrv. master_device_physical_name:/home/sybase/data/exbsvr/master. dat
Sqlsrv. master_device_size: USE_DEFAULT
Sqlsrv. master_database_size: USE_DEFAULT
Sqlsrv. errorlog:/home/sybase/data/exbsvr. log
Sqlsrv. do_upgrade: no
Sqlsrv. sybsystemprocs_device_physical_name:/home/sybase/data/exbsvr/systemprocs. dat
Sqlsrv. sybsystemprocs_device_size: USE_DEFAULT
Sqlsrv. sybsystemprocs_database_size: USE_DEFAULT
Sqlsrv. sybsystemdb_device_physical_name:/home/sybase/data/exbsvr/systemdb. dat
Sqlsrv. sybsystemdb_device_size: USE_DEFAULT
Sqlsrv. sybsystemdb_database_size: USE_DEFAULT
Because I didn't configure a Backup Server for it (I just used it for practice), I took the last line of sqlsrv. default_backup_server: PUT_YOUR_BACKUP_SERVER_NAME_HERE is deleted. Of course, you must create the data and exbsvr folders under/home/sybase before executing the command:
# $ SYBASE $ SYBASE_ASE/bin/srvbuildres-r EXB. rs
# $ SYBASE $ SYBASE_ASE/install/startserver-f RUN_EXB
To start the EXB server, you can use:
# Isql-Usa-P-SEXB
To test whether it is successful.