oracle| to install Oracle 8i on Linux
(Note: Refer to http://vip.6to23.com/hanson/htdocs/oracle.htm and make corrections during installation)
There's been a lot of discussion about Oracle installation, but in practice you always have some trouble, so I'll leave my two cents. The environment discussed in this article is based on the Redhat Linux 9.0.93,
Oracle's version number is 8.1.7.0.1.
Download software
Suppose you already have a machine running Redhat, and it meets Oracle 8i hardware requirements, and has network connectivity, download other required software below. First download Linux in OTN
81701.tar and glibc-2.1.3-stubs.tar.gz, in addition to:
Since Oracle has the JRE 1.1.8, it is not necessary to install it separately, assuming that all the software described above is in the/tmp directory.
(Note: You also need to download JDK 1.4.2 from the Java official website for recovery, I installed REDHAT9 did not find JDK 1.4.2, download location: Http://java.sun
. com/j2se/1.4.2/download.html)
Installing GLIBC, JDK, and Binutils
Su
CD/
Tar zxvf/tmp/i386-glibc-2.1-linux.tar.gz
Cd/usr/bin
MkDir saved
MV GCC cc LD saved
Ln-s/USR/I386-GLIBC-2.1-LINUX/BIN/I386-GLIBC21-LINUX-GCC GCC
Ln-s GCC cc
Ln-s/usr/i386-glibc-2.1-linux/bin/i386-glibc21-linux-ld LD
(Note: The installation of Oracle during the discovery of/usr/bin/ld become unlinked, you need to reset, otherwise there will be a connection error!) )
(Note: There is no Java installed without this directory, you need to Mkdir/usr/java first)
Cd/usr/java
Tar jxvf/tmp/jdk118_v3-glibc-2.1.3.tar.bz2
Ln-s/usr/java/jdk118_v3/usr/local/java
(Note: The original is Ln-s Jdk118_v3/usr/local/java, later found that the link is not correct)
(Note: Go to the Software placement directory before installing cd/tmp)
RPM-UVH--force--nodeps binutils-2.10.91.0.2-3.i386.rpm
(Note: After executing this command,/USR/BIN/LD becomes unlinked and needs to be reset, otherwise there will be a connection error!) )
Creating Users and Groups
Groupadd Oinstall
Groupadd dba
Groupadd Oper (note: This group is not used, can be removed, the following useradd should be removed accordingly)
useradd-d/oracle-g oinstall-g Dba,oper Oracle (Note: This is a/oracle directory for Oracle users,/home/oracle is the default)
passwd Oracle
Chown-r oracle.dba/oracle
chmod 750/oracle
Ready to install
Vi/oracle/.bash_profile (Note: The default is/home/oracle/.bash_profile because the/oracle directory is previously set for Oracle)
Modified to read as follows:
(Note: Content starts, you can modify this file in a non-Linux environment, but the file will be wrapped in only 0 A, remove all 0D)
#. Bash_profile
# get the aliases and functions
If [f ~/.BASHRC]; Then
. ~/.bashrc
Fi
# User specific environment and startup programs
Unset USERNAME
Umask 022
Export Editor=vi
Export Term=xterm
Export Tmpdir=/tmp
# Setup Installation Environment
Export ORACLE_SID=ORCL
Export Oracle_base=/oracle
Export Oracle_home= $ORACLE _base/product/8.1.7
Export Ld_library_path= $ORACLE _home/lib:/usr/i386-glibc-2.1-linux/i386-glibc-linux/lib:/lib:/usr/lib:/lib:/usr/ Local/lib (Note: This line should be deleted when resuming)
386-glibc-2.1 's Path)
Export Shlib_path= $ORACLE _home/lib:/usr/lib:/lib:/usr/local/lib
Export Libpath= $ORACLE _home/lib:/usr/lib:/lib:/usr/local/lib
Export tns_admin= $ORACLE _home/network/admin
Export Nls_lang=american_america. We8iso8859p1
Export ora_nls33= $ORACLE _home/ocommon/nls/admin/data
Export Oracle_owner=oracle
Export Oracle_term=xterm
Export gcc_exec_prefix=/usr/i386-glibc21-linux/lib/gcc-lib/
Export ld_assume_kernel=2.4
Export Java_home=/usr/local/java
Export classpath= $ORACLE _home/jdbc/lib/classes111.zip: $ORACLE _home/jre: $ORACLE _home/jlib: $ORACLE _home/rdbms/ Jlib: $ORACLE _home/network/jlib:.
(Note: The end of the content, pay attention to the content of export on the same line, classpath behind the classesxxx.zip suggest to check it, I am here xxx is 111, the path is separated by a colon instead of a semicolon)
Su Oracle
. . bash_profile
Export lang=en
Cd/tmp
Tar xvf Linux81701.tar
One of the export lang=en is to prevent the interface black to make a group.
(Note: At this time it is best to check the/USR/BIN/LD link is correct: ls-l/usr/bin/ld, should link to/usr/i386-glibc-2.1-linux/bin/i386-glibc21-linux-ld, otherwise heavy
Before the practice, first rm/usr/bin/ld, and then Ln. In addition, it is recommended to check all the links previously set:/usr/bin/gcc,/usr/bin/cc,/usr/local/java, dark red indicates incorrect links.
Start installation
./disk1/runinstaller
Click Next; Enter Oinstall in UNIX Group Name; a prompt box is required to perform orainstroot.sh, then another terminal is opened:
Su
CD $ORACLE _home
./orainstroot.sh
Go back to the GUI, press Retry, select Install Enterprise Edition, select a typical installation, choose to use an already existing repository, and select the location of the JDK (note:/usr/local/java);
Do you want to create a new database without; Continue, wait for a while; a prompt box is required to perform root.sh; back to Terminal:
(Note: It is recommended to choose a custom installation, so that you can add supported languages, such as Simplified Chinese, etc., the connection process if the error, please press the "processing error" followed, I did not encounter errors)
VI root.sh
Revise according to the following requirements: line 98th, change sed=/usr/local/bin/sed to sed=/bin/sed; line 102th, change rmf=/bin/rm–f to rmf= "/bin/rm-f"; line 156th, turn ruid= '/usr
Handling Errors
(Note: The possibility of an error is that the/USR/BIN/LD link is changed, remember to change after installing binutils-2.10.91.0.2-3.i386.rpm)
A prompt box appears, saying error in invoking target relink of makefile/oracle/product/8.1.7/precomp/lib/ins_precomp.mk or error in Invokin Target G
Relink of Makefile/oracle/product/8.1.7/rdbms/lib/ins_rdbms.mk, back to Terminal:
Exit
CD $ORACLE _home
Tar zxvf/tmp/glibc-2.1.3-stubs.tar.gz
./setup_stubs.sh
When the link is finished, go back to the GUI, press Retry, wait until the installation is complete, and the Net8 Configuration Wizard, which starts automatically after completion, does not respond, kill.
Recover other software
Su
RPM-E--nodeps bintutils-2.10.91.0.2-3
RPM-IVH/MNT/CDROM/REDHAT/RPMS/BINUTILS-2.13.90.0.18-9.I386.RPM (Note: If it is downloaded, the location may not be the same)
Cd/usr/local
RM Java
(Note: supplementary start)
Install Java
1, #cp J2sdk-1_4_2_05-linux-i586-rpm.bin to/usr/local
2. #chmod 755 J2sdk-1_4_2_05-linux-i586-rpm.bin
3, #./j2sdk-1_4_2_05-linux-i586-rpm.bin (solve j2sdk-1_4_2_05-linux-i586.rpm)
4. #rpm-IVH j2sdk-1_4_2_05-linux-i586.rpm
RPM installation is very convenient, do not bless.
(Note: Supplemental closure)
Ln-s/usr/java/j2sdk1.4.2_05 Java
(Note: The original is j2sdk1.4.2_01, I now downloaded from the net is j2sdk1.4.2_05, recommended after the installation of their own to check. I used the "Ln-s/usr/java/j2sdk1.4.2_05/usr/local/.
Java ", worried about coming out of the link wrong situation)
Cd/usr/bin
RM GCC cc LD
mv./saved/*.
RmDir saved
Cd/usr/lib
mv./saved/*.
RmDir saved
The glibc portion of the Oracle User environment variable Ld_library_path is then deleted.
Creating a Database
Exit
CD $ORACLE _home/bin
Unset LANG
Unset Nls_lang
./dbassist
Choose to create a database, custom, multipurpose, Next, shared server mode, remove all options (a huge amount of time to create Jserver), set the global database name and SID, and assume that the global database name is TestDB
, SID is ORCL; change Character set: Character set is UTF8, national character set is ZHS16GBK; six times next;
Configure Net8
./NETCA
Using NETCA is because NETASST always has no response, let's despise it. Select listener configuration; add; listener name use default LISTENER; three next steps.
The previous step is the editing of the $ORACLE _home/network/admin/listener.ora:
# Copyright (c) 1997 by the Oracle Corporation
#
LISTENER =
(address_list=
(Address= (PROTOCOL=TCP) (Host=localhost) (port=1521))
(Address= (PROTOCOL=IPC) (Key=extproc))
Among them Global_dbname, sid_name, and oracle_home vary according to the actual situation.
Manually start the database and listen
Vi/etc/oratab
Change the last N to Y.
./dbstart
./lsnrctl Start
Set up a service
Su
Cd/etc/init.d
VI Oracle
(Note: Content started, can be generated in non-Linux environment and then copied past, note to remove 0D characters)
#!/bin/bash
#
# Startup script for Oracle and listener
#
# CHKCONFIG:35 99 1
# description:oracle 8.1.7.0.1
# Setup environment for script execution.
. /oracle/.bash_profile (Note: Changes to the directory set for an Oracle user need to be changed here)
Starting and closing using startup scripts
/etc/init.d/oracle start
/etc/init.d/oracle stop
(Note: The installation configuration is complete and the Oracle service will automatically start/stop each time the system is started/shutdown)
(Note: Some situations will prompt for insufficient permissions, instead of the root operation, as to which step should use the Oracle which step should use root, the operation process depends on, recommended priority to use Oracle)
Reference tool: Winscp366setup.exe-setup for WinSCP 3.6.6 (scp/sftp Client for Windows) to connect to Linux and manipulate files under Windows
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.