centOS7安装oracle
目录
编辑 将/oradata上当及目录内的所有文件和文件夹的归属都修改为oracle用户
安装前将/oradata文件及目录下的所有文件文件夹的权限都属于oracle用户
1.将Oracle安装包拷贝到安装机器的指定目录
2.关闭防火墙
[root@localhost install]# systemctl stop firewalld.service
[root@localhost install]# systemctl disable firewalld.service
3.安装依赖包
yum -y install binutils compat-libcap1 compat-libstdc++-33 compat-libstdc++-33*i686 compat-libstdc++-33*.devel compat-libstdc++-33 compat-libstdc++-33*.devel gcc gcc-c++ glibc glibc*.i686 glibc-devel glibc-devel*.i686 ksh libaio libaio*.i686 libaio-devel libaio-devel*.devel libgcc libgcc*.i686 libstdc++ libstdc++*.i686 libstdc++-devel libstdc++-devel*.devel libXi libXi*.i686 libXtst libXtst*.i686 make sysstat unixODBC unixODBC*.i686 unixODBC-devel unixODBC-devel*.i686
4. 验证依赖包
rpm -q binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libXi libXtst make sysstat unixODBC unixODBC-devel
5.创建Oracle用户
[root@localhost install]# groupadd -g 502 oinstall
[root@localhost install]# groupadd -g 503 dba
[root@localhost install]# groupadd -g 504 oper
[root@localhost install]# groupadd -g 505 asmadmin
[root@localhost install]# useradd -u 502 -g oinstall -G oinstall,dba,asmadmin,oper -s /bin/bash -m oracle
[root@localhost install]# passwd oracle
6.创建oradata目录,解压Oracle安装
将/oradata上当及目录内的所有文件和文件夹的归属都修改为oracle用户
操作oracle用户
[root@localhost oradata]# su oracle
[oracle@localhost oradata]$ unzip p10404530_112030_Linux-x86-64_1of7.zip
[oracle@localhost oradata]$ unzip p10404530_112030_Linux-x86-64_2of7.zip
7.修改系统配置参数
8.配置Oracle安装目录
9.配置环境变量
10.修改安装配置文件
[oracle@localhost ~]$ cd /oradata/
拷贝安装文件db_install.rsp到/oradata目录下
[oracle@localhost oradata]$ cp /oradata/database/response/db_install.rsp /oradata\
编辑db_install.rsp
[oracle@localhost oradata]$ vim db_install.rsp
29 oracle.install.option=INSTALL_DB_AND_CONFIG
37 ORACLE_HOSTNAME=192.168.78.142
42 UNIX_GROUP_NAME=oinstall
49 INVENTORY_LOCATION=/oradata/soft/oraInventory
86 SELECTED_LANGUAGES=en,zh_CN
91 ORACLE_HOME=/oradata/soft/oracle11g/product/11.2.0.3/dbhome_1
96 ORACLE_BASE=/oradata/soft/oracle11g
107 oracle.install.db.InstallEdition=EE
154 oracle.install.db.DBA_GROUP=dba
160 oracle.install.db.OPER_GROUP=oper
189 oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
194 oracle.install.db.config.starterdb.globalDBName=prod
199 oracle.install.db.config.starterdb.SID=prod
213 oracle.install.db.config.starterdb.characterSet=AL32UTF8
221 oracle.install.db.config.starterdb.memoryOption=true
229 oracle.install.db.config.starterdb.memoryLimit=1024
262 oracle.install.db.config.starterdb.password.ALL=oracle
336 oracle.install.db.config.starterdb.storageType=FILE_SYSTEM_STORAGE
344 oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=/oradata/soft/oracle11g/data
351 oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=/oradata/soft/oracle11g/fast_recovery_area
400 DECLINE_SECURITY_UPDATES=true
11.安装数据库
操作用户oracle
[oracle@localhost database]$ pwd
/oradata/database
安装前将/oradata文件及目录下的所有文件文件夹的权限都属于oracle用户
[root@localhost soft]# chown -R oracle:oinstall /oradata/
[oracle@localhost database]$ ./runInstaller -silent -ignoreSysPrereqs -responseFile /oradata/db_install.rsp -ignorePrereq
As a root user, execute the following script(s):
1. /oradata/soft/oraInventory/orainstRoot.sh
2. /oradata/soft/oracle11g/product/11.2.0.3/dbhome_1/root.sh
以上两句执行命令将拷贝到root用户下执行
12.进入Oracle
[oracle@localhost database]$ sqlplus / as sysdba