Oracle 9.2.0.4 for Redhat Linux as4 Installation Process

Source: Internet
Author: User

Oracle 9.2.0.4 for Redhat Linux as4 Installation Process

Four patch packages of Oracle are stored in the oracle_sp directory.
The parameters and configuration files used for installation are stored in the scripts directory.
Put SSH and FTP service tools in the tools directory

Environment: HP dl380 G4 2cpu 1g mem 3*72g SCSI hard drive (two for RAID 1 and one for separate use)
RedHat Linux as4
Oracle 9.2.0.4 for Redhat Linux
Oracle manufacturer engineers said 9i does not support RedHat Linux as4, so the entire installation process is complicated.

Operating system user information
Root/pwd
Oracle/pwd
/Home/Oracle/. bash_profile

Partition Information
/67g
/Boot 100 m

Database Installation Directory
Oracle_base =/opt/Oracle
ORACLE_HOME =/opt/Oracle
/Opt/backup # dB bacakup file and backup scripts (/opt/backup/dbbackup. Sh)
/Opt/ora_setup # oracle9.2.0.4 for red Linux as4 setup file is in/opt/ora_setup/disk1... disk2...... disk3
/Opt/linuxas4 # Red Linux as4 setupfile in/opt/linuxas4/disk1.... disk4
/Opt/smartdb # application datafile dir
# Oracle Update file and rpm pkg in/opt/ora_setup/rpm_pk 4 File

Database Configuration Information
Noarchive
Sys/pwd
System/pwd
Lysmart/pwd
Character sets = zhs16gbk
National Character Set = utf8
DB sizing = 8 K
SGA = 360 m
PGA = 120 m
Sort area size = 64 m

Init parameters filename/opt/smartdb/SMART/pfile/Inti. ora
Spfile/opt/smartdb/SMART/dbs/spfilesmart. ora
Trace file DIR/opt/smartdb/SMART/udump.../bdump.../cdump
Controlfile/opt/smartdb/SMART/oradata/control01.ctl.../control02.ctl.../control03.ctl
System datafile/opt/smartdb/SMART/oradata/*. DBF
Application datafile/opt/smartdb/SMART/oradata/*. ora
Redo log file/opt/smartdb/SMART/oradata/redo01.log... redo04.log

Create a dedicated database
# Create tablespace
Create tablespace "smartdata" logging datafile '/opt/smartdb/SMART/oradata/smartdata. ora 'size 500 m autoextend on next 1024 K maxsize unlimited extent management local;
# Create user
Create user lysmart identified by PWD;

Appendix 1. Kernel Parameter content of the Operating System (/etc/sysctl. conf)
Appendix 2. Database User Environment Variable file content (/home/Oracle/. bash_profile)
Appendix 3. Database Installation Process
Appendix 4. Server listener. ora File Content
Appendix 5. Client tnsnames. ora File Content
Appendix 6. Partitioning of another hard disk

Appendix 1. Kernel Parameter content of the Operating System (/etc/sysctl. conf)
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl (and
# Sysctl. conf (5) for more details.

# Controls IP packet forwarding
Net. ipv4.ip _ forward = 0

# Controls source route verification
Net. ipv4.conf. Default. rp_filter = 1

# Do not accept Source Routing
Net. ipv4.conf. Default. accept_source_route = 0

# Controls the system request debugging functionality of the kernel
Kernel. sysrq = 0

# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
Kernel. core_uses_pid = 1
Kernel. Shmall = 2097152
Kernel. shmmax = 5368709120
Kernel. shmmni = 4096
Kernel. SEM = 250 32000 100 128
FS. File-max = 65536
Net. ipv4.ip _ local_port_range = 1024 65000
Net. Core. rmem_default = 262144
Net. Core. rmem_max = 262144
Net. Core. wmem_default = 262144
Net. Core. wmem_max = 262144

Appendix 2. Database User Environment Variable file content (/home/Oracle/. bash_profile)
#. Bash_profile

# Get the aliases and functions
If [-f ~ /. Bashrc]; then
.~ /. Bashrc
Fi

# User specific environment and startup programs

Path = $ pathhome/bin

Export path
Unset Username
TMP =/tmp
Export TMP
Tmpdir = $ TMP
Export tmpdir

Oracle_base =/opt/Oracle
Export oracle_base
ORACLE_HOME = $ oracle_base/product/9.2.0.4
Export ORACLE_HOME
Oracle_owner = smart
Export oracle_owner
Oracle_sid = smart
Export oracle_sid
Oracle_term = xterm
Export oracle_term
# Display = 127.0.0.1: 0.0
# Export display
Path =/usr/sbinpath
Export path
Path = $ ORACLE_HOME/binpath
Export path
# LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/lib
LD_LIBRARY_PATH = $ ORACLE_HOME/lib32oracle_home/liboracle_home/jdbc/lib
Export LD_LIBRARY_PATH
Classpath = $ ORACLE_HOME/jreoracle_home/jliboracle_home/rdbms/jlib
Export classpath
Nls_lang = american_america.zhs16gbk
Export nls_lang
Ora_nls33 = $ ORACLE_HOME/ocommon/NLS/admin/Data
Export ora_nls33
Ld_assume_kernel = 2.4.19
Export ld_assume_kernel

If [$ user = "oracle"]; then
If [$ shell = "/bin/KSh"]; then
Ulimit-P 16384
Ulimit-N 65536
Else
Ulimit-u 16384-N 65536
Fi
Fi

Appendix 3. Database Installation Process
I. preparations:
1. If as4 is installed, remember not to select firewall components during installation, otherwise the Oracle client will not be able to access the network;
2. Copy the four installation discs of as4 to the local hard disk (/opt/linuxas4/disk1.... disk4 );
3. Copy three installation discs of oracle9.2.0.4 for Linux to the local hard disk (/opt/ora_setup/disk1... disk2...... disk3 );
4. decompress the p4198954 patch package to the/opt/ora_setup/rpm_pkg directory;
5. Prepare the four patch packages required during the installation process (because there is no account, contact the Oracle engineer)
P4198954_40_linux.zip (compat-oracle-rhel4-1.0-5.i386.rpm and compat-libcwait-2.0-2.i386.rpm don't hit this patch will report a lot of errors when installing Oracle, can't find the file or something)
P3006854_9204_linux.zip)
P2617419_10102_generic.zip (for example, p2617419_210_generic.zip file, which is updated by Oracle engineers .)
P3238244_9204_linux.zip (p2617419 and p3238244 are two patches to solve the problem that the agent cannot be started)

2. Create an oracle user and DBA group
# Groupadd DBA
# Groupadd oinstall
# Useradd Oracle-G oinstall-G DBA
# Cd/OPT
# Mkdir Oracle
# Mkdir smartdb
# Cd Oracle
# Mkdir Product
# Cd product
# Mkdir 9.2.0.4
# Cd/OPT
# Chown-r oracle. DBA/OPT
# Chmod 755/OPT

3. modify Oracle user environment variables
Login with Oracle
VI/home/Oracle/. bash_profile
For more information, see appendix 2.
The variable takes effect only when you log on to the system again.

4. Modify system kernel parameters
VI/etc/sysctl. conf
For more information, see Appendix 1.
Reboot system parameters take effect

5. Install the required RPM packages in the following order (I have prepared a script for the installation on the second machine to run it directly)
Rpm-IVH/opt/linuxas4/disk4/RedHat/RPMS/sysstat-5.0.5-1.i386.rpm
Rpm-IVH/opt/linuxas4/disk3/RedHat/RPMS/openmotif21-2.1.30-11.RHEL4.2.i386.rpm
Rpm-IVH/opt/linuxas4/disk3/RedHat/RPMS/libaio-0.3.102-1.i386.rpm
Rpm-IVH/opt/linuxas4/disk3/RedHat/RPMS/libaio-devel-0.3.102-1.i386.rpm
Rpm-IVH/opt/linuxas4/disk3/RedHat/RPMS/zlib-devel-1.2.1.2-1.i386.rpm
Rpm-IVH/opt/linuxas4/disk3/RedHat/RPMS // opt/linuxas4/disk3/RedHat/RPMS/freetype-devel-2.1.9-1.i386.rpm
Rpm-IVH/opt/linuxas4/disk3/RedHat/RPMS/fontconfig-devel-2.2.3-7.i386.rpm
Rpm-IVH/opt/linuxas4/disk3/RedHat/RPMS/pkgconfig-0.15.0-3.i386.rpm
Rpm-IVH/opt/linuxas4/disk3/RedHat/RPMS/xorg-x11-devel-6.8.1-23.EL.i386.rpm
Rpm-IVH/opt/linuxas4/disk3/RedHat/RPMS/xorg-x11-deprecated-libs-devel-6.8.1-23.EL.i386.rpm
Rpm-IVH/opt/linuxas4/disk4/RedHat/RPMS/glib-devel-1.2.10-15.i386.rpm
Rpm-IVH/opt/linuxas4/disk3/RedHat/RPMS/indent-2.2.9-6.i386.rpm
Rpm-IVH/opt/linuxas4/disk4/RedHat/RPMS/ORBit-devel-0.5.17-14.i386.rpm
Rpm-IVH/opt/linuxas4/disk4/RedHat/RPMS/GTK +-devel-1.2.10-33.i386.rpm
Rpm-IVH/opt/linuxas4/disk3/RedHat/RPMS/alsa-lib-devel-1.0.6-4.i386.rpm
Rpm-IVH/opt/linuxas4/disk3/RedHat/RPMS/audiofile-devel-0.2.6-1.i386.rpm
Rpm-IVH/opt/linuxas4/disk3/RedHat/RPMS/esound-devel-0.2.35-2.i386.rpm
Rpm-IVH/opt/linuxas4/disk3/RedHat/RPMS/libjpeg-devel-6b-33.i386.rpm
Rpm-IVH/opt/linuxas4/disk3/RedHat/RPMS/libtiff-devel-3.6.1-7.i386.rpm
Rpm-IVH/opt/linuxas4/disk3/RedHat/RPMS/libungif-devel-4.1.3-1.i386.rpm
Rpm-IVH/opt/linuxas4/disk4/RedHat/RPMS/imlib-devel-1.9.13-23.i386.rpm
Rpm-IVH/opt/linuxas4/disk4/RedHat/RPMS/gnome-libs-devel-1.4.1.2.90-44.1.i386.rpm
Rpm-IVH/opt/linuxas4/disk3/RedHat/RPMS/GCC-C ++-3.4.3-9. el4.i386. rpm
RPMs-IVH/opt/ora_setup/rpm_pkg/compat-oracle-rhel4-1.0-5.i386.rpm
RPMs-IVH/opt/ora_setup/rpm_pkg/compat-libcwait-2.0-2.i386.rpm

Vi. Installation Procedure
Login with Oracle
CD/opt/ora_setup/disk1
./Runinstaller
Then it is the same as windows. The difference is that the DBA in the Oracle user group and the DBA in the root user group are required to log on to the system and execute two scripts (orainstroot. SH and root. Sh)

7. correct some tools after installation
# Su-Oracle
$ CD/opt/ora_setup/rpm_pk
$ Unzip p2617419_210_generic.zip
$ Export Path = $ path:/opt/ora_setup/opatch
$ Export Path = $ path:/sbin
$ Chmod 777/opt/ora_setup/rpm_pk/opatch
$ Unzip p3238244_9204_linux.zip
$ CD 3238244
$ Opatch apply
$ CD $ ORACLE_HOME/Network/lib
$ Make-F ins_oemagent.mk install
$ Agentctl start

When dbca, netca, and netmgr are running, errors occur.
JRE was not found in/opt/Oracle/product/9.2.0.4/oracle. SWD. JRE/bin/i386/native_threads/JRE
Ln-S/opt/Oracle/product/9.2.0.4/oracle. SWD. JRE/bin/i386/native_threads/Java
/Opt/Oracle/product/9.2.0.4/oracle. SWD. JRE/bin/i386/native_threads/JRE
After the connection is reconnected, dbca/netca can run normally. When netmgr comes to the UI, it ignores it and directly configures listener. ora. The file content is attached to it.

8. Create an instance with dbca (this is nothing to say, just define the file paths as planned)

9. Automatic startup of database instances and listeners
Create six files in the/opt/scripts directory: Start Stop start-listener start-Oracle stop-listener stop-Oracle
Start content
/Opt/scripts/start-listener
/Opt/scripts/start-Oracle

Stop content
/Opt/scripts/stop-listener
/Opt/scripts/stop-Oracle

Start-listener content
Su-Oracle-c "LSNRCTL start"

Stop-listener content
Su-Oracle-c "LSNRCTL stop"

Start-Oracle content
Su-Oracle-c "sqlplus" <!
Connect/As sysdba
Startup
Exit
!

Stop-Oracle content
Su-Oracle-c "sqlplus" <!
Connect/As sysdba
Shutdown immediate
Exit
!

# Chmod 755/opt/scripts /*
# Cd/etc/rc. d/rc5.d
Create an s99ora9i File
Content:
/Opt/scripts/start

# Cd/etc/rc. d/rc0.d
Create a k99ora9i File
Content:
/Opt/scripts/stop

Because I chose to install the firewall when installing as4 and did not know how to disable it, I had to ask the system to stop it with the command line at startup. The operation is as follows:
Edit the/etc/rc. d/rc. Local file and add a line after the file: Service iptalbes stop

Appendix 4. Server listener. ora File Content
# Listener. ora network configuration file:/opt/Oracle/product/9.2.0.4/Network/admin/listener. ora
# Generated by Oracle configuration tools.

Listener =
(Description_list =
(Description =
(Address_list =
(Address = (Protocol = TCP) (host = smartserver01) (Port = 1521 ))
)
(Address_list =
(Address = (Protocol = IPC) (Key = kmytest ))
)
)
)

Sid_list_listener =
(Sid_list =
(Sid_desc =
(Sid_name = plsextproc)
(ORACLE_HOME =/opt/Oracle/product/9.2.0.4)
(Program = EXTPROC)
)

(Sid_desc =
(Global_dbname = smart.com)
(ORACLE_HOME =/opt/Oracle/product/9.2.0.4)
(Sid_name = smart)
)

)

Appendix 5. Client tnsnames. ora File Content
# Tnsnames. ora network configuration file: D:/Oracle/ora92/Network/admin/tnsnames. ora
# Generated by Oracle configuration tools.

LJM =
(Description =
(Address_list =
(Address = (Protocol = TCP) (host = LJM) (Port = 1521 ))
)
(CONNECT_DATA =
(SID = mydata)
)
)

Kkk =
(Description =
(Address_list =
(Address = (Protocol = TCP) (host = smartserver01) (Port = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = smart.com)
)
)

Appendix 6. Partitioning of another hard disk
# Cd/dev/CCISS
[Root @ smartserver01 CCISS] # ls
C0d0 c0d0p1 c0d0p2 c0d1
# C0d0 indicates the first SCSI hard disk, which is installed in the operating system and divided into c0d0p1 and c0d0p2.
# C0d1 indicates the second hard disk to be partitioned
[Root @ smartserver01 CCISS] # fdisk c0d1

The number of cylinders for this disk is set to 17433.
There is nothing wrong with that, but this is larger than 1024,
And coshould in certain setups cause problems:
1) software that runs at boot time (e.g., old versions of lilo)
2) booting and partitioning software from other OSS
(E.g., DOS fdisk, OS/2 fdisk)

Command (M for help): n
Command action
E extended
P primary partition (1-4)
P
Partition Number (1-4): 2
First cylinder (1-17433, default 1): 1
Last cylinder or + size or + sizem or + sizek (1-17433, default 17433): 17433

Command (M for help): W
The partition table has been altered!

Calling IOCTL () to re-read partition table.
Syncing disks.
[Root @ smartserver01 CCISS] # Mount c0d1p2/disk2
[Root @ smartserver01 CCISS] # ls/disk2
Lost + found ttt
[Root @ smartserver01 CCISS] # umount/disk2
[Root @ smartserver01 CCISS] # mkfs-T ext3 c0d1p2
# Remember to redo the File System After partitioning, otherwise the original file system information will remain
Mke2fs 1.35 (28-feb-2004)
Max_blocks 4294967295, rsv_groups = 0, rsv_gdb = 1024
Filesystem label =
OS type: Linux
Block size = 4096 (log = 2)
Fragment size = 4096 (log = 2)
8896512 inodes, 17781656 Blocks
889082 blocks (5.00%) reserved for the Super User
First data block = 0
Maximum filesystem blocks = 20971520
543 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768,983 04, 163840,229 376, 294912,819 200, 884736,160 5632, 2654208,
4096000,796 11239424

Writing inode tables: Done
Inode. I _blocks = 106504, I _size = 4243456
Creating Journal (8192 blocks): Done
Writing superblocks and filesystem accounting information: Done

This filesystem will be automatically checked every 28 mounts or
180 days, whichever comes first. Use tune2fs-C or-I to override.
[Root @ smartserver01 CCISS] #
[Root @ smartserver01 CCISS] #
[Root @ smartserver01 CCISS] # Mount c0d1p2/disk2
[Root @ smartserver01 CCISS] # ls/disk2
Lost + found
[Root @ smartserver01 CCISS] # DF-K
Filesystem 1k-blocks used available use % mounted on
/Dev/mapper/VolGroup00-LogVol00
67862104 11215476 53199436 18%/
/Dev/CCISS/c0d0p1 101086 12303 83564 13%/boot
None 517344 0 517344 0%/dev/SHM
/Dev/CCISS/c0d1p2 70009904 86080 66367496 1%/disk2

 

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.