Oracle dba with linux

Oracle dba with linux

You can install Oracle Database Express Edition using RPM packages.

An RPM-based installation performs preinstallation checks, extracts the database software, reassigns ownership of the extracted software to the preconfigured user and groups, maintains the Oracle inventory, and executes all root operations required to configure the Oracle Database software for a single-instance Oracle Database creation and configuration.

The RPM–based installation process detects when the minimum requirements for an installation are not met and prompts you to finish these minimum preinstallation requirements.

This section covers the following topics:

Installing Oracle Database XE Using RPM Packages

Perform the following steps to install and configure Oracle Database XE using RPM packages.

Before attempting to install Oracle Database XE 21c, uninstall any existing Oracle Database XE or database with the SID XE from the target system.

An Oracle Database XE installation will consume around 9 gigabytes of disk space under /opt . If this disk partition does not have the required disk space available, you must add space or mount an alternative partition as /opt/oracle . This disk partition is the defined Oracle Base where the software and database will reside.

The Oracle Database XE installation does not support usage of symbolic links (symlink) for that disk.

Installing Oracle Database XE RPM

    Use sudo to log in as root .

# dnf -y install oracle-database-preinstall-21c
# yum -y install oracle-database-preinstall-21c
# curl -o oracle-database-preinstall-21c-1.0-1.el7.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracle-database-preinstall-21c-1.0-1.el7.x86_64.rpm # yum -y localinstall oracle-database-preinstall-21c-1.0-1.el7.x86_64.rpm
# curl -o oracle-database-preinstall-21c-1.0-1.el8.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/getPackage/oracle-database-preinstall-21c-1.0-1.el8.x86_64.rpm # dnf -y localinstall oracle-database-preinstall-21c-1.0-1.el8.x86_64.rpm
  • The Oracle Database Preinstallation RPM automatically creates Oracle installation owner and groups. It also sets up other kernel configuration settings required for Oracle installations. If you plan to use job-role separation, then create the extended set of database users and groups depending on your requirements.
  • Use the -y option if you want yum to skip the package confirmation prompt.
  • The yum command that is provided with Oracle Linux 8 is a symbolic link to the dnf command. The yum and dnf commands are completely interchangeable. However, the dnf command provides significant improvements in functionality and performance when compared to the yum command.
  • See, About DNF for more information about the dnf command.
  • For Oracle Linux 7: oracle-database-xe-21c-1.0-1.ol7.x86_64.rpm
  • For Oracle Linux 8: oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm
# yum -y localinstall oracle-database-xe-21c-1.0-1.ol7.x86_64.rpm
# dnf -y localinstall oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm

Check the RPM log file to review the system configuration changes. For example, review this file for latest changes: /var/log/oracle-database-preinstall-21c/results/orakernel.log .

Читайте также:  Firefox fonts in linux

The installation of Oracle Database software is now complete.

Creating and Configuring an Oracle Database

The configuration script creates a container database ( XE ) with one pluggable database ( XEPDB1 ) and configures the listener at the default port (1521) and Enterprise Manager Express on port 5500.

You can modify the configuration parameters by editing the /etc/sysconfig/oracle—xe–21c.conf file.

The parameters set in this file are explained in more details in the silent mode installation procedure: Performing a Silent Installation.

To create the Oracle XE database with the default settings, perform the following steps:

    Execute as user root using sudo .

# /etc/init.d/oracle-xe-21c configure

At the prompt, specify a password for the SYS , SYSTEM , and PDBADMIN administrative user accounts. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit 2.

See Also: The same password will be used for these accounts. The password should conform to the Oracle recommended standards. See Oracle Database Security Guide for more information about guidelines for securing passwords

Configuration, Database Files and Logs Location

Table 5-1 Configuration, Database Files and Logs Location

Oracle Base. This is the root of the Oracle Database XE directory tree.

Oracle Home. This home is where the Oracle Database XE is installed. It contains the directories of the Oracle Database XE executables and network files.

Diagnostic logs. The database alert log is /opt/oracle/diag/rdbms/xe/XE/trace/alert_XE.log

Database creation logs. The XE.log file contains the results of the database creation script execution.

Configuration default parameters.

Configuration and services script.

Читайте также:  Linux mint mate оболочка

If a host does not have any IP address other than loop back address assigned (typically in a docker or in an another container environment), Oracle Net Configuration Assistant (Oracle NETCA) may fail during the installation with the error No valid IP Address returned for the host hostname in the netca trace log. Please assign an IP address and retry the installation.

Performing a Silent Installation

You can install Oracle Express Edition using the silent mode. This mode can be used for embedded install of XE (with your application) or unattended operation.

To perform a silent installation, a password for the administrative accounts must be provided as a parameter to the script, or specified in the configuration file.

    Create a wrapper shell script to perform the silent installation. It should contain commands similar to the following: For Oracle Linux 7 :

#!/bin/bash yum -y localinstall /downloads/oracle-database-xe-21c-1.0-1.ol7.x86_64.rpm > /xe_logs/XEsilentinstall.log 2>&1 /etc/init.d/oracle-xe-21c configure >> /xe_logs/XEsilentinstall.log 2>&1
#!/bin/bash yum -y localinstall /downloads/oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm > /xe_logs/XEsilentinstall.log 2>&1 /etc/init.d/oracle-xe-21c configure >> /xe_logs/XEsilentinstall.log 2>&1
(echo "password"; echo "password";) | /etc/init.d/oracle-xe-21c configure >> /xe_logs/XEsilentinstall.log 2>&1

The XE database is configured with default settings. It is not necessary to modify these parameters unless you have specific requirements. Make a copy of the configuration file /etc/sysconfig/oracle-xe-21c.conf before modifying it. Make your modifications after the RPM install and before configuring the database.

The provided configuration file /etc/sysconfig/oracle-xe-21c.conf sets the following:

  • LISTENER_PORT : A valid listener numeric port value for the database listener. Do not specify for automatic port assignment.
  • EM_EXPRESS_PORT : A valid port numeric value for Oracle Enterprise Manager (EM) Express listener. This is set to port 5500.
  • CHARSET : Character set of the database. This is set to AL32UTF8 .
  • DBFILE_DEST Database file directory. By default, the database files are stored in the Oracle Base /opt/oracle/oradata subdirectory. You can also create your own database file directory. However, the permissions for this file path should be owned by oracle user .
  • SKIP_VALIDATIONS : Skip validation for memory and disk space. Default: false.
Читайте также:  Linux ip address information

When you modify and save a file containing plain text password, ownership of the file should be given to the Oracle software installation owner only, and permissions on the file should be changed to 600. Oracle strongly recommends that database administrators or other administrators delete or secure such files containing plain text passwords when they are not in use.

The password should conform to the Oracle recommended standards. See Oracle Database Security Guide for more information about guidelines for securing passwords

You can find the database creation logs under the Oracle Base /opt/oracle/cfgtoollogs/dbca/ subdirectory.

Configuration, Database Files and Logs Location for a summary of important files and their locations

Setting the Oracle Database XE Environment Variables

After you have installed and configured Oracle Database XE, you must set the environment before using Oracle Database XE.

The oraenv and coraenv scripts can be used to set your environment variables.

For example, to set your environment variables in Bourne, Bash, or Korn shell without being prompted by the script:

$ export ORACLE_SID=XE $ export ORAENV_ASK=NO $ . /opt/oracle/product/21c/dbhomeXE/bin/oraenv ORACLE_HOME = [] ? /opt/oracle/product/21c/dbhomeXE The Oracle base has been set to /opt/oracle
$ setenv ORACLE_SID XE $ setenv ORACLEENV_ASK NO $ source /opt/oracle/product/21c/dbhomeXE/bin/coraenv

Источник

Оцените статью
Adblock
detector