Setup Oracle 11gR2 for Redhat Linux AS 4 Update 7 x64

时间:2022-01-22 07:48:43

Setup Oracle 11gR2 for Redhat Linux AS 4 Update 7 x64

1. checking linux version.

[root@localhost ~]# uname -a
Linux redhat4.7 2.6.9-78.EL #1 Wed Jul 9 15:26:38 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux

2. linking oracle installing document.

http://docs.oracle.com/cd/E11882_01/install.112/e24326/toc.htm#BHCGGJAB

The following or later version of packages for Oracle Linux 4 and Red Hat Enterprise Linux 4 must be installed:

binutils-2.15.92.0.2
compat-libstdc++-33-3.2.3
compat-libstdc++-33-3.2.3 (32 bit)
elfutils-libelf-0.97
elfutils-libelf-devel-0.97
expat-1.95.7
gcc-3.4.6
gcc-c++-3.4.6
glibc-2.3.4-2.41
glibc-2.3.4-2.41 (32 bit)
glibc-common-2.3.4
glibc-devel-2.3.4
glibc-headers-2.3.4
libaio-0.3.105
libaio-0.3.105 (32 bit)
libaio-devel-0.3.105
libaio-devel-0.3.105 (32 bit)
libgcc-3.4.6
libgcc-3.4.6 (32-bit)
libstdc++-3.4.6
libstdc++-3.4.6 (32 bit)
libstdc++-devel 3.4.6
make-3.80
numactl-0.6.4.x86_64
pdksh-5.2.14
sysstat-5.0.5

Setup Oracle 11gR2 for Redhat Linux AS 4 Update 7 x64

[root@localhost ~]# rpm -qa|grep binutils
binutils-2.15.92.0.2-25

[root@localhost RPMS]# rpm -qa|grep sysstat
[root@localhost RPMS]#

/media/cdrecorder/RedHat/RPMS
[root@localhost RPMS]# cd /media/cdrecorder/RedHat/RPMS
[root@localhost RPMS]# ls sysstat-5.0.5-19.el4.x86_64.rpm
sysstat-5.0.5-19.el4.x86_64.rpm
[root@localhost RPMS]# ls glibc-common-2.3.4-2.41.x86_64.rpm
glibc-common-2.3.4-2.41.x86_64.rpm
[root@localhost RPMS]# rpm -ivh sysstat-5.0.5-19.el4.x86_64.rpm
warning: sysstat-5.0.5-19.el4.x86_64.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing...                ########################################### [100%]
   1:sysstat                ########################################### [100%]
[root@localhost RPMS]# rpm -ivh glibc-common-2.3.4-2.41.x86_64.rpm
warning: glibc-common-2.3.4-2.41.x86_64.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing...                ########################################### [100%]
        package glibc-common-2

3. IP configuration.

[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
TYPE=Ethernet
NETMASK=255.255.255.0
IPADDR=192.168.10.201
USERCTL=no
IPV6INIT=no
PEERDNS=no

[root@localhost ~]# vi /etc/hosts

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain   localhost
192.168.10.201  redhat4.7

[root@localhost ~]# service network restart
Shutting down interface eth0:                              [  OK  ]
Shutting down loopback interface:                          [  OK  ]
Setting network parameters:                                [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:                                [  OK  ]

4. Add Group User for Setup Oracle database.

[root@localhost ~]# groupadd oinstall
[root@localhost ~]# groupadd dba

[root@localhost ~]# useradd -g oinstall -G dba oracle
[root@localhost ~]# passwd oracle

5. Configuring Kernel Parameters.

[root@localhost ~]# vi /etc/sysctl.conf

# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) 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
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912 #建议大于等于物理内存1/2(与性能相关)
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
                                                                                                                                                                              
~                                                                                                                                                                                           
~                                                                                                                                                                                           
"/etc/sysctl.conf" 31L, 964C written

[root@localhost ~]# 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
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
error: unknown error 22 setting key 'kernel.shmmax'
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576

6. Configurting /etc/security/limits.conf

[root@localhost ~]# vi /etc/security/limits.conf

#ftp             hard    nproc           0
#@student        -       maxlogins       4
oracle           soft    nproc           2047
oracle           hard    nproc           16384
oracle           soft    nofile          1024
oracle           hard    nofile          65536

7. Configurting /etc/pam.d/login

[root@redhat4 ~]# vi /etc/pam.d/login

#%PAM-1.0
auth       required     pam_securetty.so
auth       required     pam_stack.so service=system-auth
auth       required     pam_nologin.so
account    required     pam_stack.so service=system-auth
password   required     pam_stack.so service=system-auth
# pam_selinux.so close should be the first session rule
session    required     pam_selinux.so close
session    required     pam_stack.so service=system-auth
session    required     pam_loginuid.so
session    optional     pam_console.so
# pam_selinux.so open should be the last session rule
session    required     pam_selinux.so open
session    required     /lib/security/pam_limits.so
session    required     pam_limits.so
~

8. Configurting /etc/profile

if [ $USER = "oracle" ]; then
   if [ $SHELL = "/bin/ksh" ]; then
      ulimit -p 16384
      ulimit -n 65536
   else
      ulimit -u 16384 -n 65536
   fi
fi

9. Creating Directories.

[root@redhat4 ~]# mkdir /u01/app/oracle -p
[root@redhat4 ~]# chown -R oracle:oinstall /u01
[root@redhat4 ~]# chmod -R 755 /u01

10. Uploading setup files to Linux by FTP.

[root@redhat4 ~]# unzip linux.x64_11gR2_database_1of2.zip
[root@redhat4 ~]# unzip linux.x64_11gR2_database_2of2.zip

11. Setting xhost display.

[root@redhat4 soft]# w
15:32:37 up  2:09,  4 users,  load average: 0.32, 1.16, 0.79
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
root     192.168. 192.168.10.1     13:28    0.00s  0.00s  0.13s /usr/bin/gnome-session
root     pts/1    192.168.10.1     13:34   56.00s  0.13s  0.04s -bash
root     pts/2    192.168.10.1:0.0 15:27    0.00s  0.00s  0.00s w
root     :0       -                14:22   ?xdm?   4:58   0.05s /usr/bin/gnome-session

[root@redhat4 soft]# xhost +
access control disabled, clients can connect from any host
[root@redhat4 soft]# export DISPLAY=192.168.10.1:0.0

12. installing oracle software.

[root@redhat4 database]# su - oracle
[oracle@redhat4 ~]$ cd /home/oracle/soft/database/
[oracle@redhat4 database]$ ./runInstaller

…start OUI windows.

Setup Oracle 11gR2 for Redhat Linux AS 4 Update 7 x64

Setup Oracle 11gR2 for Redhat Linux AS 4 Update 7 x64 Setup Oracle 11gR2 for Redhat Linux AS 4 Update 7 x64

Setup Oracle 11gR2 for Redhat Linux AS 4 Update 7 x64 Setup Oracle 11gR2 for Redhat Linux AS 4 Update 7 x64
Setup Oracle 11gR2 for Redhat Linux AS 4 Update 7 x64 Setup Oracle 11gR2 for Redhat Linux AS 4 Update 7 x64

Setup Oracle 11gR2 for Redhat Linux AS 4 Update 7 x64 Setup Oracle 11gR2 for Redhat Linux AS 4 Update 7 x64

Setup Oracle 11gR2 for Redhat Linux AS 4 Update 7 x64 Setup Oracle 11gR2 for Redhat Linux AS 4 Update 7 x64
Setup Oracle 11gR2 for Redhat Linux AS 4 Update 7 x64 Setup Oracle 11gR2 for Redhat Linux AS 4 Update 7 x64

Setup Oracle 11gR2 for Redhat Linux AS 4 Update 7 x64 Setup Oracle 11gR2 for Redhat Linux AS 4 Update 7 x64

Setup Oracle 11gR2 for Redhat Linux AS 4 Update 7 x64 Setup Oracle 11gR2 for Redhat Linux AS 4 Update 7 x64

Check installing Failed Message.

Swap Size

[root@redhat4 ~]# dd if=/dev/zero of=/home/oracle/swap bs=1024 count=2048000        
2048000+0 records in
2048000+0 records out
[root@redhat4 ~]# mkswap /home/oracle/swap
Setting up swapspace version 1, size = 2097147 kB
[root@redhat4 ~]# free -m
             total       used       free     shared    buffers     cached
Mem:          3943       3865         77          0         11       3416
-/+ buffers/cache:        436       3506
Swap:         2047          0       2047
[root@redhat4 ~]# swapon /home/oracle/swap
[root@redhat4 ~]# grep SwapTotal  /proc/meminfo
SwapTotal:     4144432 kB
[root@redhat4 ~]# vi /etc/fstab

/home/oracle/swap     swap      swap defaults 0 0

elfutils-libelf-devel

unixODBC-devel

[root@redhat4 ~]# cd /media/cdrecorder/RedHat/RPMS/
[root@redhat4 RPMS]# ls elfutils-libelf-devel-0.97.1-5.x86_64.rpm
elfutils-libelf-devel-0.97.1-5.x86_64.rpm
[root@redhat4 RPMS]# ls unixODBC-devel-2.2.11-1.RHEL4.1.x86_64.rpm
unixODBC-devel-2.2.11-1.RHEL4.1.x86_64.rpm
[root@redhat4 RPMS]# rpm -ivh elfutils-libelf-devel-0.97.1-5.x86_64.rpm
warning: elfutils-libelf-devel-0.97.1-5.x86_64.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing...                ########################################### [100%]
   1:elfutils-libelf-devel  ########################################### [100%]
[root@redhat4 RPMS]# rpm -ivh unixODBC-devel-2.2.11-1.RHEL4.1.x86_64.rpm
warning: unixODBC-devel-2.2.11-1.RHEL4.1.x86_64.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing...                ########################################### [100%]
   1:unixODBC-devel         ########################################### [100%]

Setup Oracle 11gR2 for Redhat Linux AS 4 Update 7 x64 Setup Oracle 11gR2 for Redhat Linux AS 4 Update 7 x64

Setup Oracle 11gR2 for Redhat Linux AS 4 Update 7 x64 Setup Oracle 11gR2 for Redhat Linux AS 4 Update 7 x64

[root@redhat4 ~]# cd /u01/app/oraInventory/
[root@redhat4 oraInventory]# ./orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.

[root@redhat4 oraInventory]# cd /u01/app/oracle/product/11.2.0/dbhome_1/
[root@redhat4 dbhome_1]# sh root.sh
Running Oracle 11g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/11.2.0/dbhome_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...

Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
Setup Oracle 11gR2 for Redhat Linux AS 4 Update 7 x64