RedHat Linux as4 install Oracle 10g (10.2)

Source: Internet
Author: User

RedHat Linux as4 install Oracle 10g (10.2)
1. Hardware requirements
(1) memory> 1024 MB
Memory swap Partition
> 1024 MB 2 times memory
<2048 MB 1.5 times memory
<8192 MB 1 times memory
> 8192 MB 0.75 times memory
Display memory commands
2)/tmp> 400 m
3) detection command
Memory
# Grep memtotal/proc/meminfo
Swap Partition
# Grep swaptotal/proc/meminfo
/Tmp Partition
# DF-k/tmp
CPU Information
# Grep "model name"/proc/cpuinfo
2. software requirements
1) Operating System
Red Hat Enterprise Linux as/es 3.0 (Update 4 or later)
Red Hat Linux 4.0
SuSE Linux Enterprise Server 9.0
Asianux 1.0
Asianux 2.0
2) Kernel
Red Hat Enterprise Linux 3.0 and Asianux 1.0
2.4.21-27.el
Red Hat Enterprise Linux 4.0 and Asianux 2.0
2.6.9-5.el
SuSE Linux Enterprise Server 9.0
2.6.5-7.201
3) specific package
Red Hat Enterprise Linux 3.0 and Asianux 1.0

Make-3.79.1
Gcc-3.2.3-34
Glibc-2.3.2-95.20
Compat-db-4.0.14-5
Compat-gcc-7.3-2.96.128
Compat-gcc-C ++-7.3-2.96.128
Compat-libstdc ++-7.3-2.96.128
Compat-libstdc ++ devel-7.3-2.96.128
Openmotif21-2.1.30-8
Setarch-1.3-1
 
Red Hat Enterprise Linux 4.0 and Asianux 2.0:
 
Binutils-2.15.92.0.2-13.EL4
Compat-db-4.1.25-9
Compat-libstdc ++-296-2.96-132.7.2
Control-center-2.8.0-12
Gcc-3.4.3-22.1.EL4
Gcc-C ++-3.4.3-22.1.el44
Glibc-2.3.4-2.9
Glibc-common-2.3.4-2.9
Gnome-libs-1.4.1.2.90-44.1
Libstdc ++-3.4.3-22.1
Libstdc +-devel-3.4.3-22.1
Make-3.80-5
Pdksh-5.2.14-30
Sysstat-5.0.5-1
Xscreensaver-4.18-5.rhel4.2
Setarch-1.6-1
 
SuSE Linux Enterprise Server 9
 
Binutils-2.15.90.0.1.1-32.5
Gcc-3.3.3-43.24
Gcc-C ++-3.3.3.3-43.24
Glibc-2.3.3-98.28
Gnome-libs-1.4.1.7-671.1
Libstdc +++ 3.3.3-43.24
Libstdc +-devel-3.3.3-43.24
Make-3.80-184.1
Pdksh-5.2.14-780.1
Sysstat-5.0.1-35.1
Xscreensaver-4.16-2.6
4) command
Operating System Model
# Cat/etc/issue
Kernel model
# Uname-R
Query the installation package
# Rpm-Q package_name

Query scripts in RL as4
Rpm-Qa binutils
Rpm-Qa compat-DB
Rpm-Qa compat-libstdc ++-33
Rpm-Qa control-center
Rpm-Qa gcc
Rpm-Qa gcc-C ++
Rpm-Qa glibc
Rpm-Qa glibc-common
Rpm-Qa gnome-libs
Rpm-Qa libstdc ++
Rpm-Qa libstdc ++-devel
Rpm-Qa make
Rpm-Qa pdksh
Rpm-Qa sysstat
Rpm-Qa xscreensaver
Rpm-Qa setarch
3. Installation
1) Environment
2048 MB memory, 146 GB hard disk
2) Partition
/30g
/Tmp 2G
/Var 3G
/APP 20g
/APP/oradata 60g
/APP/orabc20g
3) Installation
Select all management tools, development tools, GNOME environment, Web server, and FTP Server
All packages except sysstat are successfully installed,
Sysstat package on disk 4, rpm-I sysstat-5.0.5-1.i386.rpm
4. Install Oracle
1) Add a user group
Determine whether users and groups exist
Grep DBA/etc/group
Grep oinstall/etc/group
Id Oracle
Id nobody
If yes, do not add
Groupadd oinstall
Groupadd DBA
Useradd-G oinstall-g dba Oracle
-- Oracle already exists but is not an oinstall group or a non-DBA group member
Usermod-G oinstall-g dba Oracle
Useradd nobody
2) Kernel Parameters
Parameter value File
Semms l 250/proc/sys/kernel/SEM

Semmns 32000

Semopm 100

Semmni 128
Shmall 2097152/proc/sys/kernel/Shmall
Shmmax half the size of physical memory (in bytes)/proc/sys/kernel/shmmax
Shmmni 4096/proc/sys/kernel/shmmni
File-Max 65536/proc/sys/fs/file-max
Ip_local_port_range minimum: 1024/proc/sys/NET/IPv4/ip_local_port_range

# Maximum: 65000
Rmem_default 1048576/proc/sys/NET/CORE/rmem_default
Rmem_max 1048576/proc/sys/NET/CORE/rmem_max
Wmem_default 262144/proc/sys/NET/CORE/wmem_default
Wmem_max262144/proc/sys/NET/CORE/wmem_max
Command
Semmsl, semmns, semopm, and semmni #/sbin/sysctl-A | grep SEM
Shmall, shmmax, and shmmni #/sbin/sysctl-A | grep SHM
File-Max #/sbin/sysctl-A | grep file-max
Ip_local_port_range #/sbin/sysctl-A | grep ip_local_port_range
Rmem_default #/sbin/sysctl-A | grep rmem_default
Rmem_max #/sbin/sysctl-A | grep rmem_max
Wmem_default #/sbin/sysctl-A | grep wmem_default
Wmem_max #/sbin/sysctl-A | grep wmem_max
Modify the configuration file/etc/sysctl. conf to add or modify
Kernel. Shmall = 2097152
Kernel. shmmax = 2147483648
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 = 1048576
Net. Core. rmem_max = 1048576
Net. Core. wmem_default = 262144
Net. Core. wmem_max = 262144
Restart
3) set the shell of the Oracle user
A) Add the following line to/etc/security/limits. conf.
Oracle soft nproc 2047
Hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
B) Add the following lines to/etc/PAM. d/login.
Session required/lib/security/pam_limits.so
Session required pam_limits.so
C) modify the shell default Startup File
Add the following lines to/etc/profile under Bourne, Bash, and Korm shell.

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

In C shell, add the following lines to/etc/CSH. login.
If ($ user = "oracle") then
Limit maxproc 16384
Limit descriptors 65536
Endif
4) create the required directory
Mkdir/APP/Oracle
Chown-r ORACLE: oinstall/APP/Oracle
Chmod-r 775/APP/Oracle
Chown-r ORACLE: oinstall/APP/oradata
Chmod-r 775/APP/oradata
Chown-r ORACLE: oinstall/APP/orabp
Chmod-r 775/APP/orabp
There is only one hard disk. If there are multiple hard disks, you need to create a mount point, such as u01,
The directory is/u01/APP/oracle. There is only one hard disk, and the mount point is/
5) set the Oracle user environment
A) if Oracle is installed on a remote system, it is displayed in the local X-Windows.
Xhost host_name
B) use Oracle to log on to X-Windows or Su-Oracle.
C) view the default shell
Echo $ Shell
D) bash
Vi. bash_profile
If oracle_sid, ORACLE_HOME, and oracle_base are set, delete the corresponding row.
E) umask 022
F) save the file and execute
.. Bash_profile
G) set the DISPLAY variable
Display = localhost: 0.0; export display
On the remote display page, change localhost to remote host.
H) if the/tmp space is insufficient, you need to set the TMP and tmpdir variables.
$ Su-Root
# Mkdir/mount_point/tmp
# Chmod A + WR/mount_point/tmp
# Exit
Under bash
$ TMP =/mount_point/tmp
$ Tmpdir =/mount_point/tmp
$ Export TMP tmpdir
I) Confirm ORACLE_HOME, tns_admin is not set
$ Unset ORACLE_HOME
$ Unset tns_admin
J) check whether the settings are correct
$ Umask
$ ENV | more
6) install Oracle
A) obtain the Oracle installer
Download from the Oracle website for free. You only need a simple registration and get a zip file.
Unzip 10201_database_linux32.zip
If you are installing a CD, mount the media
B) Run
Runinstaller
C) the installation process is very similar to that of windows.
Select oinstall when selecting the DBA group
Modify the default directory, such as the installation directory and inventory directory.
Before installation, the program will check the system configuration. If you follow the above settings, there will be no problems,
Install
In this way, the data file of the Oracle installation is in the default directory. If you want to put it on different disks,
You can delete the database reconstruction, or select Advanced installation during installation.
When net 8 is installed, the system prompts the root user to execute two scripts.
5. Drip
1) Pay attention to the ORACLE_HOME variable. If it does not exist, you need to manually set it.
ORACLE_HOME =/APP/Oracle/product/10.2.0/db_1
2) The database creation command is/APP/Oracle/product/10.2.0/db_1/bin/dbca &
Note that you cannot set the character set because the installation interface cannot be installed in Chinese,
Therefore, you cannot use the default configuration. You need to modify the default Character Set and default language.
3) The net 8 command is/APP/Oracle/product/10.2.0/db_1/bin/netca &
4) if net8 is used to remotely connect to Oracle on other machines, you must enable port 1521 on Linux.
The configuration is as follows:
Applications-> system setting-> secuity level, other ports are increased by 1521: TCP.
5) Enable Oracle random server startup
Set in. bash_profile
Oracle_sid = orcl
ORACLE_HOME =/APP/Oracle/product/10.2.0/db_1
Export oracle_sid
Export ORACLE_HOME
Path = $ path: $ home/bin: $ ORACLE_HOME/bin
Export path
Modify/etc/oratab,
Orcl:/APP/Oracle/product/10.2.0/db_1: Y
The last letter defaults to N and is changed to Y. Otherwise, both dbstart and dbshut will not work.
Modify behaviors in/APP/Oracle/product/10.2.0/db_1/dbstart
Oracle_home_listner =/APP/Oracle/product/10.2.0/db_1
Modify/etc/rc. Local and add such a line.
Su-Oracle-C dbstart
This is done, but it is automatically disabled when it cannot be shut down, so it needs to be handled manually.
Su-Oracle-C dbshut
For oracle users, dbshut can be used directly.

Note: I have tried the following methods on the Internet, but the system cannot be started. You need to delete the script in recovery mode,
I don't know if it is my configuration problem. If you see my error, please let me know
To enable RedHat Linux to automatically start oracle at startup, follow these steps:

Run root. Sh under $ ORACLE_HOME to generate a file/etc/oratab.

Edit/etc/oratab and set the restart flag of all instances to 'y', for example:
Ora10g:/home/Oracle/orahome_1: Y

Run the/etc/init. d/dbora script as follows:

#! /Bin/sh
# Description: Oracle auto start-stop script.
# Chkconfig:-20 80
#
# Set ora_home to be equivalent to the $ ORACLE_HOME
# From which you wish to execute dbstart and dbshut;
#
# Set ora_owner to the user ID of the owner of
# Oracle Database in ora_home.
Ora_home =/APP/Oracle/product/10.2.0/db_1
Ora_owner = Oracle
If [! -F $ ora_home/bin/dbstart]
Then
Echo "Oracle startup: cannot start"
Exit
Fi
Case "$1" in
'Start ')
# Start the Oracle databases:
# The following command assumes that the Oracle Login
# Will not prompt the user for any values
Su-$ ora_owner-C $ ora_home/bin/dbstart
Su-$ ora_owner-c "$ ora_home/bin/LSNRCTL start"
;;
'Stop ')
# Stop the Oracle databases:
# The following command assumes that the Oracle Login
# Will not prompt the user for any values
Su-$ ora_owner-c "$ ora_home/bin/LSNRCTL stop"
Su-$ ora_owner-C $ ora_home/bin/dbshut
;;
'Restart ')
$0 stop
$0 start
;;
Esac


Grant execution permission
Chmod 750/etc/init. d/dbora

Make the following link:
Ln-S/etc/init. d/dbora/etc/rc0.d/k10dbora
Ln-S/etc/init. d/dbora/etc/rc3.d/s99dbora

Run the following command:
Chkconfig -- level 345 dbora on

In this case, OK. Oracle will also start/stop when the machine is switched on and off next time.


 



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.