Using Oracle under Linux
---- Due to the complexity of Oracle itself, install a lot of factors in the Linux environment. This article is divided into two aspects of the Oracle 8.0.5 installation in the Linux Redhat 6.0 environment.
Adjust the Linux core and the environment - before installing Oracle, you should first adjust the Linux kernel of RedHat 6.0, to make the following work: ---- 1, after completing the default installation of Redhat 6.0 Linux, you need Install the following software package: ---- kernel-source-2.2.5-15.i386.rpm Linux 2.2.5 kernel source, mainly used to regenerate the core after the core parameters. ---- TCL-8.0.4-29.i386.rpm This package is required to install the Oracle Intelligent Agent package. Compat-binutils-5.2-2.9.0.23.1.i386.rpmcompat-glibc-5.2-2.0.7.2.i386.rpmcompat-eGCS-5.2-1.0.3A.1.I381.RPMCompat-EGCS-C - 5.2-1 / 0 / 3a.1.i386.rpmcompat-libs-5.2-1.i386.rpm ---- 2, adjust Linux core parameters ---- According to Oracle 8.0.5 on Linux core memory parameters, you can work for Linux core The parameters are adjusted. Edit the modification /usr/src/linux/include/asm/shmparam.h file to modify the SHMMAX option. Oracle recommends using 4294967295, which means that the system's shared memory reaches 4G, which is not suitable. In general, the setting of SHMMAX is slightly greater than the native memory configuration. ---- In fact, the default installation RedHat 6.0 core runs Oracle 8.0.5 is no problem. Under normal circumstances, these parameters may not be adjusted. ---- If you need to adjust, after completing the modified, you should regenerate it by the document, and use the lilo command to specify the new core to boot. ---- 3, add users, create installation directory ---- Oracle installation and run need to create an Oracle user belonging to the DBA group, and create a master's installation point directory for Oracle users, such as / u0 / oracle, And specify that the directory is the default main directory for Oracle users.
---- In order to set up the Oracle user's operating environment, set a script file in the main directory of the Oracle user, which is used to automatically set the environment variable when logging in to an Oracle user. The name of the script file is related to the shell used by the user (defined in the / etc / passwd file). If BASH is used, the script file is .bash_profile; If you use SH, the script file is named .profile. ---- Take Bash as an example, enter the following in the script file. Bash_profile: # Oracle_Home Specifies the Oracle installation directory Oracle_Home = / u0 / oracle; export oracle_home # ld_library_path Specifies the shared library of Oracle LD_Library_Path = $ Oracle_Home / lib; export LD_LIBRARY_PATHORACLE_BASE = $ ORACLE_HOME; export ORACLE_BASE # ORACLE_SID Specifies the Oracle database instance name, Oracle recommends 4 or less characters ORACLE_SID = BROS; export ORACLE_SID # ORACLE_TERM Oracle user terminal type ORACLE_TERM = ansi; export ORACLE_TERMPATH = $ PATH: $ ORACLE_HOME / BIN; Export Path # TMPDIR Specifies the temporary directory, Oracle requires at least 20m space TMPDIR = / var / tmp; export tmpdirumask 022
---- After logging in, then log in to Oracle users and test whether environment variables meet the requirements. (2). Installing Oracle - Oracle installation can use a disc or a way to specify the original installation path. To install the Oracle for Linux disc, you should do the following command: mount -t iso9660 / dev / cdrom / home / oracle ---- Install the disc media. ---- Under normal circumstances, CDROM should be installed under the / home / cdrom directory. To install the original installation path, you should decompress the compressed file 805ship.tgz to a temporary directory, such as / home / oracle, use command: gunzip-c 805ship.tgz | tar xvf ---- Hypothesis specified Original installation path / home / oracle. In this directory: CD ORAINSTSH ORATAB.SH---- The main purpose of the command is to create / etc / oracab. ---- Since RedHat 6.0 is used in Glibc 2.0, it is necessary to make a patch in the Redhat 6.0 environment. The method is to uninstall the /pub/www/otn/linux/glibcpatch.tgz file located at the ftp.racle.com site, and correct the execution program in the $ ORACLE_HOME / BIN directory after completing the Oracle Basic System. ---- After the above work, you can start the installation of the Oracle basic system: 1. Go to the / home / oracle directory 2. Execute ./orainst / c3. Select Custom Installation ---- Depending on the prompt: Install Upgrade or de-install SoftwareInstall new product -do not create DB Objects. ---- This step is very important. Since the execution program in the original installation package is not compatible with GLIBC2.0, before playing the patch, the Oracle engine cannot be started to create a database object. ---- After performing the exit according to the above steps, the system should prompt: Result: Success .---- 4. Glibc correction for the Oracle executing program. The steps are as follows: * Establish $ ORACLE_HOME / ORAPATCH Directory * Copy GlibcPatch.tgz to the main directory * Execute Tar -Xvzf glibcpatch.tgz * After performing the SH glibcpatch.sh After completing the patch installation, you want to re-run the Oracle installer, steps below: * cd orainst * performs orainst / c * for custom installation in accordance with the following selections ---- Tip: Create / upgrade Database objectsCreate Database objectsOracle 8 Standard RDBMS 8.0.5.0.0Create product DB ObjectsFilesystem-bases Database until Tip: Rusult: Success- --- 5. Implementation installation processing: * Perform Su -P root, Enter the root user password * cd oracle user password * CD ORAINST * Execute SH ROOT.SH * Edit Modify / etc / ORATAB File: Find Oracle-SID Indicator Such as: $ Bros: / U0 / Oracle: N Modified to: $ bros: / u0 / oracle: y ---- to allow Oracle servers to start from starting.
* TNS modify the relevant file permissions: chown oracle.dba $ ORACLE_HOME / bin / tnslsnrchmod 750 $ ORACLE_HOME / bin / tnslsnrchown oracle.dba $ ORACLE_HOME / network / logchmod 775 $ ORACLE_HOME / network / logchown root.dba $ ORACLE_HOME / network / log /Listener.logchmod 664 $ oracle_home / network / log / listener.log --- here, installation has been basically completed. I am the ocean