0x01 开始前的准备工作:
1 首先搞清楚一个概念:oracle是典型的C/S架构。即服务端提供数据存储及数据组织,客户端负责数据查询及检索。我们安装的话从服务端及客户端两部分进行
2 安装在哪里:从物理机器角度来讲,可以部署在自己普通PC,可以部署在企业的服务器;从操作系统讲,可以部署在window 操作系统,可以部署在linux系统,也可以部署在AIX环境等。我们此次是在普通PC上在Linux系统进行
3 安装的什么:在vmware虚拟机上安装红帽的6u4系统,部署oracle11g
4 安装前的操作系统及软件准备:
a 磁盘空间大小:
Installation Type Requirement for Software Files (GB) --软件安装路径的空间
Enterprise Edition 4.7
Standard Edition 4.6
Installation Type Requirement for Data Files (GB) --数据文件路径的空间
Enterprise Edition 1.7
Standard Edition 1.5
b 内存大小:
Minimum: 1 GB of RAM
Recommended: 2 GB of RAM or more
确定可用的共享内存:
Oracle要求可用共享内存至少1G
c 操作系统及软件
2.6.39-400.17.1.el6uek.x86_64
binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libgcc libstdc++ libstdc++-devel libaio libaio-devel make sysstat unixODBC unixODBC-devel
4 用户添加
[root@leopard ~]# groupadd -g 1001 oinstall
[root@leopard ~]# groupadd -g 1002 dba
[root@leopard ~]# groupadd -g 1003 oper
[root@leopard ~]# useradd -u 1002 -g oinstall -G dba,oper oracle
[root@leopard ~]# id oracle
uid=1002(oracle) gid=1001(oinstall) groups=1001(oinstall),1002(dba),1003(oper)
[root@leopard ~]# passwd oracle ==>Oracle123
[root@leopard ~]# vim /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
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
6 资源设置
[root@leopard ~]# vim /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
[root@leopard ~]# vim /etc/pam.d/login
session required pam_limits.so
7 必要的磁盘分区设置
[root@leopard ~]# fdisk /dev/sda
[root@leopard ~]# partx -a /dev/sda
[root@leopard ~]# ls /dev/sda*
/dev/sda /dev/sda1 /dev/sda2 /dev/sda3 /dev/sda4 /dev/sda5 /dev/sda6
[root@leopard ~]# mkfs.ext4 /dev/sda6
[root@leopard ~]# blkid /dev/sda6
/dev/sda6: UUID="2b1cc95f-8313-4336-87b0-0fa3618d69ba" TYPE="ext4"
[root@leopard ~]# vim /etc/fstab
UUID=2b1cc95f-8313-4336-87b0-0fa3618d69ba /u01 ext4 defaults 0 0
[root@leopard ~]# mount -a
[root@leopard ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 40G 3.4G 34G 10% /
tmpfs 1.0G 264K 1.0G 1% /dev/shm
/dev/sda1 194M 51M 134M 28% /boot
/dev/sda5 4.0G 137M 3.7G 4% /tmp
/dev/sr0 3.5G 3.5G 0 100% /media/OL6.4 x86_64 Disc 1 20130225
/dev/sr0 3.5G 3.5G 0 100% /mnt/iso
/dev/sda6 50G 180M 47G 1% /u01
[root@leopard ~]# mkdir /u01/app/oracle -pv
mkdir: created directory `/u01/app'
mkdir: created directory `/u01/app/oracle'
OFA Optimal Flexible Arichitecture
Oracle base /u01/app/oracle
[root@leopard ~]# chmod 775 /u01/app -R
[root@leopard ~]# chown oracle:oinstall /u01 -R
8 查看hosts文件
[root@leopard ~]#vim /etc/hosts
172.16.254.250 leopard.uplooking.com
9 配置环境变量
[root@leopard ~]# vim /home/oracle/.bash_profile
export PATH
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db
export TEMP=/tmp
export TEPDIR=/tmp
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID=orcl11g
[root@leopard ~]# source /home/oracle/.bash_profile
10 分辨率要求
11g图形安装要求分辨率至少是1024*768
[root@leopard ~]# xrandr | head
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 320 x 200, current 1280 x 960, maximum 3840 x 1920
default connected 1280x960+0+0 0mm x 0mm
1280x768 60.0 85.0 75.0 0.0
2560x1600 85.0 75.0 60.0 0.0
1920x1440 75.0 60.0 0.0
1856x1392 75.0 60.0
1792x1344 75.0 60.0
1920x1200 85.0 75.0 60.0 0.0
1600x1200 85.0 75.0 70.0 65.0 60.0 0.0
1680x1050 85.0 75.0 60.0 0.0