Linux(CentOS 7.0)安装Oracle 11gR2
// 注释 # root用户 $oracle用户
1. 关闭安全措施
# chkconfig iptables off // 永久关闭防火墙
# serviceiptables stop // 暂时关闭防火墙,重启系统后会自动打开
# sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config // 关闭Selinux
2. 验证硬件
2.1 内存:
要求:内存最小1G,推荐2G或者更高。
查看命令:# grep MemTotal /proc/meminfo
2.2 Swap:
要求:
|
RAW
|
Swap |
| 1G至2G | 1.5倍 |
| 2G至16G | 同RAW相等 |
| 16G以上 | 16G |
查看命令:# grep SwapTotal /proc/meminfo
# free
3. 验证软件
3.1 操作系统
- Asianux Server 3 SP2
- Oracle Linux 4 Update 7
- Oracle Linux 5 Update 2 (with Red Hat Compatible Kernel)
- Oracle Linux 5 Update 5
- Oracle Linux 6
- Oracle Linux 6 (with Red Hat Compatible Kernel)
- Red Hat Enterprise Linux 4 Update 7
- Red Hat Enterprise Linux 5 Update 2
- Red Hat Enterprise Linux 5 Update 5 (with the Oracle Unbreakable Enterprise Kernel for Linux)
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 6 (with the Oracle Unbreakable Enterprise Kernel for Linux)
- SUSE Linux Enterprise Server 10 SP2
- SUSE Linux Enterprise Server 11
CentOS7本文按照Red Hat Enterprise Linux 6来配置。
# cat /proc/version // 查看版本
3.2 内核
- On Oracle Linux 4 and Red Hat Enterprise Linux 4 2.6.9 or later
- On Oracle Linux 5 Update 2 with Red Hat Compatible Kernel 2.6.18 or later
- On Oracle Linux 5 Update 5 with Red Hat Compatible Kernel 2.6.18 or later
- On Oracle Linux 5 Update 5 with Unbreakable Enterprise Kernel 2.6.32-100.0.19 or later
- On Oracle Linux 6 2.6.32-100.28.5.el6.x86_64 or later
- On Oracle Linux 6 with Red Hat Compatible Kernel 2.6.32-71.el6.x86_64 or later
- On Red Hat Enterprise Linux 5 Update 2 2.6.18 or later
- On Red Hat Enterprise Linux 5 Update 5 2.6.18 or later
- On Red Hat Enterprise Linux 5 Update 5 with Unbreakable Enterprise Kernel 2.6.32 or later
- On Red Hat Enterprise Linux 6 2.6.32-71.el6.x86_64 or later
- On Red Hat Enterprise Linux 6 with Unbreakable Enterprise Kernel 2.6.32-100.28.5.el6.x86_64 or later
- On Asianux Server 3 2.6.18 or later
- On SUSE Linux Enterprise Server 10 2.6.16.21 or later
- On SUSE Linux Enterprise Server 11 2.6.27.19 or later
# uname-r
3.3 验证需要的包:
# rpm -qa binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel elfutils-libelf-devel-static gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers glibc-static kernel-headers pdksh libaio libaio-devel libgcc libgomp libstdc++ libstdc++-devel libstdc++-static make numactl-devel sysstat unixODBC unixODBC-devel // 验证命令26个包
- kernel-headers-3.10.0-123.el7.x86_64
- gcc-c++-4.8.2-16.el7.x86_64
- numactl-devel-2.0.9-2.el7.x86_64
- glibc-headers-2.17-55.el7.x86_64
- glibc-common-2.17-55.el7.x86_64
- binutils-2.23.52.0.1-16.el7.x86_64
- unixODBC-devel-2.3.1-10.el7.x86_64
- libaio-0.3.109-12.el7.x86_64
- make-3.82-21.el7.x86_64
- elfutils-libelf-0.158-3.el7.x86_64
- elfutils-libelf-devel-0.158-3.el7.x86_64
- sysstat-10.1.5-4.el7.x86_64
- glibc-static-2.17-55.el7.x86_64
- glibc-devel-2.17-55.el7.x86_64
- glibc-2.17-55.el7.x86_64
- elfutils-libelf-devel-static-0.158-3.el7.x86_64
- libaio-0.3.109-12.el7.i686
- gcc-4.8.2-16.el7.x86_64
- libgcc-4.8.2-16.el7.i686
- libstdc++-static-4.8.2-16.el7.x86_64
- libaio-devel-0.3.109-12.el7.x86_64
- libstdc++-4.8.2-16.el7.x86_64
- libaio-devel-0.3.109-12.el7.i686
- unixODBC-2.3.1-10.el7.x86_64
- libstdc++-devel-4.8.2-16.el7.x86_64
- compat-libstdc++-33-3.2.3-71.el7.x86_64
- libgcc-4.8.2-16.el7.x86_64
- libgomp-4.8.2-16.el7.x86_64
#rpm -ivh 安装包名 // 安装程序包
4. 创建组和用户
# groupadd dba
# groupadd oinstall
# useradd -m -g oinstall -G dba oracle
# passwd oracle
// 如果nobody用户不存在(id nobody命令查看),则创建:
# useradd nobody
# groupadd oinstall
# useradd -m -g oinstall -G dba oracle
# passwd oracle
// 如果nobody用户不存在(id nobody命令查看),则创建:
# useradd nobody
5. 配置内核
注:配置大于系统数据需要配置更改,否则不需要配置。
要求配置:
| 参数 | 最小值 | 文件 | 命令 |
|
semmsl
semmns semopm semmni |
50
32000 100 128 |
/proc/sys/kernel/sem
|
# /sbin/sysctl -a | grep sem
|
|
shmall
|
2097152
|
/proc/sys/kernel/shmall
|
# /sbin/sysctl -a | grep shm |
|
shmmax
|
4294967296 |
【广告位】文章正文中间
本文已展示 50% · 完整内容需验证码解锁
关注公众号,解锁完整文章
微信扫码关注 星哥玩云,
在公众号对话框回复关键词 星哥玩云博客 获取验证码。输入后即可阅读全文,
一次解锁全站文章通用。