Centos7.0安装oracle 11g教程说明
一、下载centos版本 ............................................................................................................................................................ 2 二、安装前准备工作 ............................................................................................................................................................. 2
2.1.查看分区是否正确 ................................................................................................................................................... 2 2.2.关闭防火墙 ............................................................................................................................................................... 2 2.3.hosts文件 ................................................................................................................................................................. 3 2.4.host.conf .................................................................................................................................................................... 3 2.5.下载oracle11gR2: .................................................................................................................................................. 3 2.6.安装tigervnc-server.................................................................................................................................................. 3 2.7.启动vnc服务 ........................................................................................................................................................... 4 2.8.安装oracle必备服务包 ........................................................................................................................................... 4 2.9.配置内核参数 ........................................................................................................................................................... 5 2.10.打开文件数和进程数的限制 ................................................................................................................................. 6 2.11.创建用户oracle .................................................................................................................................................... 6 2.12.创建oracle11g文件夹 ........................................................................................................................................... 7 2.13.授权限给oracle用户 ............................................................................................................................................. 7 2.14.授权给data目录 .................................................................................................................................................... 8 2.15.通过SSH ServerFT传输文件到oralce11g ............................................................................................................. 8 2.16.oracle用户登录 ...................................................................................................................................................... 9 2.17.设置环境变量 ......................................................................................................................................................... 9 2.18.查看是否生效 ....................................................................................................................................................... 10 2.19.解压缩oracle文件 ............................................................................................................................................... 10 2.20.重启centos系统 .................................................................................................................................................. 11 2.21.启动VNC服务 ...................................................................................................................................................... 11 2.22. 设置访问权限的控制 ......................................................................................................................................... 12 2.23.启动安装oracle .................................................................................................................................................... 12 2.24.安装中文字体 ....................................................................................................................................................... 12 三、安装oracle 11gR2 ......................................................................................................................................................... 13 四、测试是否安装成功和修改字符集 ............................................................................................................................... 26
4.1.测试是否安装成功 ................................................................................................................................................. 26 4.2.修改数据库字符集 ................................................................................................................................................. 26 五、ORACLE自动启动 ......................................................................................................................................................... 28
5.1.修改 dbstart ........................................................................................................................................................... 28 5.2.修改 dbshut ............................................................................................................................................................ 28 5.3.修改oratab ............................................................................................................................................................. 28 5.4.创建启动服务 ......................................................................................................................................................... 29 5.5.测试服务 ................................................................................................................................................................. 31 5.6. 启动脚本执行权限 ............................................................................................................................................. 32 5.7.oracle设置自启动 .................................................................................................................................................. 32 5.8. 查看服务在各运行级状态 ................................................................................................................................... 32 5.9.启动centos系统 .................................................................................................................................................... 32 5.10.查看是否成功启动 ............................................................................................................................................... 32
一、下载centos版本
安装centos 7.0_64位:(建议安装最新7.0版本)
https://linux.cn/article-3351-1.html
http://isoredirect.centos.org/centos/7/isos/x86_64/CentOS-7-x86_64-DVD-1511.iso
二、安装前准备工作
2.1.查看分区是否正确
root用户进去打开命令行输入: df -h
2.2.关闭防火墙
这边必须关闭,否则应用层连接进来oracle会报错!
关闭防火墙:
centos7.0使用命令: 方法1:关闭firewall:
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
firewall-cmd --state#查看默认防火墙状态(关闭后显示notrunning,开启后显示running)
方法2:重启后生效 :chkconfig firewalld off 即时生效,重启后失效:service firewalld stop
2.3.hosts文件
查看 /etc/hosts 文件内容是否正确
vi /etc/hosts
127.0.0.1 localhost 192.168.0.1dbserver
Ip 电脑名 ----- 是备注,请勿复制进去
2.4.host.conf
查看 /etc/host.conf 文件,查看是否有多余内容
2.5.下载oracle11gR2:
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-linx8664soft-100572.html 官方安装手册
http://docs.oracle.com/cd/E11882_01/install.112/e24326/toc.htm----计算机英文六级必看!
2.6.安装tigervnc-server
方法一: 远程服务安装
以下通过命令行运行输入,可以直接复制,在命令下粘贴
查询版本