Author: Mr. Nice Guy
Reference document: http://www.puschitz.com/installingoracle9i.shtml
In addition, refer to an installation document on 9CBS, thank you!
Disclaimer: This article can be reproduced any, but please keep the above information
============================================================================================================================================================================================================= =========================
Oracle is the most widely used database in the world, which can run on a variety of computers; is also the current best relational database. Previously, one to no contact. These two days, just right. Just put it over it on your computer, I took some of her charm!
First, ready to work
1. Download Oracle 9i for Linux source package (a total of three cpio.gz files: lnx_920_disk1.cpio.gz, lnx_920_disk2.cpio.gz, lnx_920_disk3.cpio.gz)
2. Download the patch. At least four patches are required:
[quote: 84109dc8dd] p3095277_9204_linux.zip 9.2.0.4.0 upgrade patch package.
P3006854_9204_linux.zip hit before running Runinstaller.
P3119415_9204_linux.zip hits after upgrading to 9.2.0.4.0.
P2617419_210_Generic.zip hits 3119415 patch required. [/ quote: 84109dc8dd]
These patch files can be searched on Google, where P3095277_9204_linux.zip This patch has more than 300 m, I have found a domestic download station online, with more than 30 k / sec. In addition, some people were packaged on ITPub. http://www.itpub.net/showthread.php?s=&threadid=171693&perpage=15&pagenumber=1
3. Modify the kernel parameters
[quote: 84109dc8dd] #echo "kernel.sem = /" 250 32000 100 128 / "" >> /etc/sysctl.conf
#echo "kernel.shmmmax = 2147483648" >> /etc/sysctl.conf[/quote:84109dc8dd]
The 250, 32000, 100, 128 in the first command correspond to the four core parameters of SEMMSL, SEMMNS, SEMOPM, and Semmni, respectively.
The above is a typical core parameter configuration. You may need to make appropriate changes based on your actual environment.
4. Check setting
[quote: 84109dc8dd] # More /etc/sysctl.conf | grep kernel.s
Kernel.sysrq = 0
Kernel.shmmax = 2147483648
Kernel.sem = "250 32000 100 128" [/ quote: 84109dc8dd] 5. Check if the RPM package required to install is complete, confirm that the following RPM packages have been installed (if you have selected software development, then basically below The column package has been installed, if not installed, most of the third disc is installed, pay attention to the order when installing)
[quote: 84109dc8dd] # rpm -qa | grep compat
Compat-GCC-7.3-2.96.122
Compat-libstdc - DEVEL-7.3-2.96.122
COMPAT-GCC-C - 7.3-2.96.122
Compat-libstdc - 7.3-2.96.122
Compat-glibc-7.x-2.2.4.32.5
Compat-DB-4.0.14-5
# Rpm -qa | GREP OpenMotif
OpenMotiF-2.2.2-16
OpenMotif-Devel-2.2.2-16
# Rpm -qa | grep setarch
Setarch-1.3-1 [/ quote: 84109dc8dd]
6. Replace the GCC, G to version 2.96.
[quote: 84109dc8dd] # mv / usr / bin / gcc / usr / bin / gcc323
# Ln -s / usr / bin / gcc296 / usr / bin / gcc
# Mv / usr / bin / g / usr / bin / g 323
# Ln -s / usr / bin / gcc296 / usr / bin / gcc
[/ quote: 84109dc8dd]
7. Set user and environment variables, install the target path
a. Increase users and groups
[Quote: 84109dc8dd] GroupAdd DBA # Create Database Administrator Group
GroupAdd OinsTall # Create all groups of Oracle files
UserAdd -c "Oracle Software Owner" -g oinstall -g DBA Oracle # Create an Oracle user
Passwd Oracle # Sets the password for Oracle users [/ quote: 84109dc8dd]
b. Create a installation target path
[quote: 84109dc8dd] MKDIR / OPT / ORACLE
MKDIR / OPT / ORACLE / PRODUCT
Mkdir /opt/oracle/product/9.2.0
Chown -r oracle.oinstall / OPT / ORACLE
MKDIR / VAR / OPT / ORACLE
Chown Oracle.dba / Var / OPT / ORACLE
CHMOD 755 / VAR / OPT / ORACLE [/ quote: 84109dc8dd]
c. Set environment variables
[quote: 84109dc8dd] Su - Oracle
Vi .bash_profile Add to the following
Export ld_assume_kernel = 2.4.1 # This parameter must be specified, otherwise the Java installation interface cannot start, this parameter is actually to avoid the problem of NPTL (Nature Posix Thread Library) and Oracle applications on Linux.
# Oracle Environment
Export oracle_base = / opt / oracle
Export Oracle_Home = / OPT / ORACLE / Product / 9.2.0
Export Oracle_sid = TEST
Export Oracle_Term = xterm
# @ Export tns_admin = set if sqlnet.ora, tnsnames.ora, etc. Are Not in $ Oracle_Home / Network / AdminExport NLS_LANG = American;
Export ORA_NLS33 = $ Oracle_Home / Ocommon / NLS / Admin / Data
LD_LIBRARY_PATH = $ ORACLE_HOME / LIB: / LIB: / USR / LIB
LD_LIBRARY_PATH = $ LD_LIBRARY_PATH: / USR / local / LIB
Export ld_library_path
# Set shell search paths
Export path = $ PATH: $ oracle_home / bin
Then execute
$ SOURCE .BASH_PROFE # Let the configuration file take effect [/ quote: 84109dc8dd]
8. Set SWAP and temporary folders
Oracle is relatively high in memory and SWAP. Oracle recommends that the Oracle 9i server requires at least 512M memory, twice the memory or not less than 400m. Switch space. If you don't have enough switched space or memory, your Oracle server will become very dressed during the database creation process. My memory is only 256m, 512M SWAP. Here, I added a new 1000m SWAP.
[quote: 84109dc8dd] Su - root
DD if = / dev / zero of = tmpswap BS = 100M count = 10
CHMOD 600 TMPSWAP
MKSWAP TMPSWAP
Swapon tmpswap [/ quote: 84109dc8dd]
In addition, the installation of Oracle requires at least 400m / TMP temporary space. If the space under / tmp is not enough, you can temporarily create a / tmp directory in another file system.
[quote: 84109dc8dd] Su - root
Mkdir /
Chown root.root /
Chmod 1777 /
Export Temp = /
Export tmpdir = /
When Oracle is installed, turn off Oracle and delete the temporary directory:
[quote: 84109dc8dd] Su - root
RMDIR /
Unset Temp
Unset tmpdir [/ quote: 84109dc8dd]
Oracle Disk Space (SIZING ORACLE DISK SPACE)
Only the database software is installed, approximately 2.5g of disk space. If you perform a standard database installation instead of a custom installation, it takes about 3.5G.
9. Unpack the installation file.
Copy the downloaded file to / TMP. It is best to extract with root identity, otherwise it may be reported.
a. Unzip
Gunzip lnx_920_disk1.cpio.gz lnx_920_disk2.cpio.gz lnx_920_disk3.cpio.gz
b. Unpack
[quote: 84109DC8DD] CPIO -IDMV CPIO -IDMV CPIO -IDMV Second, install 1. Play the first patch. Before running RunInstaller, you need to play patch 3006854: Note that you must run as root. [quote: 84109dc8dd] # unzip p3006854_9204_linux.zip [/ quote: 84109dc8dd] Will create a directory in the current directory, enter the directory [quote: 84109dc8dd] # CD 3006854 #CHMOD X * .sh #./Rhel3_pre_install.sh[/quote:84109dc8dd] 2. Execute XHOST as root If you execute as Oracle, a prompt can be prompted to connect to the display 0.0. 3. Running Runinstall (exciting moments!) Su - Oracle / TMP / Disk1 / RuninStaller (there is no need to enter the folder of the Disk1.). According to the prompt to install it, you will prompt you, there is a place to be a group name, type Oinstall, In another place, the database name and SID are added, please fill in the ORCL. You will also prompt you to execute a script as a root, press Ctrl Shift N to open a terminal window, then execute / tmp / one .sh file. In addition, the Relink phase will report two errors: IGNORET.MK and INS_CTX.MK. Point Ignore ignore, upgrade to 9.2.0.4 after installation to eliminate this bug. 4. Upgrade Unpacking: UNZIP P3095277_9204_Linux.zip Cpio -icvd <9204_lnx32_release.cpio This place is best to unpack with root, otherwise you may also prompt you for insufficient permissions. You can now run RunInstaller again, you must first upgrade the OUI (the last option), otherwise it is not allowed to upgrade to 9.2.0.4. Moreover, after the upgrade OUI, you must exit the OUI and then re-run Oui, then upgrade to 9.2.0.4. No exiting Continue The upgrade will report an error. In the upgrade process, an INS_OEMAGENT.MK error will still appear, point IGNORE ignore (can be solved by the following patch). Then you will prompt you to perform a script in an / OPT with root, you can do a terminal, you can perform it with root. 5. Patch [quote: 84109dc8dd] Su - Oracle $ Unzip p3119415_9204_linux.zip $ CD 3119415 $ Export path = $ PATH: / TMP / OPATCH $ Export path = $ path: / sbin # The patch Needs "fuse" Which is located in / sbin $ Which Opatch / TMP / OPATCH / OPATCH $ OPATCH APPLY [/ quote: 84109dc8dd] There is a problem in this place, you need to pay attention to the use of Oracle identity, you may be insufficient, unzipped with root, then use Oracle identity to execute it, you can decompress it, you use root to decompress the CHMOD 777 3119415, then Su - Oracle / TMP / OPATCH / OPATCH APPLY is OK. Ok, I'm big me! Run the dbca command to create a database, and there is a document that may be wrong. To modify the DBCA file to solve, I didn't encounter this problem. If you encountered Google to find relevant documents, To solve this problem. Third, sweeping battlefield and experiment 1. Delete temporary files (these temporary files are nearly 3G, don't need me to say deleted meaning?) [quote: 84109dc8dd] CD / TMP Rm -rf * [/ quote: 84109dc8dd] 2. Remove the version of GCC, G , otherwise there may be problems when compiling after installing other software later [quote: 84109dc8dd] # mv / usr / bin / gcc323 / usr / bin / gcc # Mv / usr / bin / g 323 / usr / bin / g [/ quote: 84109dc8dd] 3. Connect the database and check your labor results! [quote: 84109dc8dd] Su - Oracle Oracle $ SQLPLUS / NOLOG SQL> Connect / as sysdba SQL> Startup [/ quote: 84109dc8dd] SQL> You can use create table to create a database, just as the MYSQL prompt. If you only test the server, it is not a production server. Don't forget to turn your SQL> prompt to turn off the database, otherwise, the shutdown process will become very long. Ok, let's write so much, if you have any questions during the installation process, welcome to communicate with me.