[root@install0 ~]# /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 oinstall. The execution of the script is complete. [root@install0 ~]# /u01/app/oracle/product/11.2.0/db_1/root.sh Performing root user operation for Oracle 11g
The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/app/oracle/product/11.2.0/db_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 script. Now product-specific root actions will be performed. Finished product-specific root actions.
Checking Temp space: must be greater than 120 MB. Actual 28261 MB Passed Checking swap space: must be greater than 150 MB. Actual 3999 MB Passed Preparing to launch Oracle Universal Installer from /tmp/OraInstall2017-05-26_02-25-51PM. Please wait ...[oracle@install0 database]$ You can find the log of this install session at: /u01/app/oraInventory/logs/installActions2017-05-26_02-25-51PM.log The installation of Oracle Database 11g was successful. Please check '/u01/app/oraInventory/logs/silentInstall2017-05-26_02-25-51PM.log' for more details.
As a root user, execute the following script(s): 1. /u01/app/oraInventory/orainstRoot.sh 2. /u01/app/oracle/product/11.2.0/db1/root.sh
Successfully Setup Software.
克隆安装
第三种安装方法:克隆安装
将安装好的数据库产品,克隆到宿主机
在虚拟机中将数据库正常停止
SQL> conn / as sysdba SQL> shut immediate
宿主机创建组和用户
组:oinstall,dba
用户:oracle
修改用户的.bashrc
创建安装目录:/u01/app/
修改宿主机shell限制
修改宿主机内核参数,并且生效
将虚拟机/u01/app/* 传到宿主机/u01/app/
cd /u01/app/ tar -cf - oraInventory | ssh oracle@172.25.0.12 'cd /u01/app; tar -xf -'
cd /u01/app/oracle/product/11.2.0 tar -cf - db_1 | ssh oracle@172.25.254.250 'cd /u01/app/oracle/product/11.2.0; tar -xf -'
SQL*Plus: Release 11.2.0.4.0 Production on Fri May 26 16:41:23 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> show parameter name
NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ cell_offloadgroup_name string db_file_name_convert string db_name string db01 db_unique_name string db01 global_names boolean FALSE instance_name string db01 lock_name_space string log_file_name_convert string processor_group_name string service_names string db01 SQL> select name from v$datafile;
NAME -------------------------------------------------------------------------------- /u01/app/oracle/oradata/db01/system01.dbf /u01/app/oracle/oradata/db01/sysaux01.dbf /u01/app/oracle/oradata/db01/undotbs01.dbf /u01/app/oracle/oradata/db01/users01.dbf SQL> select status from v$instance;
STATUS ------------ OPEN
连接数据库
sqlplus / as sysdba SQL> show user USER is "SYS" # 查看当前数据库的状态: SQL> select status from v$instance;