Install Oracle 8i on Linux
(Note: Quote
Http://vip.6to23.com/hanson/htdocs/oracle.htm, do some corrections during the installation process)
There are many discussions about Oracle installation, but you will always meet some troubles in practice, so I will leave my two points. The environment discussed herein is based on Redhat Linux 9.0.93.
Oracle's version number is 8.1.7.0.1.
Download software
Suppose you already have a machine running the Redhat, and it meets the relevant requirements for the hardware, and has a network connection, downloading other required software below. First download Linux in OTN
81701.TAR and GLIBC-2.1.3-stubs.tar.gz, and also need:
I386-glibc-2.1-linux.tar.gz (download location:
http://ftp.valinux.com/pub/suppo ... c-2.1-linux.tar.gz)
Binutils-2.10.91.0.2-3.i386.rpm (download location:
http://mirrors.usc.edu/pub/linux ... S / I386 / RedHat / RPMS /
Binutils-2.10.91.0.2-3.i386.rpm)
(Redhat comes with binutils-2.13.90.0.18-9.i386.rpm for recovery, download location:
Http://mirrors.usc.edu/pub/linux ... T / redhat / linux / 9 / en
/ os/i386/redhat/rpms/compat-gcc-7.3-2.96.118.i386.rpm)
JDK118_V3-glibc-2.1.3.tar.bz2 (download location:
http://ftp.dk.xemacs.org/pub/lan ... LIBC-2.1.3.tar.bz2)
Because Oracle comes with JRE 1.1.8, it is not necessary to install it separately, assuming that the software described above is placed on the / TMP directory.
(Note: JDK 1.4.2 needs to be downloaded from Java official website to recover, I installed RedHat9 did not find JDK 1.4.2
, Download location:
http://java.sun
.com / j2se / 1.4.2 / download.html)
Install 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: Discover / usr / bin / ld in the installation Oracle to become a non-link, you need to reset, otherwise the connection error will occur!)
CD / USR / LIB
Mkdir Saved
MV libc.so libdl.so libm.so libpthread.so saved
MV libc.a libdl.a libm.a libpthread.a saved
(Note: There is no such directory without installed Java, you need MKDIR / USR / JAVA)
CD / USR / Java
TAR JXVF / TMP/JDK118_V3-GLIBC-2.1.3.tar.bz2
Ln -s / usr / java / jdk118_v3 / usr / local / java (Note: It turned out to be ln -s jdk118_v3 / usr / local / java, and later found that the link is incorrect)
(Note: Go to the software before installation CD / TMP)
RPM -UVH --force --Nodeps binutils-2.10.91.0.2-3.i386.rpm
(Note: After executing this command / usr / bin / ld becomes a non-link, you need to reset, otherwise the connection is wrong!)
Create users and groups
GroupAdd OinsTall
GroupAdd DBA
GroupAdd Oper (Note: This group is not used, you can remove it, the following UserAdd should be removed)
UserAdd -d / Oracle -g OinsTall -G DBA, Oper Oracle (Note: This is set to Oracle User Setting / Oracle Directory, the default is / home / oracle)
Passwd oracle
Chown -r oracle.dba / oracle
CHMOD 750 / ORACLE
Preparation installation
Vi / Oracle/.bash_profile (Note: Because the Oracle Setting / Oracle Directory, the default is /Home/oracle/.bash_profile)
Modify to the following:
(Note: The content begins, you can modify this file in a non-Linux environment, but the file in this file can only be 0A, to remove all 0D)
# .BASH_PROFILE
# Get the aliases and functions
IF [-f ~ / .bashrc]; then
. ~ / .bashrc
Fi
# User specific Environment and Startup Programs 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: When this is restored I have to delete I
386-GLIBC-2.1 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 / Admin / 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.4export 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: At the end of the content, pay attention to the contents of Export on the same line, the classsesxxx.zip behind the classpath suggests to check it yourself, I here XXX is 111, the path is separated by colon rather than a semicolon)
Su Oracle
.bash_profile
EXPORT LANG = EN
CD / TMP
Tar xvf linux81701.tar
Where Export Lang = EN is to prevent the interface from making a group.
(Note: It is best to check whether the / usr / bin / ld link is correct: ls -l / usr / bin / ld, should be linked to /usr/i386-glibc-2.1-linux/bin/i386-glibc21 -linux-ld is only correct, otherwise
Repeated pioneering practice, first RM / USR / BIN / LD, then ln. In addition, it is advised to check the previous links of the previous settings: / usr / bin / gcc, / usr / bin / cc, / usr / local / java, dark red representation link is incorrect)
start installation
./Disk1/runinstaller
Click Next; enter Oinstall in UNIX Group Name; a prompt box appears to perform ORAINSTROOT.SH, then open a terminal:
SU
CD $ ORACLE_HOME
./orainstroot.sh
Back to GUI, press Retry; select Install Enterprise Edition; choose a typical installation; choose to use a place already existing repository; select the JDK position (Note: should be / usr / local / java); ask
Do you want to create a new database, don't use; continue, wait for a while; a prompt box requests to perform root.sh; return to the terminal:
(Note: It is recommended to choose a custom installation, which adds supported languages, such as Simplified Chinese, etc. If the connection process is wrong, please press the "Processing Error" later, I did not encounter an error)
Vi root.sh
Modify by the following: Chapter 98, change the sed = / usr / local / bin / sed to SED = / bin / sed; 102 line, change RMF = / bin / rm -f to RMF = "/ bin / RM-F "; 156th line, put ruid =` / usr
/ bin / ID | $ awk -f / ('{print $ 2}' | $ awk -f /) '{print $ 1} `Change to RUID =` / usr / bin / id | $ awk -f / (' { Print $ 2} '| $ awk -f /)' {Print $ 1} '`.
./root.sh
Return to the car; return to GUI, press OK.
Handling error
(Note: The possibility of error is that the / usr / bin / ld link is changed, remember to change after installing binutils-2.10.91.0.2-3.i386.rpm), there is a prompt box, say Error Invoking Target relink of makefile /oracle/product/8.1.7/prechacomp/lib/ins_precomp.mk or error in invoking target
Relink of makefile /oracle/product/8.1.7/rdbms/lib/ins_rdbms.mk, back to the terminal:
exit
CD $ ORACLE_HOME
TAR ZXVF / TMP/GLIBC-2.1.3-Stubs.tar.gz
./setup_stubs.sh
After the link is completed, return to the GUI, press Retry; wait until the installation is complete; the NET8 configuration wizard that is automatically started after completion is not reactive, KILL.
Restore other software
SU
RPM-E --Nodeps bintILS-2.10.91.0.2-3
Rpm -ivh / mnt/cdrom/redhat/rpms/binutils-2.13.90.0.18-9.i386.0.18-9.i386.rpm (Note: If downloaded, the location may not be different)
CD / usr / local
RM Java
(Note: Supplement 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 (Drafter J2SDK-1_4_2_05-Linux-I586.rpm)
4, # rpm -ivh j2sdk-1_4_2_05-linux-i586.rpm
RPM installation is very convenient, no blessed.
(Note: End of complement)
Ln -s /usr/java/j2sdk1.4.2_05 java
(Note: It turned out to be J2SDK1.4.2_01, I now downloaded J2SDK1.4.2_05, it is recommended to check it yourself after installation. I use "ln -s /usr/java/j2sdk1.4.2_05 / USR / LOCAL /
"Java", worrying about the situation of linked links)
CD / usr / bin
RM GCC CC LD
mv ./saved/*.
RMDir Saved
CD / USR / LIB
mv ./saved/*.
RMDir Saved
Then delete the part of the GLIBC in the Oracle User Environment Variable LD_Library_path.
Create a database
exit
CD $ ORACLE_HOME / BIN
Unset LANG
Unset NLS_LANG
./dbassist
Select Create a database; custom; multi-purpose; next step; share server mode; remove all options (creating JServer's time is long); set the global database name and SID, assume the global database name TESTDB
, SID is ORCL; changing the character set: The character set is UTF8, the national character set is zhs16GBK; six next step; completed.
Configure Net8
./Netca
Using Netca because Netasst always does not respond, let us despise it. Select the listener configuration; add; listen to the program name Use the default listener; three next steps.
The above steps are the editor of $ 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))))
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(Global_dbname = TESTDB)
(SID_NAME = ORCL)
(Oracle_Home = / Oracle / Product / 8.1.7)
)
)
Where global_dbname, SID_NAME, and Oracle_Home are different from the actual situation.
Manual start database and listening
VI / ETC / ORATAB
Change the last N to Y.
./dbstart
./lsnrctl start
Set up service
SU
CD /etc/init.d
Vi Oracle
(Note: The content begins, can be generated in a non-Linux environment and then copy the past, pay attention to the 0D character)
#! / 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: There is a change in the directory set by Oracle users)
Case "$ 1" in
START)
Echo "Starting Oracle Database (S) listed in / etc / oratab ..."
Sleep 2
Su - Oracle-C "$ Oracle_Home / Bin / DBStart"
Echo "Starting TNS Listener ..."
Sleep 2
Su - Oracle-C "$ Oracle_Home / Bin / LSNRCTL START"
Touch / Var / Lock / Subsys / Oracle
;
STOP)
echo "stopping tns listener ..."
Sleep 2
Su - Oracle-C "$ Oracle_Home / Bin / LSNRCTL STOP"
Echo "stopping Oracle Databases (S) listed in / etc / oracab ..."
Sleep 2
Su - Oracle-C "$ Oracle_Home / Bin / DBSHUT"
RM -F / VAR / LOCK / SUBSYS / ORACLE
;
STATUS
PS -AX | GREP -E ORA_ -E TNSLSNR
;
*)
Echo "Usage: Oracle {Start | Stop | Status}"
EXIT 1
ESAC
EXIT 0
(Note: End of content)
Chmod 700 /etc/init.d/oracle
/ sbin / chkconfig --Add Oracle
Use the startup script to start and close
/etc/init.d/oracle start
/etc/init.d/oracle stop
(Note: When this installation configuration is complete, the Oracle service will automatically start / stop each time you start / turn off the system. (Note: Some cases will prompt the permissions, change the root operation, what should I use in Oracle which step? Using root, it is recommended to use the situation during the operation, it is recommended to use Oracle
Reference Tool: Winscp366Setup.exe - Setup for WinsCP 3.6.6 (SCP / SFTP Client for Windows), used to connect to Linux and operate files under Windows