The author | | DatabaseHobbyist source database (ID: Database_Hobbyist)

Oracle 19C client can connect directly to 11G 12C 19C database, backward compatible, easy to install.

1. Download from the client

The 19C client can be downloaded from the following address, we can choose the first or third 64-bit download, here I choose the third download. Software if there is no download permission can be private I get.

www.oracle.com/cn/database…

Can also refer to official installation manual: docs.oracle.com/en/database…

2. Create users and groups as user root

[root@t-tableau ~]# cat etc/ Redhat – Release Red Hat Enterprise Linux Server release 7.6 (Maipo)[root@t-tableau ~]# uname -Alinux t-tableau-197 3.10.0-957.el7.x86_64 #1 SMP Thu Oct 4 20:48:51 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux [root@t-tableau ~]# id oracle uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54323(oper)\

/usr/sbin/groupadd -g 54321 oinstall

/usr/sbin/groupadd -g 54322 dba

/usr/sbin/groupadd -g 54323 oper

/usr/sbin/useradd -u 54321 -g oinstall -G dba oracle

passwd oracle

# /usr/sbin/usermod -g oinstall -g dba,oper oracle

# id oracle

uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54323(oper)

3. Create a folder and assign permissions to it

Mkdir -p u01 / app/oracle/product / 19.0.0 / client_1 mkdir -p u01 / soft # storage software chown -r oracle: oinstall u01 chown -r oracle:oinstall u01/app/oracle chmod -R 775 u01Copy the code

4. Configure environment variables

-- Oracle user vi. Bash_profile add the following configuration vi. Bash_profile umask 022 export PS1=" 'whoami' @ 'hostname' :"'[$PWD]$' export HOST=`hostname | cut -f1 -d"."` export PS1='${HOST}:$PWD(${ORACLE_SID})$ ' export LANG=en_US # +---------------------------------------------+ # | SETUP ORACLE ENVIRONMENT | # +---------------------------------------------+ export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME = $ORACLE_BASE/product / 19.0.0 / client_1 export ORACLE_SID = test export ORACLE_TERM = xterm; export PATH=.:$PATH:$HOME/.local/bin:$HOME/bin:$ORACLE_HOME/OPatch:$ORACLE_HOME/bin export NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS" export NLS_LANG=AMERICAN_AMERICA.AL32UTF8 export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib source ~/.bash_profile -- makes this file validCopy the code

5. Upload the Oracle19c client software and decompress it

Starting with Oracle Database 19C, it simplifies the installation and configuration of the Oracle Database Client software with image-based installation.

To install the Oracle database client, create a new Oracle home directory, unzip the image files into the newly created Oracle home directory, and run the Installation wizard to register the Oracle database products. You must unzip the image software (client_home.zip) into the directory where you want the Oracle database client home directory to be, and then run the Installation wizard to start the Oracle database client installation and configuration.

Before decompressing, you need to verify file integrity to prevent serious problems caused by damage, modification, trojans, etc. Here use SHA256sum to verify.

t-tableau-197:/u01/soft(test)$ sha256sum LINUX.X64_193000_client_home.zip Df3ef12bc19d03cb3331ccdf3490ec361b6ed5d243da32df583f02f0774e2315 LINUX. X64_193000_client_home.zip -- -- (987216967 bytes) (sha256sum - df3ef12bc19d03cb3331ccdf3490ec361b6ed5d243da32df583f02f0774e2315) - website size t - tableau - 197: / u01 / soft (test) $ t-tableau-197:/u01/soft(test)$ cksum LINUX.X64_193000_client_home.zip 2828959120 987216967 LINUX.X64_193000_client_home.zip t-tableau-197:/u01/soft(test)$ ll LINUX.X64_193000_client_home.zip -rw-r--r-- 1 oracle oinstall 987216967 Aug 4 16:27 LINUX.X64_193000_client_home.zipCopy the code

- into the main directory u01 / app/oracle/product / 19.0.0 / u01 / soft/client_1 CD $mkdir -p u01 / app/oracle/product / $CHGRP 19.0.0 / client_1 Oinstall u01 / app/oracle/product / 19.0.0 / client_1 $CD u01 / app/oracle/product / 19.0.0 / client_1 $unzip - q u01/soft/LINUX.X64_193000_client_home.zipCopy the code

6. Configure the response file client_install.rsp

Warning:

When you modify the response file template and save the file for use, the response file may contain plain text passwords. Ownership of the response file should be granted only to the Oracle software installation owner, and the permissions for the response file should be changed to 600. Oracle strongly recommends that database administrators or other administrators delete or secure response files when they are not in use.

The response file is stored in the decompressed client software in the following path

/ u01 / app/oracle/product / 19.0.0 / client_1 / inventory/response

T - tableau - 197: / u01 / app/oracle/product / 19.0.0 / client_1. (test) $find / -name client_install. RSP . / inventory/response/client_install. RSP t - tableau - 197: / u01 / app/oracle/product / 19.0.0 / client_1 $CD (test) . / inventory/response/CD u01 / app/oracle/product / 19.0.0 / client_1 / inventory/response cp client_install RSP u01 / soft/CD u01/soft/ cat client_install.rsp | grep -v ^# | grep -v ^$ > u01/soft/new_client_install.rsp vim U01 /soft/new_client_install. RSP Modify the following parameters: UNIX_GROUP_NAME = oinstall INVENTORY_LOCATION = / u01 / app/oraInventory ORACLE_HOME = u01 / app/oracle/product / 19.0.0 / client_1 ORACLE_BASE=/u01/app/oracle oracle.install.client.installType=AdministratorCopy the code

chmod 600 /u01/soft/new_client_install.rsp

Ensure that only Oracle software owner users can view or modify the response file, or consider deleting it after a successful installation.

7.Install the client software silently in the decompressed client directory

If the full path is of course nowhere, here is the official example:

$ directory_path/runInstaller [-silent] [-noconfig] \
 -responseFile responsefilename
Copy the code

In this example:

Directory_path is the path to the directory where you copied the installation binaries.

-silent Runs the installation program in silent mode.

-noconfig Disables the configuration assistant during the installation and installs pure software.

Responsefilename is the full path and filename of the installation responsefile that you configured.

Perform silent installation as Oracle user.

CD/u01 / app/oracle/product / 19.0.0 / client_1. / runInstaller - silent - responseFile/u01 / soft/new_client_install RSPCopy the code

$/ u01 / app/oracle/product / 19.0.0 / client_1 / runInstaller - silent - responseFile/u01 / soft/new_client_install RSP Launching Oracle Database Client Setup Wizard... [WARNING] [INS-13014] Target environment does not meet some optional requirements. CAUSE: Some of the optional prerequisites are not met. See logs for details. installActions2021-08-04_06-16-00PM.log ACTION: Identify the list of failed prerequisite checks from the log: installActions2021-08-04_06-16-00PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually. The response file for this session can be found at: / u01 / app/oracle/product / 19.0.0 / client_1 / install/response/client_2021-08-04 _06-16-00 PM. RSP You can find the log of this install session at: /tmp/InstallActions2021-08-04_06-16-00PM/installActions2021-08-04_06-16-00PM.log As a root user, execute the following script(s): 1. /u01/app/oraInventory/orainstRoot.sh Execute /u01/app/oraInventory/orainstRoot.sh on the following nodes: [t-tableau-197] Successfully Setup Software with warning(s). Moved the install session logs to: / u01 / app/oraInventory/logs/InstallActions2021-08-04 _06-16-00 PM - according to the prompt execution orainstRoot. Sh scripts/root @ t - tableau - 197 ~ # /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.Copy the code

Check log without any errors!!

8. Configure the tnsnames.ora file

Configure $ORACLE_HOME/network/admin to create a listening file and configure the following information:

JIEKEXU =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.10.10)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = JiekeXu)
    )
  )
Copy the code

9. Connect the test

$ sqlplus /nolog SQL*Plus: Release 19.0.0.0.0 - Production on Wed Aug 4 18:34:12 2021 Version 19.3.0.0.0 Copyright (c) 1982, 2019, SQL> -- Test connection to remote 19C database Scott user $sqlplus Scott /scott@JIEKEXU SQL*Plus: Release 19.0.0.0.0 - Production on Wed Aug 4 18:38:42 2021 Version 19.3.0.0.0 Copyright (c) 1982, 2019, Oracle. All rights reserved. Last Successful login time: Fri Jul 16 2021 10:38:58 +08:00 Connected to: Oracle Database 19C Enterprise Edition Release 19.0.0.0.0 - Production Version 19.3.0.0.0 SQL> select table_name from Oracle Database 19C Enterprise Edition Release 19.0.0.0.0 - Production Version 19.3.0.0.0 tabs; TABLE_NAME -------------------------------------------------------------------------------- T T_OGG_TEST TEST SALGRADE BONUS EMP DEPT 7 rows selected. SQL> show user; USER is "SCOTT"Copy the code

Test connection to 11G remote server

After the client is installed, other users, such as Weblogic and Tableau, usually need to connect. Therefore, copy the environment variable.bash_profile of Oracle user to its user source and connect to it after it takes effect.

10. Example of uninstalling the Oracle database client

Using these examples can help you understand how to run the deinstall command. Deinstall can be run from the $ORACLE_HOME/deinstall directory. You will not be prompted for the Oracle primary path when the uninstall begins.

$ ./deinstall
Copy the code

If you have a response file, use the optional flag -paramFile to provide the path to the response file.

You can generate the uninstall response file by running the deinstall command with the -checkonly flag. Or, you can use in the following locations of the response file template $ORACLE_HOME/deinstall/response/deinstall RSP. TMPL.

In the example below, the deinstall command is located in the path/u01 / app/oracle/product / 19.0.0 / client_1 / deinstall. It uses the response file /home/usr/oracle called by my_db_paramfile.tmpl at the software owner’s location:

$CD/u01 / app/oracle/product / 19.0.0 / client_1 / deinstall $. / deinstall - paramfile/home/usr/oracle/my_db_paramfile TMPLCopy the code

If this article is helpful to you, welcome to praise, look and forward, writing is not easy, insist on writing is not easy, your praise, forward, lift a finger, is the biggest support for the author, but also can let more people benefit, thank you!

— — — — — — — — — — — — — –

Public account: JiekeXu DBA Road

The ink pulley:www.modb.pro/u/4347

CSDN:blog.csdn.net/JiekeXu

Tencent cloud:Cloud.tencent.com/developer/u…

— — — — — — — — — — — — — –