centos5.6x oracle10g安装

 

官网参考:http://download.oracle.com/docs/html/B10811_01/toc.htm

                http://www.oracle-base.com/articles/10g/OracleDB10gInstallationOnFedora1.php

                 http://www.oracle-base.com/articles/10g/Oracle10gGridControlInstallationOnRedHatAS3.php

其他参考:http://youkao.iteye.com/blog/245374

1首先安装环境

  • X Window System
  • GNOME Desktop Environment
  • Editors
  • Graphical Internet
  • Text-based Internet
  • Server Configuration Tools
  • Development Tools
  • Administration Tools
  • System Tools

2安装需要准备的软件,准备环境。

yum install -y binutils compat-libstdc++ elfutils-libelf elfutils-libelf-devel glibc glibc-common glibc-devel gcc gcc-c++ libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel

3 添加用户及用户组

[root@centos56 ~]# groupadd oinstall
[root@centos56 ~]# groupadd dba
[root@centos56 ~]# groupadd oper
[root@centos56 ~]# useradd -g oinstall -G dba oracle
[root@centos56 ~]# passwd oracle
Changing password for user oracle.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.

4建立安装目录,赋予权限

[root@centos56 data]# mkdir /data/oracle
[root@centos56 data]# mkdir /data/oracle/10g
[root@centos56 data]# chown -R oracle:oinstall /data/oracle

5 更改oracle 安装的环境变量

5.1vi /etc/sysctl.conf

# Controls the maximum number of shared memory segments, in pages
#kernel.shmall = 4294967296
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=4194304
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=262144

运行#sysctl -p应用以上参数

5.2. vi /etc/security/limits.conf

#<domain>      <type>  <item>         <value>
#

#*               soft    core            0
#*               hard    rss             10000
#@student        hard    nproc           20
#@faculty        soft    nproc           20
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
#@student        -       maxlogins       4

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
# End of file

5.3vi /etc/pam.d/login

加上
# pam_limits.so  oracle install variable set
session    required     /lib/security/pam_limits.so
session    required     pam_limits.so

5.4 vi /etc/profile


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

运行#source /etc/profile

5.5[root@centos56 oracle]# vi .bash_profile

PATH=$ORACLE_HOME/bin:$PATH
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin
ORACLE_BASE=/data/oracle
ORACLE_HOME=$ORACLE_BASE/10g
ORACLE_SID=ynxd56
PATH=$ORACLE_HOME/bin:$PATH

export $ORACLE_BASE ORACLE_HOME ORACLE_SID PATH
~

5.6[root@centos56 oracle]# vi /etc/redhat-release

#CentOS release 5.6 (Final)//经实践这段不能要
redhat-4
~

6 yum -y install libXp

7用oracle进入终端,

sh /oracle安装文件目录/runInstaller

8常见错误

checking network configuration requirements

修改/etc/hosts

error in invoking target 'all_no_orcl'

compat-libstdc++-33这个包没装

error checking oracle home incompatiblities

前面装的oracl没装完又被锁定了,网上说删除 /var/opt/oracle/orainst.loc file (or/var/etc/oracle/orainst.loc。我机器上没有前面说的文件,但我在tmp把oracle安装的临时文件删掉也就过了.

后面又重装一片,实在找不到地方删了,改了另外一个ORACLE_HOME路径过的。

9安装完后执行$oracle_home\root.sh,创建/etc/oratab文件

10用oracle用户登录,dbstart运行会晕说/ade/vikrkuma_new/oracle不存在。

修改$ORACLE_HOME\bin\dbstart,修改ORACLE_HOME_LISTNER=$ORACLE_HOME

再修改/etc/oratab中 orcl:....N 改N为Y

11 这时候dbstart显示启动数据库信息了。

12添加自启动 ,修改/etc/rc.d/rc.local 或者添加chkconfig

 

 

你可能感兴趣的:(centos5.6x oracle10g安装)