本文主要是介绍Oracle linux5下安装Oracle 11g,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1.实验环境
[root@ocm2 ~]# cat /proc/version
Linux version 2.6.18-164.el5 (mockbuild@ca-build10.us.oracle.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Thu Sep 3 02:16:47 EDT 2009
2.检查前提条件
2.1 检查硬件需求
[root@ocm2 Server]# grep MemTotal /proc/meminfo #查看RAM大小 Minimum: 1 GB of RAM Recommended: 2 GB of RAM or more
MemTotal: 2075432 kB
[root@ocm2 Server]# grep SwapTotal /proc/meminfo #查看swap space
SwapTotal: 4128760 kB
RAM | Swap Space |
---|---|
Between 1 GB and 2 GB | 1.5 times the size of the RAM |
Between 2 GB and 16 GB | Equal to the size of the RAM |
More than 16 GB | 16 GB |
[root@ocm2 Server]# uname -m #查看当前系统版本
i686
[root@ocm2 Server]# df -h /tmp/ #查看是否有足够空间安装软件,至少4.4G空间
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol0045G 4.8G 38G 12% /
2.2 检查软件需求
2.2.1 检查必须的包
Asianux Server 3, Oracle Linux 5, and Red Hat Enterprise Linux 5 | The following packages (or later versions) must be installed: binutils-2.17.50.0.6 compat-libstdc++-33-3.2.3 elfutils-libelf-0.125 elfutils-libelf-devel-0.125 elfutils-libelf-devel-static-0.125 gcc-4.1.2 gcc-c++-4.1.2 glibc-2.5-24 glibc-common-2.5 glibc-devel-2.5 glibc-headers-2.5 kernel-headers-2.6.18 ksh-20060214 libaio-0.3.106 libaio-devel-0.3.106 libgcc-4.1.2 libgomp-4.1.2 libstdc++-4.1.2 libstdc++-devel-4.1.2 make-3.81 sysstat-7.0.2 |
[root@ocm2 Server]# rpm -qa | grep binutils
binutils-2.17.50.0.6-12.el5
[root@ocm2 Server]# rpm -qa | grep compat-libstdc
compat-libstdc++-296-2.96-138
compat-libstdc++-33-3.2.3-61
[root@ocm2 Server]# rpm -qa | grep elfutils-libelf
elfutils-libelf-devel-static-0.137-3.el5
elfutils-libelf-0.137-3.el5
elfutils-libelf-devel-0.137-3.el5
[root@ocm2 Server]# rpm -qa | grep gcc-
gcc-c++-4.1.2-46.el5
compat-gcc-34-3.4.6-4
libgcc-4.1.2-46.el5
gcc-4.1.2-46.el5
compat-gcc-34-c++-3.4.6-4
gcc-gfortran-4.1.2-46.el5
compat-libgcc-296-2.96-138
[root@ocm2 Server]# rpm -qa | grep glibc
glibc-common-2.5-42
glibc-devel-2.5-42
glibc-headers-2.5-42
glibc-2.5-42
[root@ocm2 Server]# rpm -qa | grep kernel-headers
kernel-headers-2.6.18-164.el5
[root@ocm2 Server]# rpm -qa | grep ksh-
ksh-20080202-14.el5
[root@ocm2 Server]# rpm -qa | grep libaio-
libaio-0.3.106-3.2
libaio-devel-0.3.106-3.2
[root@ocm2 Server]# rpm -qa | grep libgcc-
libgcc-4.1.2-46.el5
compat-libgcc-296-2.96-138
[root@ocm2 Server]# rpm -qa | grep libgomp-
libgomp-4.4.0-6.el5
[root@ocm2 Server]# rpm -qa | grep libstdc++
compat-libstdc++-296-2.96-138
compat-libstdc++-33-3.2.3-61
libstdc++-4.1.2-46.el5
libstdc++-devel-4.1.2-46.el5
[root@ocm2 Server]# rpm -qa | grep make
imake-1.0.2-3
automake14-1.4p6-13
automake17-1.7.9-7
make-3.81-3.el5
automake15-1.5-16
automake-1.9.6-2.1
automake16-1.6.3-8
[root@ocm2 Server]# rpm -qa | grep sysstat
sysstat-7.0.2-3.el5
2.2.2 检查内核参数
[root@ocm2 Server]# vi /etc/sysctl.conf
[root@ocm2 Server]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 1
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 8192
kernel.shmmax = 4294967295
kernel.shmall = 1073741824
fs.file-max = 327679
kernel.msgmni = 2878
kernel.sem = 250 32000 100 142
kernel.shmmni = 4096
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144
fs.aio-max-nr = 3145728
net.ipv4.ip_local_port_range = 1024 65000
fs.aio-max-nr = 1048576 --加入此行以下的内容
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
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
2.2.3 创建组和用户
/usr/sbin/groupadd oinstall
/usr/sbin/groupadd -g 502 dba
/usr/sbin/groupadd -g 503 oper
/usr/sbin/useradd -u 502 -g oinstall -G dba,asmdba oracle
passwd oracle
2.2.4 检查资源限制
Resource Shell Limit | Resource | Soft Limit | Hard Limit |
---|---|---|---|
Open file descriptors | nofile | at least 1024 | at least 65536 |
Number of processes available to a single user | nproc | at least 2047 | at least 16384 |
Size of the stack segment of the process | stack | at least 10240 KB | at least 10240 KB, and at most 32768 KB |
[root@ocm2 Server]# ulimit -Sn #如果不足则去/etc/security/limits.conf修改
1024
[root@ocm2 Server]# ulimit -Hn
1024
[root@ocm2 Server]# ulimit -Su
32768
[root@ocm2 Server]# ulimit -Hu
32768
[root@ocm2 Server]# ulimit -Ss
10240
[root@ocm2 Server]# ulimit -Hs
unlimited
2.2.5 创建目录
[root@ocm2 Server]# mkdir -p /u01/app/oracle
[root@ocm2 Server]# mkdir -p /u01/app/oraInventory
[root@ocm2 Server]# mkdir -p /u01/app/oracle/product/11.2.0/dbhome_1
[root@ocm2 Server]# mkdir -p /u01/app/oracle/oradata
[root@ocm2 Server]# mkdir -p /u01/app/oracle/fast_recovery_area
[root@ocm2 Server]# chown -R oracle:oinstall /u01/app/oracle/
[root@ocm2 Server]# chmod -R 775 /u01/app/oracle/
3.开始执行安装
按步骤一步步执行,最后执行脚本
[root@ocm2 ~]# /u01/app/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@ocm2 ~]# /u01/app/oracle/product/11.2.0/dbhome_1/root.sh
Performing root user operation for Oracle 11g The following environment variables are set as:ORACLE_OWNER= oracleORACLE_HOME= /u01/app/oracle/product/11.2.0/dbhome_1Enter 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 script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
这篇关于Oracle linux5下安装Oracle 11g的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!