Oracle 11g on rhel5.5_oracle

检查内存
[oracle@oracle ~]$ grep MemTotal /proc/meminfo
MemTotal:      1213920 kB

检查swap空间,要求》=内存
[oracle@oracle ~]$ grep SwapTotal /proc/meminfo
SwapTotal:     2048276 kB


查看系统架构
[oracle@oracle ~]$ uname -m
i686


查看磁盘空间
[oracle@oracle ~]$ df -h
文件系统              容量  已用 可用 已用% 挂载点
/dev/sda3              18G   11G  6.5G  61% /
/dev/sda1              99M   12M   83M  12% /boot
tmpfs                 593M     0  593M   0% /dev/shm

配置固定的ip地址和主机名
[root@handong ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0
[root@handong ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
HWADDR=00:0c:29:4c:c2:9c
ONBOOT=yes
NETMASK=255.255.255.0
IPADDR=10.7.21.11
GATEWAY=10.7.21.255
TYPE=Ethernet

[root@handong ~]# vim /etc/sysconfig/network
[root@handong ~]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=oracle

修改hosts文件,本地和主机映射
[root@handong ~]# cat /etc/hosts
10.7.11.22 handong

新建组和附属组
[root@handong ~]# groupadd oinstall && groupadd dba

创建用户并指定用户所属组和附属组
[root@handong ~]# useradd -g oinstall -G dba oracle
[root@handong ~]# passwd oracle

配置yum文件
[root@handong ~]# mount /dev/cdrom /media
[root@handong ~]# cd /etc/yum.repos.d/
[root@oracle yum.repos.d]# rm -rf *
[root@oracle yum.repos.d]# vim iso.repo
[Server]
name=Server
baseurl=file:///media/Server
enabled=1
gpgcheck=0

[root@oracle yum.repos.d]# yum clean all
[root@oracle yum.repos.d]# yum update

用YUM安装必备软件包
[root@handong ~]# yum install sysstat libaio glibc compat-libstdc++-33.x86_64 elfutils-libelf-devel\* gcc-c++ libaio-devel unixODBC\* readline\* -y

创建安装目录
[root@handong ~]# mkdir /01

更改安装目录的所有组
[root@handong ~]# chown -R handong:oinstall /u01/

设置用户的环境变量
[root@handong ~]# vi /home/oracle/.bash_profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_SID=orcl
export PATH=$PATH:$ORACLE_HOME/bin
export NLS_LANG="SIMPLIFIED CHINESE_CHINA.UTF8"

ORACLE_BASE oracle 产品目录
ORACLE_HOME 数据库家目录(通常 HOME 目录是 BASE 的子目录
)
ORACLE_SID oracle 数据库实例名

PATH 将 oracle 命令追加到执行搜索路径里面

LD_LIBRARY_PATH 动态库的位置
NLS_LANG 更改字符集为UTF8

关闭内核级安检

[root@handong ~]#setenforce 0

永久关闭内核级安检可以修改

[root@handong  ]# vim /etc/selinux/config

 
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted

 停止防火墙
#service iptables stop
#service ip6tables stop
禁止开机启动
#chkconfig iptables off
#chkconfig ip6tables off


 

切换用户,进入安装目录,执行脚本进行图形安装

※执行脚本前时务必用创建的帐号登陆下图形界面(或者root用户执行xhost +不好使时用)

[root@handong ~]# su oracle
[oracle@handong ~]$ cd /u01/database/
[oracle@handong database]$ ./runInstaller

 

Oracle 11g on rhel5.5_oracle_02

 

 Oracle 11g on rhel5.5_network_03

 

 Oracle 11g on rhel5.5_ip地址_04

Oracle 11g on rhel5.5_ip地址_05

Oracle 11g on rhel5.5_ip地址_06

 

Oracle 11g on rhel5.5_oracle_07

Oracle 11g on rhel5.5_主机_08

Oracle 11g on rhel5.5_network_09

Oracle 11g on rhel5.5_主机_10

Oracle 11g on rhel5.5_network_11

Oracle 11g on rhel5.5_oracle_12

Oracle 11g on rhel5.5_主机_13