Red Hat Enterprise Linux AS 4.8中安装Oracle 10g R2详解
Red Hat Enterprise Linux AS 4.8中安装Oracle 10g R2详解
本篇博文参考《Oracle 10g官方文档》等资料,故选《RHEL4》操作系统。生产环境中强烈建议以《Oracle 10g官方文档》为蓝图!
一、预备:
1、硬件:注:括号()中是官方提供数据!
1-检查物理内存 (RAM至少1G)
[root@RHEL4 ~]# grep MemTotal /proc/meminfo
MemTotal: 1541764 kB //RAM是1.5G
[root@RHEL4 ~]#
2-检查Swap大小 (1G
[root@RHEL4 ~]# grep SwapTotal /proc/meminfo
SwapTotal: 3140696 kB //此处是1.5X2=3G
[root@RHEL4 ~]#
3-检查可用RAM和swap空间
[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-检查CPU
[root@RHEL4 ~]# grep "model name" /proc/cpuinfo
model name : Intel(R) Core(TM) i5-2430M CPU @ 2.40GHz
[root@RHEL4 ~]#
2、软件:
1-操作系统版本
Red Hat Enterprise Linux AS 4.8 X64bit
2-内核版本号
[root@RHEL4 ~]# uname -r
2.6.9-82.EL
[root@RHEL4 ~]#
3-RHEL4所需要安装的软件包
(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 备注: //查询是否已安装了上面14个软件包 rpm –qa | grep 软件包名 //安装软件包 方法1: rpm –ivh 软件包名 方法2: yum install 软件包名3. 在/etc/hosts后面添加1行:
127.0.0.1 localhost.localdomain localhost
192.168.1.224 RHEL4
4. 创建用户和组
[root@RHEL4 ~]# groupadd oinstall
[root@RHEL4 ~]# groupadd dba
[root@RHEL4 ~]# useradd -g oinstall -G dba oracle
[root@RHEL4 ~]#
5. 修改参数:
1-在/etc/sysctl.conf的最后添加:
vi /etc/sysctl.conf
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 = 2621442-然后,使用sysctl -p 命令,即时生效
[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-在/etc/security/limits.conf最后面添加:
[root@RHEL4 ~]# vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
4-在/etc/pam.d/login最后面添加:
[root@RHEL4 ~]# vi /etc/pam.d/login
session required pam_limits.so 在/etc/profile最后面添加: [root@RHEL4 ~]# vi /etc/profile if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi6. 创建Oracle 10g R2的安装目录
1-创建oracle安装目录且赋于权限
[root@RHEL4 ~]# mkdir /u01/app/oracle -p
[root@RHEL4 ~]# chown -R oracle:oinstall /u01
[root@RHEL4 ~]# chmod -R 755 /u01
[root@RHEL4 ~]#
2-设置Oracle的环境变量
在.bash_profile最后面添加:
[root@RHEL4 ~]# su – oracle //切换到oracle用户帐户
[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 //退出oracle用户帐户
[root@RHEL4 ~]# su – oracle //重新切换到oracle用户帐户
[oracle@RHEL4 ~]$ ls
上一篇: ,简单有关问题
推荐阅读
-
Red Hat Enterprise Linux 4下安装Oracle 10g图解
-
Red Hat Enterprise Linux 5下安装Oracle全程图解
-
Rad Hat Enterprise Linux 5.5上安装Oracle 11g R2
-
Red Hat Enterprise Linux 5 安装Oracle10g
-
Red Hat Enterprise Linux 5 安装Oracle10g
-
在Red Hat Enterprise Linux 7.0 x86_64下安装Oracle 11g R2
-
在Red Hat Enterprise Linux 7.0 x86_64下安装Oracle 12c R1数据库
-
在RED HAT ENTERPRICE LINUX4 上安装ORACLE 10G (10.2.0.1.0)
-
Red Hat Enterprise Linux AS 4.8中安装Oracle 10g R2详解
-
在RED HAT ENTERPRICE LINUX4 上安装ORACLE 10G (10.2.0.1.0)