Equipped with LINUX Oracle 8
Using Oracle 8 under Linux, Oracle 8 should be installed, but Oracle's installation documentation is simpler. The author learned from its installation method under the UNIX operating system, and the method of installing Oracle 8 on Linux, this method is not necessarily the best, so that the readers use Oracle 8 is the purpose of this article.
Preparation
Assume that the installation environment is Red Hat Linux, please confirm that Linux's core version is 2.0.36 or more before installation.
1. Log in to the system with root users, create user Oracle and group DBA, which is Oracle default installation user. After creating the installation user, use tar -xvzf to extract the compressed file to a specified directory, this article is set to / Oracle, because the TAR performs data archiving with the user ID, the group ID is different, so it is to run Chown -R Oracle: DBA to change file properties.
2. Due to the requirements of the shared section of Oracle itself, the user must reopeically generate the core so that the setting of the shared segment meets the installation requirements. To generate the core, the user should install the source code of the Linux operating system, editor /usr/src/linux/include/shmparam.h, change the 0x002000000 (32MB) of #define shmmax 0x002000000, then in / usr / src Under Linux Run Make Dep, make clean, make bzimage generates core, and use the LinuxConf command to set the new core to start the core. This step must be done. If the new core of the generated is wrong, you can start your computer with the original core. You can use IPC-ML to view the settings of the shared segment to meet the requirements. When the share is greater than 2GB, the viewed value is negative.
3. Install the appropriate EGC package. Assume that the disc mount is installed on / mnt / cdrom, with the command modprobe isofs to cause the operating system to process the disc's file system, then run mount -t iso9660 / dev / cdrom / mnt / cdrom, such as modifying / etc / fstab after installation This step is not performed. Enter the corresponding RPMS directory, install the package started with EGC, using the installation command to RPM -IVH
Set the installed environment variable
The corresponding environment variable should be set before installation. Modify the user Oracle's.bash-profile file, set the corresponding environment variable. Since the root user needs to be installed when installing the system, there must be these environment variables, so put it in / etc / profile, plus * is Oracle's proprietary environment variable, and examples are as follows:
# / Etc / profile
# System wide environment and startup programs
# Functions and aliases Go in / etc / bashrc
Java-home = / usr / local / jdk1.1.3
Sybase = / OPT / Sybase-11.9.2
DSQuery = SybaserDBMS
* PATH = $ PATH: $ java-home / bin: / usr / x11r6 / bin: /Home/oracle/product/8.0.5/bin
PS1 = "u @ h: w $"
Ulimit -C 1000000
IF ['id -gn' = 'id-un' -a 'id -u' -GT 14]; THEN uMASK 002ELSE UMASK 022
Fi
User = 'id-un'
Logname = $ USER
Mail = "/ var / spool / mail / $ user"
Classpath = / usr / local / jdk1.1.3 / lib: $ homen / bin
Hostname = '/ bin / hostname'
Histsize = 1000
Histfilesize = 1000
Export Java-Home ClassPath Sybase DSQuery
Export Path Ps1 Hostname Histsize Histfilesize User Logname Mail
* Oracle-home = / home / oracle / product / 8.0.5
* Oracle-Base = / home / oracle
* Oracle-Owner = Oracle
* Oracle-Sid = Oracle8
* Oracle-Term = 386
* LD-LIBRARY-PATH = / home / oracle / product / 8.0.5 / lib
* Tmpdir = / var / tmp
* EXPORT ORACLE-HOME Oracle-Base Oracle-Owner Oracle-Sid Oracle-Term
Export LD-Library-path Tmpdir
For i in /etc/profile.d/.sh; do
IF [-X $ I]; THEN. $ I
Fi
DONE
Unset I
Install and start the database
1. Log in to the user root, then run the / etc / oratab file to the corresponding directory. SH can generate the / etc / oracability. Switch to the user Oracle with su - Oracle, run / Oracle / ORAINST / ORAINST to start the installation command, pay attention to the Oracle document, JDK, and Smart Agent when installing, and do not create a database object. Restart the / ORACLE / ORAINST / ORAINST installed RDBMS part, in general, in addition to entering several user-customized passwords, it is possible to press the default value. Oracle installer starts copy files, during copying files, when installed into the Database Management System (RDBMS), the user can log in from another terminal, see some Oracle processes with PS-EF | GREP Oracle.
2. After the database server is installed, it can be manually started. Log in with user Oracle, enter $ Oracle-Home / BIN, running DBSTART to start the database server. Run dbshut to stop the database server.
If users are less familiar with Oracle's network part, copy $ Oracle-Home / Network / Admin / ORA to the / etc directory, running LSNRCTL Start under $ Oracle-Home / BIN to start the network monitoring process.
3. In order to start the system every time the system is automatically launched, you can automatically start Oracle every time you start, you can use the following method. Log in to ROOT, enter /etc/rc.d/init.d, manually generate file Oracle, as for the writing format of the file, see the rest of the corresponding file, example below: #! / Bin / sh
# Oracle this shell script takes Care of Starting and Stopping
# Oracle.
# Chkconfig: 2345 80 30
# Description: Oracle Is A RDBMS Server.
# ProcessName: Oracle
# Source Function Library.
. /etc/rc.d/init.d/functions
# Source NetWorking Configuration.
. / etc / sysconfig / network
# Check That Networking is Up.
[$ {NetWorking} = "no"] && exit 0
# See how wee wee caled.
Case "$ 1" in
START)
# Start daemons.
echo -n "starting oracle:"
Su - Oracle /Home/oracle/Product/8.0.5/bin/dbstart> / dev / null 2> & 1
Sleep 60
Su - Oracle / Home / Oracle / Product / 8.0.5 / Bin / LSNRCTL Start> / DEV / NULL 2> & 1
echo
Touch / Var / Lock / Subsys / Oracle
;
STOP)
# Stop daemons.
echo -n "shutting down oracle:"
Su - Oracle / Home / Oracle / Product / 8.0.5 / BIN / LSNRCTL Stop> / Dev / Null 2> & 1
Su - Oracle /Home/oracle/Product/8.0.5/bin/dbshut> / dev / null 2> & 1
echo
RM -F / VAR / LOCK / SUBSYS / ORACLE
;
RESTART)
$ 0 STOP
$ 0 Start
;
STATUS
Status Oracle
;
)
echo "Usage: Oracle {Start | Stop | Restart | Status}"
EXIT 1
ESAC
EXIT 0
Client configuration
In order to use some development tools under Windows, you can do it as follows:
1. Install Oracle client software under Windows (you can use Oracle 7.xx Windows Client Software), after the installation is complete, copy the /etc/tnsnames.ora under Linux to the $ Oracle EtWorkadmin directory under Windows, Start the list of Net Easy Configure and indicate the word String name of the ODBC connection and the host string required to run SQLPLUS, you can connect the server from the client to the development of the database through ODBC.