Install Oracle10gR2 in RedHatEnterpriseLinuxAS4.8
How to install Oracle 10g R2 in Red Hat Enterprise Linux AS 4.8
This blog post selects the RHEL4 operating system based on Oracle 10g Official Document and other materials. We strongly recommend that you use Oracle 10g Official document as a blueprint in the production environment!
I. preparations:
1. Hardware: Note: official data is provided in brackets!
1-check physical memory (RAM at least 1 GB)
[Root @ RHEL4 ~] # Grep MemTotal/proc/meminfo
MemTotal: 1541764 kB // RAM is 1.5 GB
[Root @ RHEL4 ~] #
2-check the Swap size (1G <2g,则swap=ram x 1.5)< p><2g,则swap=ram>
[Root @ RHEL4 ~] # Grep SwapTotal/proc/meminfo
SwapTotal: 3140696 kB // 1.5X2 = 3G
[Root @ RHEL4 ~] #
3-check available RAM and swap space
[Root @ RHEL4 ~] # Free
Total used free shared buffers cached
Mem: 1541764 898536 643228 0 49480 542584
-/+ Buffers/cache: 306472 1235292
Swap: 3140696 0 3140696
[Root @ RHEL4 ~] #
4-check CPU
[Root @ RHEL4 ~] # Grep "model name"/proc/cpuinfo
Model name: Intel (R) Core (TM) i5-2430M CPU @ 2.40 GHz
[Root @ RHEL4 ~] #
2. Software:
1-operating system version
Red Hat Enterprise Linux AS 4.8 X64bit
2-kernel version number
[Root @ RHEL4 ~] # Uname-r
2.6.9-82.EL
[Root @ RHEL4 ~] #
3-RHEL4 software package to be installed
(1) binutils-2.15.92.0.2-10.EL4 (2) compat-db-4.1.25-9 (3) control-center-2.8.0-12 (4) gcc-3.4.3-9.EL4 (5) gcc-c ++-3.4.3-9. EL4 (6) glibc-2.3.4-2 (7) glibc-common-2.3.4-2 (8) gnome-libs-1.4.1.2.90-44.1 (9) libstdc ++-3.4.3-9. EL4 (10) libstdc ++-devel-3.4.3-9.EL4 (11) make-3.80-5 (12) pdksh-5.2.14-30 (13) sysstat-5.0.5-1 (14) xscreensaver-4.18-5.rhel4.2 remarks: // check whether the above 14 software packages are installed rpm-qa | grep software package name // Method 1: rpm-ivh software package name Method 2: yum install software package name
3. Add one line after/etc/hosts:
127.0.0.1 localhost. localdomain localhost
192.168.1.20.rhel4
4. Create users and groups
[Root @ RHEL4 ~] # Groupadd oinstall
[Root @ RHEL4 ~] # Groupadd dba
[Root @ RHEL4 ~] # Useradd-g oinstall-G dba oracle
[Root @ RHEL4 ~] #
5. Modify parameters:
1-Add at the end of/etc/sysctl. conf:
Vi/etc/sysctl. conf
Kernel. shmall = 2097152kernel. shmmax = 2147483648 // greater than or equal to half of the physical memory! Kernel. shmmni = 4096kernel. sem = 250 32000 100 FS. file-max = 65536net. ipv4.ip _ local_port_range = 1024 65000net. core. rmem_default = 262144net. core. rmem_max = 262144net. core. wmem_default = 262144net. core. wmem_max= 262144
2-then, use the sysctl-p command to take effect immediately
[Root @ RHEL4 ~] # Sysctl-p
Net. ipv4.ip _ forward = 0
Net. ipv4.conf. default. rp_filter = 1
Net. ipv4.conf. default. accept_source_route = 0
Kernel. sysrq = 0
Kernel. core_uses_pid = 1
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 = 262144
Net. core. rmem_max = 262144
Net. core. wmem_default = 262144
Net. core. wmem_max = 262144
[Root @ RHEL4 ~] #
3-Add the following content at the end of/etc/security/limits. conf:
[Root @ RHEL4 ~] # Vi/etc/security/limits. conf
Oracle soft nproc 2047
Hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
4-Add the following content at the end of/etc/pam. d/login:
[Root @ RHEL4 ~] # Vi/etc/pam. d/login
Session requiredpam_limits.so is added at the end of/etc/profile: [root @ RHEL4 ~] # Vi/etc/profileif [$ USER = "oracle"]; thenif [$ SHELL = "/bin/ksh"]; thenulimit-p 16384 ulimit-n 65536 elseulimit-u 16384-n 65536 fifi
6. Create the installation directory for Oracle 10g R2
1-create an oracle installation directory and grant permissions
[Root @ RHEL4 ~] # Mkdir/u01/app/oracle-p
[Root @ RHEL4 ~] # Chown-R oracle: oinstall/u01
[Root @ RHEL4 ~] # Chmod-R 755/u01
[Root @ RHEL4 ~] #
2-set Oracle environment variables
Add the following at the end of. bash_profile:
[Root @ RHEL4 ~] # Su-oracle // switch to the oracle user account
[Oracle @ RHEL4 ~] $ Vi. bash_profile
Export ORACLE_BASE =/u01/app/oracle
Export ORACLE_HOME =/u01/app/oracle/product/10.2.0/db_1
Export ORACLE_SID = jiagulun
Export NLS_LANG = american_america.zhs16gbk
[Root @ RHEL4 ~] # Exit // exit the oracle user account
[Root @ RHEL4 ~] # Su-oracle // switch back to the oracle user account
[Oracle @ RHEL4 ~] $ Ls
Next, let's take a look at the highlights of page 2nd:
,