Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the method of Linux cloning and installing Oracle database software?

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the relevant knowledge of "what is the method of Linux cloning and installing Oracle database software". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

I. Planning

Machine A

B machine

Linux version:

Linux 6.5 64-bit

Linux 6.5 64-bit

Oracle version:

11.2.0.4

11.2.0.4

ORACLE_BASE:

/ u01/app/oracle

/ u01/app/oracle

ORACLE_HOME:

/ u01/app/oracle/product/11.2.0/db_1

/ u01/app/oracle/product/11.2.0/db_1

If the configurations of several machines are similar, there is no need to install database software over and over again. In this case, clone installation can be used, which is faster than graphical interface and silent installation.

Source host: machine A, has installed the database software, installed the monitoring, and built the library

Target host: machine B, after installing the operating system, the configuration had better be the same as that of machine A.

Second, clear thinking

Step1: B machine to create users, groups

Step2: machine B creates a directory and grants permissions

Step3: B machine checks kernel parameters, user limits, environment variables, installation packages

Step4: a machine library, off monitoring

Step5: compress the directory on machine An and transfer it to the same directory on machine B.

Step6: B machine decompresses the compressed package passed over.

Step7: B machine modifies listening files and tns files

Step8: B machine runs runinstall script

Step9: B machine completes the check

III. Preparatory work

1. B machine creates users and user groups

# groupadd-g 501 oinstall

# groupadd-g 502 dba

# useradd-g oinstall-G dba-u 501-d / home/oracle oracle

Parameter description-g specifies the user group

-G specifies additional group

-d specify user directory

Activate oracle user (change oracle user password)

# passwd oracle

two。 Create a directory and configure permissions

# mkdir-p / u01/app/oracle/product/11.2.0/db_1

# mkdir-p / u01/setup/os-- for storing iso files in the operating system

# mkdir-p / u01/setup/db-for storing software package files

# mkdir-p / oradata-for storing data files

# mkdir-p / backup-used to store backup files

# mkdir-p / archivelog-used to store archive log files

# chown-R oracle:oinstall / U01

# chown-R oracle:oinstall / oradata

# chown-R oracle:oinstall / backup

# chown-R oracle:oinstall / archivelog

# chmod-R 775 / U01

# chmod-R 775 / oradata

# chmod-R 775 / backup

# chmod-R 775 / archivelog

Note: in a normal production environment, we install the database software (ORACLE_HOME) locally and the data (oradata/backup/archivelog) in storage

3. Check that the modified kernel parameters of machine B are the same as those of machine A.

# vi / etc/sysctl.conf

4. Check that the modified user limit file of machine B is consistent with that of machine A.

# vi / etc/security/limits.conf

5. Check that the Oracle environment variable of machine B is the same as that of machine A (oracle user)

$vi .bash _ pfile

6. B machine installs the corresponding requirement package

# yum install-y binutils compat* elfutils-libelf elfutils-libelf-devel glibc glibc-common glibc-devel gcc gcc-c++ libaio libgcc libstdc++ libstdc++-devel make sysstat unixODBC-devel libaio-devel ksh

IV. Start cloning

A machine operation:

1. Shut down the database

$sqlplus / as sysdba

SQL > shutdown immediate

two。 Turn off snooping

$lsnrctl stop

3. Package / u01/app/oracle/product/ directory

$cd / u01/app/oracle

$tar-cvf / u01/app/oracle/product.tar product/

4. Transfer the package to the B machine

$scp product.tar oracle@IP:/u01/app/oracle

Oracle@172.16.70.171's password:

Product.tar 100% 4225MB 62.1MB/s 01:08

B machine operation:

1. Extract the tar package

$cd / u01/app/oracle

$tar-xvf product.tar

two。 Check the listener.ora and tnsname.ora files in the $ORACLE_HOME/network/admin directory, and modify the HOST field to point to the local machine.

3. Run runinstall

$cd $ORACLE_HOME/oui/bin

$. / runInstaller-silent-clone ORACLE_BASE='/u01/app/oracle' ORACLE_HOME='/u01/app/oracle/product/11.2.0/db_1' ORACLE_HOME_NAME='ORACLE_HOME_1'; (custom name)

Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB. Actual 3999 MB Passed

Preparing to launch Oracle Universal Installer from / tmp/OraInstall2018-12-05-08-32-20AM. Please wait... [oracle@localhost bin] $Oracle Universal Installer, Version 11.2.0.4.0 Production

Copyright (C) 1999, 2013, Oracle. All rights reserved.

You can find the log of this install session at:

/ u01/app/oraInventory/logs/cloneActions2018-12-05 08-32-20AM.log

. 100% Done.

Installation in progress (Wednesday, December 5, 2018 8:32:30 AM EST)

.... 78% Done.

Install successful

Linking in progress (Wednesday, December 5, 2018 8:32:36 AM EST)

Link successful

Setup in progress (Wednesday, December 5, 2018 8:33:04 AM EST)

Setup successful

End of install phases. (Wednesday, December 5, 2018 8:33:27 AM EST)

WARNING:A new inventory has been created in this session. However, it has not yet been registered as the central inventory of this system.

To register the new inventory please run the script'/ u01 with root privileges.

If you do not register the inventory, you may not be able to update or patch the products you installed.

The following configuration scripts need to be executed as the "root" user.

/ u01/app/oraInventory/orainstRoot.sh

/ u01/app/oracle/product/11.2.0/db_1/root.sh

To execute the configuration scripts:

1. Open a terminal window

2. Log in as "root"

3. Run the scripts

The cloning of ORACLE_HOME_1 was successful.

Please check'/ u01/app/oraInventory/logs/cloneActions2018-12-05mm 08-32-20AM.log 'for more details.

At this point, the installation of the Oracle database software has been completed

1. Turn on monitoring

$lsnrctl start

two。 Verify the function of sqlplus

$sqlplus / as sysdba

(note that the database software has been installed and no library has been built.)

This is the end of the content of "what is the method of Linux cloning and installing Oracle database software". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report