cnetos6.2安装oracle11g r2(准备工作,检查包,配置环境1.检查系统内核版本
cat /proc/version
2.检查相关的开发工具和一些包
The following or later version of packages for Asianux 3, Oracle Enterprise Linux 5, and Red Hat Enterprise Linux 5 should be installed:
检查命令格式如下:
rpm -qa | grep 名字
binutils-2.17.50.0.6-2.el5
compat-libstdc++-33-3.2.3-61
elfutils-libelf-0.125-3.el5
elfutils-libelf-devel-0.125
gcc-4.1.1-52
gcc-c++-4.1.1-52
glibc-2.5-12
glibc-common-2.5-12
glibc-devel-2.5-12
glibc-headers-2.5-12
libaio-0.3.106
libaio-devel-0.3.106
libgcc-4.1.1-52
libstdc++-4.1.1
libstdc++-devel-4.1.1-52.e15
make-3.81-1.1
numactl-devel-0.9.8.i386
sysstat-7.0.0
3.创建用户和用户组
groupadd oracle11g
groupadd dba
mkdir -p /
添加一个oracle用户, 根目录是 /u01/oracle, 主的组是 oinstall 副的组是dba
useradd -g oinstall -G dba oracle
passwd oracle
passwd oracle
检查 nobody 是否存在 , id nobody
缺省存在的。如果不存在 # /usr/sbin/useradd -g nobody
mkdir -p /home/oracle/oracle11g/base
chmod -R oracle:oracle11g /home/oracle11g
chmod -R oracle:oracle11g /home/oracle11g
4. 配置核心参数(configuring kernel parameters)
vi /etc/sysctl.conf
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 2147483648
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
5.configure oracle installation owner shell linits
vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
6.vi /etc/pam.d/login
session required pam_limits.so
7.设置oracle 用户环境变量
7.设置oracle 用户环境变量
su – oracle
—————
vi /home/oracle/.bash_profile
ORACLE_BASE=/hoem/oracle/oracle11g
ORACLE_HOME=$ORACLE_BASE/base
ORACLE_SID=ru
PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH
重新启动系统
reboot
8.解压oracle数据库文件
unzip *.zip
chown -R oracle:oracle11g database
mv database /home/oracle/oracle11g
cd /home/oracle/oracle11g/database
./runInstall
安装完后要运行root.sh和orainsroot.sh
9.如果没有安装实例,要先配置网络再安装实例
(1)配置网络(确保环境变量正确配置,保证/etc/hosts里的主机名和ip地址对应)
netca
(2)安装数据库实例
dbca
unzip *.zip
chown -R oracle:oracle11g database
mv database /home/oracle/oracle11g
cd /home/oracle/oracle11g/database
./runInstall
安装完后要运行root.sh和orainsroot.sh
9.如果没有安装实例,要先配置网络再安装实例
(1)配置网络(确保环境变量正确配置,保证/etc/hosts里的主机名和ip地址对应)