最全的Centos6.10详细安装Oracle 11G R2图文教程
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了最全的Centos6.10详细安装Oracle 11G R2图文教程相关的知识,希望对你有一定的参考价值。
平台:Centos 6.10 x64 带图形
配置4G 4核心cpu 200G硬盘
第一步、安装依赖
yum install -y binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libgcc libstdc++ libstdc++-devel libaio libaio-devel make sysstat unixODBC-devel pdksh
下载javarpm包,安装oracle java
[[email protected] ~]# rpm -ivh jdk-8u121-linux-x64.rpm
Preparing... ########################################### [100%]
1:jdk1.8.0_121 ########################################### [100%]
第二步、创建所需用户和组
创建oracle用户并设置密码
[[email protected] ~]# useradd oracle
[[email protected] ~]# passwd oracle
然后登陆图形界面测试一下oracle用户
测试正常
创建用户组
[[email protected] ~]# groupadd oinstall
[[email protected] ~]# groupadd dba
修改oracle用户组
usermod -g oinstall -G dba oracle
第三步、修改内核参数
追加一段内核参数
[[email protected] ~]# 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
执行生效
[[email protected] ~]# sysctl -p
修改文件打开限制,追加一段
[[email protected] ~]# vim /etc/security/limits.conf
.......
oracle soft nproc 4096
oracle hard nproc 65536
oracle soft nofile 4096
oracle hard nofile 65536
创建oracle安装目录
[[email protected] ~]# mkdir -p /u01/app/
[[email protected] ~]# chown -R oracle:oinstall /u01/app/
[[email protected] ~]# chmod -R 775 /u01/app/
重启服务器,使limit生效
第四步、添加环境变量,准备安装
使用oracle用户登陆
[[email protected] ~]# su - oracle
[[email protected] ~]$ vim .bash_profile
#追加下面这段
ORACLE_BASE=/u01/app/oracle
ORACLE_SID=sales
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export ORACLE_BASE ORACLE_SID ORACLE_HOME
PATH=$ORACLE_HOME/bin:$PATH
检查主机名能访问不
[[email protected] ~]$ ping o1
PING o1 (192.168.1.18) 56(84) bytes of data.
64 bytes from o1 (192.168.1.18): icmp_seq=1 ttl=64 time=0.061 ms
检查正常
解压oracle安装包
[[email protected] ~]$ unzip linux.x64_11gR2_database_1of2.zip
[[email protected] ~]$ unzip linux.x64_11gR2_database_2of2.zip
第五步、开始安装
进入安装目录,开始安装
[[email protected] ~]$ cd database/
[[email protected] database]$ ./runInstaller
然后弹出安装程序,去掉下面那个勾,点next
再点next
选择server,再点next
再点next
选择高级安装,再点next
再点next
next
next
next
next
next
点击字符集,然后勾选UTF8,然后next
next
next
next
勾选下面的所有账号使用同一个密码,next
next
开始检查依赖包,其实这些包都装了的,只是版本高了,勾选ignore all,然后next
点击save response file可以保存选择配置,点finish开始安装
安装中
安装完成后有提示,蓝色的是em控制台访问地址,点ok
然后提示要执行两个脚本,使用root执行
[[email protected] ~]# sh /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oracle.
The execution of the script is complete.
[[email protected] ~]#
[[email protected] ~]# sh /u01/app/oracle/product/11.2.0/dbhome_1/root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0/dbhome_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
执行完成,点ok,安装成功
在本机打开1158端口,可以登陆控制台
运行状态
以上是关于最全的Centos6.10详细安装Oracle 11G R2图文教程的主要内容,如果未能解决你的问题,请参考以下文章
学以致用四十-----centos6.10安装oracle 11g
福利 | 史上最全Oracle教程来袭—16.5G超详细视频/讲义/笔记汇总,别再说你不懂Oracle了
CentOS 7(同red hat)安装oracle 11g r2最全最细攻略