Centos7静默安装Oracle12C
-
Centos系统
#该系统为KVM中的虚拟机,宿主机为ubuntu18.04LTS [eric@oracle ~]$ cat /etc/redhat-release CentOS Linux release 7.5.1804 (Core)
-
修改主机名和hosts文件
[eric@oracle ~]$ su root #root用户修改 Password: [root@oracle eric]# cd [root@oracle ~]# cat /etc/hostsname oracle #vim 编辑,只保留Oracle #修改host文文件 oracle+主机ip [root@oracle ~]# cat /etc/hosts oracle 192.168.122.13
-
关闭防火墙
[root@oracle ~]# systemctl stop firewalld
-
关闭selinux
#ftp 需要关闭selinux [root@oracle ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g'/etc/selinux/config [root@oracle ~]# getenforce Disabled
ftp安装及文件传输参考:
[]: https://blog.csdn.net/EricLeiy/article/details/78779812 “宿主机通过FTP 向KVM虚拟机传文件”
-
安装依赖
[root@oracle ~]#yum -y install binutils compat-libstdc++ compat-libstdc++-33 elfutils-libelf-devel gcc gcc-c++ glibc-devel glibc-headers ksh libaio-devel libstdc++-devel make sysstat unixODBC-devel binutils-* compat-libstdc++* elfutils-libelf* glibc* gcc-* libaio* libgcc* libstdc++* make* sysstat* unixODBC* wget unzip [root@oracle ~]# yum -y install java-1.8.0-openjdk*
-
为oracle创建用户
#创建安装用户组oinstall [root@oracle ~]# groupadd oinstall #创建dba用户组 [root@oracle ~]# groupadd dba #创建oracle用户并添加组权限 [root@oracle ~]# useradd -g oinstall -G dba oracle #设置密码 [root@oracle ~]# passwd oracle Changing password for user oracle. New password: BAD PASSWORD: The password is shorter than 8 characters Retype new password: passwd: all authentication tokens updated successfully. #查看 [root@oracle ~]# id oracle uid=1001(oracle) gid=1001(oinstall) groups=1001(oinstall),1002(dba)
-
创建安装目录
$ORACLE_BASE [root@oracle ~]# mkdir -p /opt/oracle $ORACLE_HOME [root@oracle ~]# mkdir -p /opt/oracle/12c #数据存放目录 [root@oracle ~]# mkdir /opt/oracle/oradata #清单目录:该目录不能放在oracle_base目录下,不然后期静默安装数据库时,读取db_install.rsp文件报错 [root@oracle ~]# mkdir /opt/inventory #数据恢复目录 [root@oracle ~]# mkdir /opt/oracle/flash