【Vegas原创】Linux x86安装Oracle10g
OS:Linux ES 3(32)
DB:Oracle 10g
步骤:
1,创建 Oracle 组和用户帐户
/ usr / sbin / groupadd -g 500 oinstall
/ usr / sbin / groupadd -g 501 dba
/ usr / sbin / useradd -u 500 - g oinstall - G dba -d /home/oracle oracle -s /bin/bash
设置oracle密码:
passwd oracle
2,创建目录:
mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775/u01/app/oracle
3,配置 Linux 内核参数:
cat >> / etc / sysctl.conf << EOF
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
EOF
/ sbin / sysctl - p
验证以上设置:
/ sbin / sysctl - a | grep shm
/ sbin / sysctl - a | grep sem
/ sbin / sysctl - a | grep file - max
/ sbin / sysctl - a | grep ip_local_port_range
4,为 oracle 用户设置 Shell 限制
cat >> / etc / security / limits.conf << EOF
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF
cat >> / etc / pam.d / login << EOF
session required / lib / security / pam_limits.so
EOF
cat >> / etc / profile << EOF
if [ \$USER = “oracle” ] ; then
if [ \$SHELL = “/bin/ksh” ] ; then
ulimit - p 16384
ulimit - n 65536
else
ulimit - u 16384 - n 65536
fi
umask 022
fi
EOF
cat >> / etc / csh.login << EOF
if ( \$ USER == “oracle” ) then
limit maxproc 16384
limit descriptors 65536
umask 022
endif
EOF
5,检查并调整环境变量:登录为oracle用户
# su – oracle
$ cd
$ vi .bash_profile
#添加如下内容,你的具体值应该不会和这个完全相同.
export ORACLE_BASE =/ u01 / app / oracle
export ORACLE_HOME = $ORACLE_BASE / product / 10.1 . 0 / db_1
export ORACLE_SID = dtberp
export PATH = $PATH:$HOME / bin:$ORACLE_HOME / bin
export LD_LIBRARY_PATH = $ORACLE_HOME / lib: / usr / lib
export LC_CTYPE = en_US.UTF - 8
然后执行
$ source .bash_profile
使环境变量生效.
6,检查并安装相关补丁(记得拿上自己的CD到机房安装,不要偷懒,从光盘复制几个rpm去安装,否则,你会做无用功!)
确认以下 rpm包都已经安装:
make-3.79
binutils-2.11
openmotif-2.2.2-16
setarch-1.3-1
compat-db-4.0.14.5
compat-gcc-7.3-2.96.122
compat-gcc-c++-7.3-2.96.122
compat-libstdc++-7.3-2.96.122
compat-libstdc++-devel-7.3-2.96.122
# rpm - qa | grep compat
需用disk3、disk2。在机器上输出如下:
compat-gcc-c++-7.3-2.96.122
compat-libstdc++-7.3-2.96.122
compat-libstdc++-devel-7.3-2.96.122
compat-glibc-7.x-2.2.4.32.5
compat-db-4.0.14-5
compat-gcc-7.3-2.96.122
# rpm -qa | grep openmotif
需用disk3、disk2
openmotif-devel-2.2.2-16
openmotif-2.2.2-16
# rpm - qa | grep setarch
需用disk2
setarch-1.3-1
上面显示的内容是在已经安装了具体的RPM包之后的结果.如果个别包没有安装,把系统安装光盘mount上,找到具体的软件包(大多数在第三张光盘上),然后利用如下的命令来安装相应的包:
# rpm - ivh compat.rpm
要额外注意的是,这些软件包之间是有依赖性的,先后的顺序要找好.否则会报告不能安装的错误.以上顺序已经排好,请按上面顺序进行安装即可。
此外,最好验证一下 gcc和glibc的版本(要求是gcc-3.2.3-2 或者更高)
#gcc -v
#rpm -q glibc
7,安装
1)以oracle用户登录
2)runInstaller安装
3)在选oradata路径时,可以默认,也可以放到/u02/oradata中,按自己的磁盘空间来选择。
4)最后别忘了按提示再开一个终端以root执行root.sh
参考文档:http://www.oracle.com/technology/global/cn/pub/articles/smiley_10gdb_install.html
还没有评论,来说两句吧...