Clone an existing Oracle Home without the trouble of installing the new oracle10g software. If the original Oracle Home has installed a patch, you can skip patch.
1. Prepare for installation on the target host 172.19.111.37
1. Add a group and a user (the directory structure of the clone host is the same)
# Groupadd oinstall
# Groupadd dba
# Userdel oracle10
# Useradd-g oinstall-G dba-d/opt/oracle/oracle10-m-s/bin/ksh oracle10
# Passwd-r files oracle10
2. Create a directory
# Mkdir/opt/oracle/oradata/oracle10_data (store data files for future database creation)
# Chown oracle10: oinstall/opt/oracle/oradata/oracle10_data
# Chmod 755/opt/oracle/oradata/oracle10_data
# Mkdir/opt/oracle/oradata/flash_recovery_area)
# Chown oracle10: oinstall/opt/oracle/oradata/flash_recovery_area
# Chmod 755/opt/oracle/oradata/flash_recovery_area
3. Modify the oratab File Permission
# More/var/opt/oracle/oratab
# Chown oracle10: oinstall/var/opt/oracle/oratab
# Chmod 755/var/opt/oracle/oratab
4. Stop the existing oracle listening process.
# Su-oracle
$ Lsnrctl stop
$ Sqlplus '/as sysdba'
SQL> shutdown immediate
2. Stop and clone all processes related to ORACLE_HOME on host 172.19.111.38
$ Emctl stop dbconsole (stop Database Control)
$ Lsnrctl stop (stop Net Listener)
$ Isqlplusctl stop (stop iSQL * PLUS)
$ Searchctl stop (stop Ultra Search)
3. zip the content in the cloned host ORACLE_HOME directory
$ Cd $ ORACLE_HOME /../
$ Zip-r db_1.zip/opt/oracle/oracle10/app/product/10.2.0/Db_1
Note: Do not package the admin, flash_recovery_area, and oradata directories. Clone them and generate them again.
4. Copy the zip package and. profile file to the target host.
$ Ftp 172.19.111.37
Ftp> user oracle10 oracle10
Upload db_1.zip and. profile
5. decompress the zip package to the target host.
$ .. Profile
$ Unzip-d/db_1.zip
6. Go to the decompressed ORACLE_HOME directory and delete all the $ ORACLE_HOME/network/admin/*. ora files.
$ Cd $ ORACLE_HOME/network/admin
$ Rm *. ora
7. Start OUI in clone mode (XBrower login is not required). ORACLE_HOME_NAME must be unique.
$ ORACLE_HOME/oui/bin/runInstaller-silent-clone ORACLE_HOME = "/opt/oracle/oracle10/app/product/10.2.0/Db_1" ORACLE_HOME_NAME = "db_1"
8. Create a database (use XBrower to log on)
$ Cd $ ORACLE_HOME/bin
$./Dbca
9. Network Configuration Assistant (use XBrower to log on)
$ Cd $ ORACLE_HOME/bin
$./Netca
Listener configuration and Local net service name configuration (assuming the configuration is orcl10)
10. Test
$ Ps-ef | grep ora _ (check whether oracle10g is started)
$ Lsnrctl status (check whether the listener is started)
$ Tnsping orcl10 (check whether the configured network service name is correct)
$ Emctl start dbconsole (start database console)
$ Isqlplusctl start (start isqlplus)
Go to http: // 172.19.111.37: 5500/em/to view the database status.