Oracle 11g on rhel5.5

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

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


查看系统架构
[[email protected] ~]$ uname -m
i686


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

配置固定的ip地址和主机名
[[email protected] ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0
[[email protected] ~]# 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

[[email protected] ~]# vim /etc/sysconfig/network
[[email protected] ~]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=oracle

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

新建组和附属组
[[email protected] ~]# groupadd oinstall && groupadd dba

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

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

[[email protected] yum.repos.d]# yum clean all
[[email protected] yum.repos.d]# yum update

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

创建安装目录
[[email protected] ~]# mkdir /01

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

设置用户的环境变量
[[email protected] ~]# 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

关闭内核级安检

[[email protected] ~]#setenforce 0

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

[[email protected]  ]# 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 +不好使时用)

[[email protected] ~]# su oracle
[[email protected] ~]$ cd /u01/database/
[[email protected] database]$ ./runInstaller

 

Oracle 11g on rhel5.5

 

 Oracle 11g on rhel5.5

 

 Oracle 11g on rhel5.5

Oracle 11g on rhel5.5

Oracle 11g on rhel5.5

 

Oracle 11g on rhel5.5

Oracle 11g on rhel5.5

Oracle 11g on rhel5.5

Oracle 11g on rhel5.5

Oracle 11g on rhel5.5

Oracle 11g on rhel5.5

Oracle 11g on rhel5.5