Configure Oracle 8 for Linux

Source: Internet
Author: User
Tags odbc connection oracle documentation sybase dsquery

Configure Oracle 8 for Linux

Before using Oracle 8 in Linux, Oracle 8 should be installed, but the installation documentation provided by Oracle is relatively simple. The author draws on the Installation Method in the Unix operating system and obtains the method for installing Oracle 8 on Linux. This method is not necessarily the best, oracle 8 is the purpose of this Article.

Preparations

If the installation environment is Red Hat Linux, make sure that the Linux core version is 2.0.36 or later before installation.

1. log on to the system as the Root user and create the oracle user and the dba group. This is the default installation user of Oracle. After creating and installing a user, use tar-xvzf to decompress the compressed file to a specified directory. This document assumes it is/oracle, because the tar Data Archiving is different from the user ID and group ID of the user's local machine, therefore, you need to run chown-R oracle: dba to change the file attributes.

2. Because of Oracle's requirements for shared segments, you must manually generate the core so that the shared segments can meet the installation requirements. To generate the core, you should install the source code of the Linux operating system and edit/usr/src/linux/include/shmparam. h. Change the value of 0x002000000 (32 MB) in the line # define SHMMAX 0x002000000 to over MB, then run make dep, make clean, and make bzImage in/usr/src/linux to generate the core, and use the linuxconf command to set the new core as the startup core. This step must be done. If the generated new core is wrong, you can use the original core to start the computer. Use ipc-ml to check whether the shared segment settings meet the requirements. When the shared segment is larger than 2 GB, the value is negative.

3. Install the corresponding egc package. Assume that the installation disc is mounted on/mnt/cdrom, run modprobe isofs to enable the operating system to process the file system of the disc, and then run mount-t iso9660/dev/cdrom/mnt/cdrom, if/etc/fstab is modified after installation, skip this step. Go to the appropriate RPMS directory, install the packages starting with egc, and run the rpm-ivh installation command <package name>.

Set environment variables for Installation

Set the corresponding environment variables before installation. Modify the. Bash-profile file of Oracle and set the corresponding environment variables. Because the root user is required to install the system and these environment variables are required, place them in the/etc/profile and add the * parameter to the Oracle-specific environment variables, as shown in the following example:

# /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 002 else umask 022 fi USER=′id -un′ LOGNAME=$USER MAIL=″/var/spool/mail/$USER″ CLASSPATH=/usr/local/jdk1.1.3/lib:$HOME/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 on to the system as the root user and run/Oracle/orainst/oratab. Sh in the corresponding directory to generate the/etc/oratab file. Switch to your Oracle using su-Oracle and run/Oracle/orainst to start the installation command. During installation, note that you do not need to install the Oracle documentation, JDK, and smart proxy in this step, do not create database objects. Restart the/Oracle/orainst-installed RDBMS section. Generally, only a few customized passwords can be entered by default. The Oracle installer starts to copy files. During the file copying process, you can log on from another terminal when installing the database management system (RDBMS, use PS-Ef | grep Oracle to see that some Oracle processes have been started.

2. After the database server is installed, it can be started manually. Log on to Oracle as a user, enter $ Oracle-home/bin, and run dbstart to start the database server. Run dbshut to stop the database server.

If you are not familiar with Oracle's network, you can copy $ Oracle-home/Network/admin/Ora to the/etc directory, run LSNRCTL start in $ Oracle-home/bin to start the network monitoring process.

3. to automatically start oracle or manually specify whether oracle is automatically started at each time when the system is started, you can use the following method. Log on as a root user, enter/etc/rc. d/init. d, and manually generate the Oracle file. For the file writing format, see other corresponding files, for example:

#!/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 we were called. 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

To use some development tools in windows, follow these steps:

1. install the Oracle client in Windows (you can use Oracle 7. xx Windows client software), after installation is complete, the/etc/tnsnames in Linux. copy ora to the $ ORACLE etworkadmin directory under Windows, run net easy configure in the Start menu, and specify the ODBC connection String and Host String required to run SQLPLUS ), you can connect the client to the server and develop the database through ODBC.

2. if you use Delphi as a development tool, you can specify a remote Oracle Server In BDE settings. When you set it, only the Network protocol of the database system is TNS (Transparent Network Substrate, do not use TCP), and then enter the Database Desktop to access the data on the remote Oracle database.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.