- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
01-Text | 6.72 MB |
Setting the number of file descriptors
Setting the number of user processes
Checking the required software packages
Creating operating system users and groups
Modifying the permissions on the Oracle home directory
Configuring the Oracle base directory
Setting environment variables for the Oracle database
Setting environment variables for the oracle user
Setting the NLS_LANG environment variable
Adding the IP-to-host name mapping in /etc/hosts
Preparing the installation package
Database installation requirements for IMC
Installing and configuring the Oracle database server
Installing the Oracle database server
Configuring the Oracle database listener
Configuring the network service name of the database
Installing and configuring the Oracle database client
Testing the connectivity to the server
Managing Oracle Database 12c R2
Starting the Oracle service manually
Stopping the Oracle service manually
Configuring network service names
Setting the maximum number of Oracle processes and Oracle connection limit
Automating Oracle database startup on Linux
Automating PDB database startup
Adding storage space to the database
Adding database storage space through Oracle Enterprise Manager
Adding database storage space through SQL statements
Modifying database memory settings
Removing Oracle Database 12c R2
Overview
This guide describes the installation of Oracle Database 12c R2 for IMC on Red Hat Enterprise Linux Server 7.3. If your installation of Oracle Database 12c R2 uses a different version of Red Hat Enterprise Linux, see the Oracle database installation documents for your Linux version.
To achieve optimized performance of the system running the Oracle database, see Oracle Database Installation Guide and Oracle Database Quick Installation Guide at the Oracle website.
After you install Oracle Database 12c R2, configure the following Oracle management features to ensure correct operation of IMC:
· Setting the maximum number of Oracle processes and Oracle connection limit
· Adding storage space to the database
· Modifying database memory settings
To install IMC, you must restart the operating system after configuring these features.
Preparing for installation
The following information describes the tasks you must complete in Linux as the root user before installing Oracle Database 12c R2.
To avoid installation errors, use the keyboard to type your entries rather than using cut-and-paste for user input.
The Oracle Database 12c R2 server is supported only on 64-bit Linux, and the Oracle Database 12c R2 client is supported on both 64-bit Linux and 32-bit Linux. For more information, see Oracle Database Installation Guide 12c Release 2 (12.2) for Linux.
Disabling the firewall
Log in to the system as a root user and execute the following commands to disable the firewall:
systemctl stop firewalld.service
systemctl disable firewalld.service
To view the firewall status, use the following command:
systemctl status firewalld.service
Disabling SELinux
1. Open the SELinux configuration file.
vim /etc/selinux/config
2. Set the value for the SELINUX parameter to disabled.
SELINUX=disabled
3. Save the configuration and restart the system.
Setting the number of file descriptors
1. Log in to the system as a root user to view the number of file descriptors.
ulimit –n
2. If the number of file descriptors is less than 65535, open the limits.conf file.
vim /etc/security/limits.conf
3. Add the following parameter settings at the end of the file. If the parameters already exist, make sure the parameter values are greater than 65535.
* soft nofile 65535
* hard nofile 65535
4. Save the configuration and restart the system.
Setting the number of user processes
1. Log in to the system as a root user to open the 20-nproc.conf file.
vim /etc/security/limits.d/20-nproc.conf
2. Change the default value to 40960.
* soft nproc 40960
root soft nproc unlimited
3. Save the configuration and restart the system.
Checking the required software packages
Before installing the Oracle database and IMC, make sure you have installed all required packages on the Linux operating system.
The software packages are stored in the Packages directory of the Linux installation drive. Use the rpm -ivh --nodeps xxx.rpm command to install the packages without a package dependency check.
IMPORTANT: · To identify all packages that are already installed on the system, use the rpm –qa command. To determine whether a required software package has been installed, use the rpm -q command. · RHEL 7.X does not provide the compat-libstdc++-33 installation package. To ensure correct operation of IMC, locate the package in RHEL 6.X or download it from the associated website. |
The following 64-bit software packages, or later packages, are required:
· binutils-2.25.1-22.base.el7.x86_64.rpm
· compat-libcap1-1.10-7.el7.x86_64.rpm
· cpp-4.8.5-11.el7.x86_64.rpm
· elfutils-libelf-0.166-2.el7.x86_64.rpm
· elfutils-libelf-devel-0.166-2.el7.x86_64.rpm
· gcc-4.8.5-11.el7.x86_64.rpm
· gcc-c++-4.8.5-11.el7.x86_64.rpm
· glibc-2.17-157.el7.x86_64.rpm
· glibc-common-2.17-157.el7.x86_64.rpm
· glibc-devel-2.17-157.el7.x86_64.rpm
· ksh-20120801-26.el7.x86_64.rpm
· libaio-0.3.109-13.el7.x86_64.rpm
· libaio-devel-0.3.109-13.el7.x86_64.rpm
· libgcc-4.8.5-11.el7.x86_64.rpm
· libstdc++-4.8.5-11.el7.x86_64.rpm
· libstdc++-devel-4.8.5-11.el7.x86_64.rpm
· libXext-1.3.3-3.el7.x86_64.rpm
· make-3.82-23.el7.x86_64.rpm
· mpfr-3.1.1-4.el7.x86_64.rpm
· sysstat-10.1.5-11.el7.x86_64.rpm
· unixODBC-2.3.1-11.el7.x86_64.rpm
· unixODBC-devel-2.3.1-11.el7.x86_64.rpm
The following 32-bit software packages, or later packages, are required:
· glibc-2.17-157.el7.i686.rpm
· glibc-devel-2.17-157.el7.i686.rpm
· libaio-0.3.109-13.el7.i686.rpm
· libao-1.1.0-8.el7.i686.rpm
· libgcc-4.8.5-11.el7.i686.rpm
· libstdc++-4.8.5-11.el7.i686.rpm
· nss-softokn-freebl-3.16.2.3-14.4.el7.i686.rpm
· compat-libstdc++-33-3.2.3-69.el6.i686.rpm
Checking the disk space
Check the amount of free disk space on the system by using the df –k command.
The following disk space requirements must be met for Oracle installation:
· A minimum of 10 GB of free space in the /home directory.
· A minimum of 400 MB of free space in the /tmp directory.
The actual disk space requirements depend on the numbers of managed devices and performance monitoring instances. For more information, see the H3C IMC deployment guides.
Creating operating system users and groups
Create the oracle user, the oinstall group, and the dba group before installing Oracle.
· Only the oracle user can install, start, or stop the Oracle database.
· The oinstall group users can install Oracle software.
· The dba group users can manage the database.
To create the required users and groups:
1. Create the oinstall and the dba groups.
groupadd oinstall
groupadd dba
2. Create the oracle user and set the password of the user.
useradd -g oinstall -G dba –d /home/oracle –m –s /bin/bash oracle
passwd oracle
Modifying the permissions on the Oracle home directory
Grant the oracle user permissions to run the database installation program from the Oracle installation directory (/home/oracle).
chown -R oracle:oinstall /home/oracle/
chmod -R 775 /home/oracle/
Configuring the Oracle base directory
1. Create the Oracle base directory.
mkdir -p /u01/app/
2. Set the directory owner and owner permissions.
chown -R oracle:oinstall /u01/app/
chmod -R 775 /u01/app/
Adjusting kernel parameters
To ensure normal operation of the Oracle database, adjust the kernel parameters:
1. Open the sysctl.conf file.
vi /etc/sysctl.conf
2. Set the following variable values:
kernel.shmall=3294764
kernel.shmmax=16869195776
kernel.shmmni=4096
kernel.sem=250 32000 100 128
fs.file-max=6815744
fs.suid_dumpable=1
fs.aio-max-nr=1048576
net.ipv4.ip_local_port_range=9000 65500
net.core.rmem_default=4194304
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048576
3. Save and close the file.
4. Validate the new settings.
/sbin/sysctl -p /etc/sysctl.conf
|
NOTE: This example uses the minimum values for the kernel parameters. As a best practice, tune these values for optimal system performance. |
Setting environment variables for the Oracle database
CAUTION: · Before you install the Oracle database, verify that the environment variable settings have taken effect. If the environment variable settings have not taken effect, database installation might fail. For more information, see "How can I identify whether the environment variable settings have taken effect?" · If the Oracle database adopts independent deployment (remote database), and the global database variables configuration causes startup failure of other third-party software, perform the configuration as shown in "After you configure global database variables, other third-party software cannot start. How can I resolve this issue?" |
Set environment variables for the Oracle database in the profile file to automatically take effect at Linux startup.
To set the environment variables:
1. Open the profile file.
vi /etc/profile
2. Add the following content to the profile file:
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/12.2.0/db_1
ORACLE_SID=orcl
PATH=$PATH:$ORACLE_HOME/bin:$HOME/bin
LD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH LD_LIBRARY_PATH
The variable description is as follows:
¡ ORACLE_BASE—Oracle base directory.
¡ ORACLE_HOME—Oracle home directory.
¡ ORACLE_SID—Oracle database instance ID. Use the same instance ID for Oracle database installation.
3. Save and close the file.
Setting environment variables for the oracle user
1. Open the .bash_profile file.
vi /home/oracle/.bash_profile
2. Set the language variable according to the language your system supports.
LANG=en_US.UTF-8
export LANG
3. Add the following content to the end of the file:
umask 022
4. Save the file.
5. Switch to oracle and validate the new settings.
su – oracle
export DISPLAY=localhost:0.0
6. Switch to root.
exit
Setting the NLS_LANG environment variable
1. Open the profile file.
vi /etc/profile
2. Add the following content to the file:
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P15
export NLS_LANG
3. Save and close the file.
The environment variable automatically takes effect at Linux startup.
IMPORTANT: · Set the correct value. Otherwise, Oracle database and IMC data cannot be displayed correctly. For more information about determining the NLS_LANG value, see Oracle Database Globalization Support Guide. · If the Oracle database is deployed on the same server as the IMC server, set the NLS_LANG environment variable. |
Adding the IP-to-host name mapping in /etc/hosts
1. Open the /etc/hosts file.
vi /etc/hosts
2. Add a line of text in the format ip-address localhost localhost.localdomain.
As shown in Figure 1, enter 10.114.119.65 imctest imctest.h3c to map 10.114.119.65 to the host name imctest in the h3c domain.
Figure 1 Modifying the /etc/hosts file
If IMC products use a remote database, add another line of mapping between the IP address of the remote database server and the host name for fast DNS resolution.
3. Save and close the file.
Preparing the installation package
Copy the Oracle installation package to the /home/oracle directory and decompress the package. If you use the installation CD, follow the instructions on the CD.
Database installation requirements for IMC
Install the Oracle database before you install IMC. IMC supports both local and remote databases.
To install a local Oracle database for IMC, perform the steps in "Installing and configuring the Oracle database server."
To install a remote Oracle database for IMC:
1. Install the database server on the remote server.
See "Installing and configuring the Oracle database server" for the operation procedure.
2. Configure the following items on the database server:
¡ A listener for receiving remote database connection request.
¡ A network service name.
¡ A data file folder for storing IMC data. You will need to specify the path to the folder during IMC installation. For more information, see the H3C IMC deployment guides.
3. On the server where you plan to install IMC, install the Oracle client for IMC to connect to the Oracle database.
The client version must match the version of the Oracle database server. IMC uses the client to connect to the Oracle database.
4. Configure the network service name on the client. It must be the same as the network service name that is configured on the database server.
For information about installing the Oracle client and configuring the network service name for the client, see "Installing and configuring the Oracle database client."
If you plan to deploy IMC in distributed mode, be sure to configure the correct network service names on the IMC servers for them to connect to the database. During IMC installation, you need to specify the network service name to be used by IMC for database connection.
The network service name configuration varies depending on whether IMC uses local or remote databases, as illustrated in the following examples.
· Example 1:
IMC server A (master server), and server B and C (subordinate servers) use their respective local databases.
For each database, you must assign a unique network service name. In this example, TNSNAME_A, TNSNAME_B, and TNSNAME_C are the network service names for accessing the databases on servers A, B, and C, respectively.
For the servers to communicate with each other, you must configure all these network service names on each IMC server. Make sure the settings for each network service name are the same across all servers.
· Example 2:
IMC server A (master server), and servers B and C (subordinate servers) share a remote database server, DBServer_D.
In this scenario, you must configure the servers as follows:
¡ Install the Oracle client on each IMC server to connect to the remote database server.
¡ Configure the same network service name (for example, TNSNAME_D) for accessing the database across all servers, including the IMC servers (Oracle clients) and the database server.
Installing and configuring the Oracle database server
To install and configure the database, log in to Linux as oracle. Execute commands in subsequent sections as oracle, unless otherwise specified.
Installing the Oracle database server
1. Restart the operating system after you complete all preparation tasks in "Preparing for installation."
2. Log in to Linux as oracle, and then start the database installation wizard in the Oracle installation package directory.
./runInstaller
The Configure Security Update page opens, as shown in Figure 2.
Figure 2 Configure Security Updates page
3. Configure security updates settings as needed.
¡ To receive security updates, enter an email address and click Next.
You can also select I wish to receive security updates via My Oracle Support and enter your password next to My Oracle Support Password to receive security updates.
¡ If you prefer not to receive security updates, click Next without providing the email or password. Click Yes in the dialog box shown in Figure 3, and then click Next.
Figure 3 Email Address Not Specified
The Select Installation Option page opens, as shown in Figure 4.
Figure 4 Select Installation Option page
4. Select Create and configure a database and click Next.
The System Class page opens, as shown in Figure 5.
Figure 5 System Class page
5. Select Server class and click Next.
The Grid Installation Options page opens, as shown in Figure 6.
Figure 6 Grid Installation Options page
6. Select Single instance database installation and click Next.
The Select Install Type page opens, as shown in Figure 7.
Figure 7 Select Install Type page
7. Select Advanced install and click Next.
The Select Database Edition page opens, as shown in Figure 8.
Figure 8 Select Database Edition page
8. Select Enterprise Edition (7.5GB) and click Next.
The Specify Installation Location page opens, as shown in Figure 9.
Figure 9 Specify Installation Location page
9. Click Next, with the default settings unchanged.
The Create Inventory page opens, as shown in Figure 10.
Figure 10 Create Inventory page
10. Click Next, with the default settings unchanged.
The Select Configuration Type page opens, as shown in Figure 11.
Figure 11 Select Configuration Type page
11. Select General Purpose / Transaction Processing and click Next.
The Specify Database Identifiers page opens, as shown in Figure 12.
Figure 12 Specify Database Identifiers page
12. Configure the following parameters:
¡ Enter the global database name. This example uses orcl.
¡ Enter the oracle system identifier (SID), which must be consistent with the ORACLE_SID variable setting in the profile file. This example uses orcl. For more information, see "Setting environment variables for the Oracle database."
¡ Clear the Create as Container database option to create a non-container database.
The Create as Container database option is selected by default to create a container database. When this option is selected, configure the pluggable database name in the Pluggable database name field or use the default name pdborcl. IMC communicates with the pluggable database during operation. The configurations of the listener and network service name differ for the container database and non-container database. For more information, see "Configuring the Oracle database listener" and "Configuring the network service name of the database."
13. Click Next.
The Specify Configuration Options page opens, as shown in Figure 13.
Figure 13 Specify Configuration Options page
14. Configure the memory settings as needed. Table 1 lists the recommended memory sizes.
Table 1 Recommended memory settings
System memory |
Local database |
Remote database |
4 GB |
1400 MB |
2400 MB |
6 GB |
2400 MB |
3600 MB |
8 GB |
3600 MB |
4800 MB |
10 GB or larger |
4500 MB |
5000 MB |
15. Click the Character sets tab, and then specify the character set for the database, as shown in Figure 14.
¡ To prevent unreadable characters, set the correct character set for the database. This example uses West European WE8ISO8859P15.
¡ If you are not sure of the language, select Use Unicode (AL32UTF8).
For more information about setting the database character sets, see Oracle Database Globalization Support Guide.
Figure 14 Setting the character set
16. Click Next.
The Specify Database Storage Options page opens, as shown in Figure 15.
Figure 15 Specify Database Storage Options page
17. Select File system, use the default database file location, and click Next.
The Specify Management Options page opens, as shown in Figure 16.
Figure 16 Specify Management Options page
18. Click Next, with the default settings unchanged.
The Specify Recovery Options page opens, as shown in Figure 17.
Figure 17 Specify Recovery Options page
19. Click Next, with the default settings unchanged.
The Specify Schema Passwords page opens, as shown in Figure 18.
Figure 18 Specify Schema Passwords page
20. Set passwords.
¡ You can set different passwords for the database accounts SYS, SYSTEM, and DBSNMP, or use the same password for all accounts.
¡ For IMC to correctly identify the password of the SYS account during installation, make sure the password does not contain spaces, tabs, or any of the following characters:
` ' " ! ( ) & | \ $ ; @ < > / ^
¡ If you do not want to change the password of the SYS account, create a user account with the same privileges as the SYS account. Make sure the password of the user account does not contain any of the previous characters. For more information, see "Creating a database user."
¡ As a best practice to enhance the database security, use a password that meets the Oracle requirement.
21. Click Next.
The Privileged Operating System groups page opens, as shown in Figure 19.
Figure 19 Privileged Operating System groups page
22. Set the database operator (OSOPER) group to oinstall, use the default settings for other parameters, and click Next.
The Perform Prerequisite Checks page opens, as shown in Figure 20.
Figure 20 Perform Prerequisite Checks page
The installation program checks the system environment and displays the check results.
23. Manually verify the items that are flagged with warnings or require a manual check.
a. Modify the environment settings.
b. If the kernel parameter or software package check fails, click Fix & Check again.
The Fixup Script dialog box opens, as shown in Figure 21.
Figure 21 Fixup Script dialog box
c. Open a terminal window, switch to root, and execute the /tmp/CVU_12.2.0.1.0_oracle/runfixup.sh script, as shown in Figure 22.
Figure 22 Executing the script
d. Close the terminal window.
e. In the Fixup Script dialog box, click OK.
If the software package check fails because later versions of packages are installed, click Ignore all. Because the compat-libstdc++-33 package is not provided in RHEL 7.x, download and install the package if required in the prerequisites check.
For an insufficient swap space warning, change the swap space by following the steps described in "What should I do if insufficient swap space is detected in the prerequisites check?."
24. Click Next.
The Summary page opens, as shown in Figure 23.
Figure 23 Summary page
25. Click Install.
The Install Product page opens, as shown in Figure 24.
Figure 24 Install Product page
The installation program starts to install the database and displays the installation progress. During the installation, the Execute Configuration scripts dialog box opens, as shown in Figure 25.
Figure 25 Execute Configuration scripts dialog box
26. Open a terminal window, switch to root, and execute the scripts instructed in Figure 26.
Figure 26 Executing configuration scripts
27. Close the terminal window.
28. In the Execute Configuration scripts dialog box, click OK.
When the database installation is complete, the Finish page opens, as shown in Figure 27.
Figure 27 Finish page
29. Click Close.
30. Reboot Linux.
To adjust the database settings to meet your requirements, see "Managing Oracle Database 12c R2."
Configuring the Oracle database listener
1. Start Oracle Net Manager in the $ORACLE_HOME/bin directory.
cd $ORACLE_HOME/bin/
./netmgr
2. From the navigation tree, select Oracle Net Configuration > Local > Listeners > LISTENER.
3. In the right pane, select Database Services from the list, and then click Add Database.
A new database tab opens.
4. Configure the global database name, location of the Oracle home directory, and the SID of the database instance, as shown in Figure 28. The global database name and SID must be the same as the global database name and SID specified during database installation.
For a container database, enter the global database name of the pluggable database in the Global Database Name field.
Figure 28 Configuring the listener
Configuring the network service name of the database
After the database installation is complete, the system automatically creates a default network service name, which is the same as the global database name. IMC communicates with the non-container database by using the default network service name.
To configure the network service name:
1. Open a terminal window and then open the tnsnames.ora file as shown in Figure 29:
cd $ORACLE_HOME/network/admin/
vi tnsnames.ora
Figure 29 Viewing the default network service name
2. By default, the value for HOST is host name. For IMC to operate correctly, change the value for HOST to the IP address of the local host.
Figure 30 Configuring the network service name
3. Enter :wq to save your setting.
If the created database is a container database, you must create a new network service name with the service name set to the pluggable database name for communication with IMC. For more information, see "How do I add the network service name of the pluggable database for communication with IMC?."
Installing and configuring the Oracle database client
To enable IMC to connect to a remote Oracle database server, you must install a compatible Oracle 12c R2 client on the server that will host IMC.
Installing the Oracle client
1. Complete the tasks described in "Preparing for installation."
2. Restart the operating system, and then log in as Oracle.
3. Run the installation program from the Oracle client installation directory.
./runInstaller
The Select Installation Type page opens, as shown in Figure 31.
Figure 31 Select Installation Type page
4. Select Custom and click Next.
The Specify Installation Location page opens, as shown in Figure 32.
Figure 32 Specify Installation Location page
5. Click Next, with the default settings unchanged.
The Create Inventory page opens, as shown in Figure 33.
Figure 33 Create Inventory page
6. Click Next, with the default settings unchanged.
The Available Product Components page opens, as shown in Figure 34.
Figure 34 Available Product Components page
7. Select the following components:
¡ Oracle SQLJ
¡ Oracle Database Utilities
¡ Oracle Java Client
¡ SQL*Plus
¡ Oracle JDBC/THIN Interfaces
¡ Oracle Call Interface(OCI)
¡ Oracle Connection Manager
¡ Oracle ODBC Driver
¡ Oracle SQL Developer
The Perform Prerequisite Checks page opens, as shown in Figure 35.
Figure 35 Perform Prerequisite Checks page
9. Fix up any failed check items, and then click Next.
The Summary page opens, as shown in Figure 36.
10. Click Install.
The Install Product page opens, as shown in Figure 37.
Figure 37 Install Product page
The system starts installing the Oracle client and displays the installation progress. During installation, the Execute Configuration scripts dialog box opens, as shown in Figure 38.
Figure 38 Execute Configuration scripts dialog box
11. Open a terminal window, switch to root, and execute the scripts instructed in Figure 39.
Figure 39 Executing configuration scripts
12. Close the terminal window.
13. In the Execute Configuration scripts dialog box, click OK.
14. Click Close on the Finish page, as shown in Figure 40.
Configuring the Oracle client
Configure a network service name for the Oracle client to connect to the database server.
You can configure the network service name by modifying the tnsnames.ora file, or by using Oracle Net Manager. To modify the tnsnames.ora file, see "Configuring the network service name of the database."
To configure the network service name by using Oracle Net Manager:
1. Go to the $ORACLE_HOME/bin directory and start Oracle Net Manager.
cd $ORACLE_HOME/bin/
./netmgr
2. From the navigation tree, select Oracle Net Configuration > Local > Service Naming, as shown in Figure 41.
3. Click the Create icon in the toolbar.
The Net Service Name Wizard opens, as shown in Figure 42.
Figure 42 Net Service Name Wizard
4. In the Net Service Name field, enter orcl, and click Next. The network service name must be the same as the name configured on the database server.
The Protocol page opens, as shown in Figure 43.
5. Select TCP/IP (Internet Protocol) and click Next.
The Protocol Settings page opens, as shown in Figure 44.
Figure 44 Protocol Settings page
6. In the Host Name field, enter the database server IP address, use the default port number 1521, and click Next.
The Service page opens, as shown in Figure 45.
Figure 45 Service page
7. In the Service Name field, enter the global database name of the database server, use the default connection type, and click Next. If the database server uses a container database, enter the pluggable database name in the Service Name field.
The Test page opens, as shown in Figure 46.
8. Click Test to test the connectivity to the database server, or click Finish to run the test later. For more information about running the test, see "Testing the connectivity to the server."
The Net Service Name Wizard closes.
9. View the service name configuration by selecting Oracle Net Configuration > Local > Service Naming > orcl from the navigation tree, as shown in Figure 47.
Figure 47 Viewing the service configuration
Testing the connectivity to the server
1. Log in to Linux as oracle.
2. In the terminal window, log in to the database to test the connectivity. In this example, the username is sys, the password is iMC123, and the network service name is orcl.
Managing Oracle Database 12c R2
To configure the database, you must log in to the system as oracle. Execute the configuration commands in the subsequent sections as oracle unless specified otherwise.
For correct operation of IMC, make sure you follow the procedures in this chapter to set the maximum number of Oracle processes and Oracle connection limit, add storage space to the database, modify database memory settings, add redo log groups, and disable database auditing and tracing. After complete the settings, you must restart the operating system before installing IMC.
In the following examples, sys is the username of the Oracle database administrator and iMC123 is the user password.
Starting the Oracle service manually
1. Start the listener control utility.
cd $ORACLE_HOME/bin
./lsnrctl start
2. Verify that the listener control utility is started.
./lsnrctl service
3. Start the Oracle database.
cd $ORACLE_HOME/bin
./sqlplus sys/iMC123 as sysdba
SQL>startup
SQL>exit
4. Start the pluggable database. This step is required if the Oracle database is a container database.
cd $ORACLE_HOME/bin
./sqlplus sys/iMC123@PDBORCL as sysdba
SQL>startup
SQL>exit
In the commands, PDBORCL is the network service name of the pluggable database.
Stopping the Oracle service manually
1. Stop the Oracle database.
cd $ORACLE_HOME/bin
./sqlplus sys/iMC123 as sysdba
SQL>shutdown immediate
SQL>exit
2. Stop the listener control utility.
cd $ORACLE_HOME/bin
./lsnrctl stop
Configuring network service names
IMPORTANT: If IMC servers use different Oracle databases in a distributed deployment, you must configure a unique network service name for each database. |
To enable IMC to connect to remote databases, you must configure correct network service names on the Oracle database server and client.
You can configure network service names by using Oracle Net Manager or Oracle Net Configuration Assistant, or by modifying the tnsnames.ora file. This procedure uses Oracle Net Configuration Assistant as an example.
· To use Oracle Net Manager, see "Configuring the Oracle client"
· To modify the tnsnames.ora file, see "How do I add the network service name of the pluggable database for communication with IMC?."
To configure the network service name by using Oracle Net Configuration Assistant:
1. Start the database service.
See "Starting the Oracle service manually" for the operation procedure.
2. Start Oracle Net Configuration Assistant.
cd $ORACLE_HOME/bin
./netca
The Welcome page opens.
3. Select Local Net Service Name configuration and click Next, as shown in Figure 48.
Figure 48 Welcome page
4. Select Add and click Next, as shown in Figure 49.
Figure 49 Net Service Name Configuration page
5. Enter the database service name orcl and click Next, as shown in Figure 50.
The service name must be the same as the previously configured global database name or pluggable database name.
Figure 50 Configuring a service name
6. Select transmission protocol TCP and click Next, as shown in Figure 51.
Figure 51 Selecting a protocol
7. On the page that opens, configure the following parameters, as shown in Figure 52:
¡ In the Host name field, enter the IP address of the database server.
¡ Select Use the standard port number of 1521. This option is selected by default.
Figure 52 Configuring the host name and port number
8. Click Next.
9. Select Yes, perform a test, and then click Next, as shown in Figure 53 and Figure 54.
Figure 53 Testing connectivity to the database server
10. Click Change Login to change the login username and password, as shown in Figure 55.
Figure 55 Changing login credentials
11. Enter the correct password of the user system, and then click OK.
Oracle Net Configuration Assistant performs a new connection test.
12. When you see a successful test result, click Next, as shown in Figure 56.
13. Enter a network service name, as shown in Figure 57.
The network service name must be different from the service name orcl. This name is automatically added to the list for selecting a network service name when you install IMC.
Figure 57 Specifying a network service name
14. Click Next.
The page for adding network service names opens, as shown in Figure 58.
Figure 58 Adding network service names as needed
15. To add additional network service names, select Yes. If additional network service names are not needed, click No. In this example, select No, and then click Next.
The configuration complete page opens, as shown in Figure 59.
Figure 59 Completing the network service name configuration
16. Click Next.
17. On the page that opens, click Finish, as shown in Figure 60.
Setting the maximum number of Oracle processes and Oracle connection limit
By default, the Oracle database allows a maximum of 150 connections.
In centralized IMC deployment or when a database error occurs, you might need to modify the Oracle process and connection limits according to the number of deployed IMC components. The number of Oracle connections must be not less than 800.
Table 2 lists the Oracle connection limit required by IMC modules.
Table 2 Oracle connection limit on IMC modules
IMC module |
Oracle connection limit |
IMC platform |
14 |
Alarm management |
24 |
Syslog management |
9 |
Performance management |
11 |
Report management |
10 |
Guest Access Manager |
5 |
User self-service management |
5 |
Network asset manager |
5 |
Virtual Resource Management |
9 |
Configuration center |
9 |
ACL management |
7 |
VLAN management |
11 |
Security control center |
5 |
Server & Storage Automation |
6 |
VXLAN management |
4 |
VAN Fabric Manager |
27 |
Resource Automation Manager |
16 |
QoS manager |
5 |
Service Health Manager |
60 |
User access management/CAMS accounting manager |
100 |
EAD security policy configuration |
25 |
Desktop asset manager |
40 |
MPLS VPN manager |
9 |
L2VPN manager |
17 |
Application Manager |
10 |
Branch Intelligent Management System |
10 |
IPsec VPN manager |
8 |
VAN Connection Manager |
5 |
Security Service Manager |
10 |
Load Balancing Manager |
5 |
Wireless Service Manager |
50 |
To view and modify the maximum number of Oracle processes and the Oracle connection limit:
1. Switch to the oracle user.
su – oracle
2. Log in to the Oracle database as sysdba.
sqlplus sys/iMC123 as sysdba
In the command, the database username is sys and password is iMC123.
3. View the number of Oracle processes and the Oracle connection limit.
¡ View the number of Oracle processes.
SQL>show parameter processes;
¡ View the Oracle connection limit.
SQL>show parameter sessions;
4. Change the maximum number of Oracle processes and the Oracle connection limit according to the installed IMC modules.
¡ Change the maximum number of Oracle processes. Replace 800 with another value as needed.
SQL>alter system set processes=800 scope=spfile;
¡ Change the Oracle connection limit. Replace 800 with another value as needed.
SQL>alter system set sessions=800 scope=spfile;
5. Restart the Oracle database to make the changes take effect.
Automating Oracle database startup on Linux
1. Log in to Linux as root.
2. Copy the Oracle startup script oracled.tar.gz from the /manual directory of the IMC installation package to the Linux operating system.
3. Decompress the script file.
tar -xzf oracled.tar.gz
4. Copy the decompressed file to the /etc/rc.d/init.d directory.
cp oracled /etc/rc.d/init.d/
5. Change the file permissions.
chmod –R 755 oracled
6. Add the script to the startup configuration file of the Linux operating system.
chkconfig --add oracled
7. Open the Oracle configuration file /etc/oratab.
vi /etc/oratab
8. Set the following line to Y.
orcl:/u01/app/oracle/product/12.2.0/db_1:Y
9. Save and close the file.
The Oracle database automatically starts at the Linux startup.
10. To manually start or stop the Oracle database, use the following commands:
service oracled start
service oracled stop
Automating PDB database startup
This task allows you to create a trigger to open all pluggable databases (PDBs) after container database (CDB) startup.
To automate PDB database startup:
1. Log in to the Oracle database as sys.
sqlplus sys/iMC123 as sysdba
In the command, sys is the database user name, iMC123 is the password.
2. Execute the following commands:
CREATE TRIGGER open_all_pdbs
AFTER STARTUP
ON DATABASE
BEGIN
EXECUTE IMMEDIATE 'alter pluggable database all open';
END open_all_pdbs;
/
Creating a database user
IMC installation requires you to specify the correct database user for the Oracle database:
· For a non-container database, specify a database user who has the sysdba privilege.
· For a container database, specify a common database user who has the sysdba privilege and uses a name beginning with c## or C##.
To create a database user with the sysdba privilege:
1. Log in to the Oracle database as sys.
sqlplus sys/iMC123 as sysdba
In the command, sys is the database username, iMC123 is the password.
2. Create a database user and grant the sysdba privilege to the user.
¡ For a non-container database, create a database user named imc with the password imcpassword.
create user imc identified by imcpassword;
grant sysdba to imc;
¡ For a container database, create a common database user named c##imc with the password imcpassword.
create user c##imc identified by imcpassword container=all;
grant sysdba to c##imc container=all;
In the commands, the container=all string indicates that the configuration takes effect on both the container database and all its pluggable databases.
IMPORTANT: For IMC to correctly identify the
password during installation, make sure the password does not contain spaces,
tabs, or any of the following characters: |
Adding storage space to the database
The amount of storage space available on the database for IMC depends on the number of data files in the USERS tablespace. By default, the USERS tablespace has a single data file with a size limit of 32 GB. You can add data files to the USERS tablespace to provide additional storage.
The number of data files to add depends on the disk space required by the IMC components. For example, if IMC requires 300 GB for device management, create a minimum of ten data files (300 GB/32 GB = 9.375). If a database is used by multiple IMC components, create data files according to the total disk space required by the installed components.
You can add data files to the USERS tablespace through Oracle Enterprise Manager or by using SQL statements.
Adding database storage space through Oracle Enterprise Manager
1. Access the Oracle Enterprise Manager at https://ip-address:5500/em.
In the URL, ip-address is the IP address of the Oracle database server.
2. Log in to Oracle Enterprise Manager as SYSTEM, and then select Storage > Tablespaces, as shown in Figure 61.
3. Select the USERS tablespace and click Add Datafile, as shown in Figure 62.
The Add Datafiles to Tablespace USERS page opens, as shown in Figure 63.
Figure 63 Adding data files to the USERS tablespace
4. Configure the data file parameters and click OK.
5. To add additional data files, repeat the steps in this procedure.
If the system has multiple hard disk drives, distribute the data files on different disk drives for I/O load balancing.
Adding database storage space through SQL statements
1. Log in to Linux as oracle.
2. Log in to the Oracle database as sys.
sqlplus sys/iMC123@orcl as sysdba
In the command, sys is the database username, iMC123 is the password, and orcl is the network service name.
3. Display existing data files in the USERS tablespace.
SQL>select file_name from dba_data_files where tablespace_name='USERS';
FILE_NAME
-----------------------------------------------------------
/u01/app/oracle/oradata/orcl/users01.dbf
The output shows that the USERS tablespace contains only one data file in the /u01/app/oracle/oradata/orcl directory.
4. Add a new data file named users02.dbf to the directory.
SQL> alter tablespace USERS add datafile '/u01/app/oracle/oradata/orcl/userdata02.dbf' size 100M autoextend on next 100M maxsize UNLIMITED;
5. Add users03.dbf, users04.dbf, and more data files to the directory. (Details not shown.)
Modifying database memory settings
1. Log in to Linux as oracle.
2. Log in to the Oracle database as sys.
sqlplus sys/iMC123@orcl as sysdba
In the command, sys is the database username, iMC123 is the password, and orcl is the network service name.
3. Set the value of MEMORY_TARGET.
SQL> alter system set MEMORY_TARGET=1700M scope=spfile;
Table 3 lists the recommended memory sizes.
Table 3 Recommended memory sizes
System memory |
Local database |
Remote database |
4 GB |
1400 MB |
2400 MB |
6 GB |
2400 MB |
3600 MB |
8 GB |
3600 MB |
4800 MB |
10 GB or larger |
4500 MB |
5000 MB |
Adding redo log groups
Redo logs record changes made to the database (such as data rollback) and can be used for data recovery. By default, three groups of redo logs are available. Each group contains 50 MB log files. To improve the write efficiency if an excessive amount of data needs to be written, add redo log groups after installing Oracle.
To add redo log groups:
1. Switch to the oracle user.
su – oracle
2. Log in to the Oracle database as sys.
sqlplus sys/iMC123@orcl as sysdba
In the command, sys is the database username, iMC123 is the password, and orcl is the network service name.
3. Locate the storage directory of redo log files.
SQL>select MEMBER from v$logfile;
MEMBER
---------------------------------------
/u01/app/oracle/oradata/orcl/redo03.log
/u01/app/oracle/oradata/orcl/redo02.log
/u01/app/oracle/oradata/orcl/redo01.log
Redo log files are stored in the directory /u01/app/oracle/oradata/orcl.
4. Use the following commands to add three redo log groups, each with a size of 2048 MB.
SQL>alter database add logfile group 4('/u01/app/oracle/oradata/orcl/redo04.log') SIZE 2048M;
SQL>alter database add logfile group 5('/u01/app/oracle/oradata/orcl/redo05.log') SIZE 2048M;
SQL>alter database add logfile group 6('/u01/app/oracle/oradata/orcl/redo06.log') SIZE 2048M;
Disabling database auditing
Database auditing records database activities and monitors user operations, such as database connection, SQL statement executions, and data access. Database auditing is enabled by default and it can produce a large number of audit files. To save system resources, disable the auditing feature as follows:
1. Log in to the Oracle database.
sqlplus sys/iMC123@orcl as sysdba
In the command, sys is the database username, iMC123 is the password, and orcl is the network service name.
2. View the database auditing status.
SQL>show parameter audit_trail;
NAME TYPE VALUE
---- ---- -----
audit_trail string DB
The VALUE field value for audit_trail is DB, which indicates that database auditing is enabled.
3. Disable the database auditing.
SQL>alter system set audit_trail=NONE scope=spfile;
System altered.
4. Restart the database.
SQL>shutdown immediate;
SQL>startup;
5. Verify that the database auditing feature is disabled.
SQL>show parameter audit_trail;
NAME TYPE VALUE
---- ---- -----
audit_trail string NONE
The VALUE field value for audit_trail is NONE, which indicates that database auditing is disabled.
Disabling database tracing
The database tracing feature trails the execution history and code paths of Oracle and provides information for debugging. This feature is enabled by default and it affects the database performance. To upgrade the performance, disable this feature as follows:
1. Log in to the Oracle database.
sqlplus sys/iMC123@orcl as sysdba
In the command, sys is the database username, iMC123 is the password, and orcl is the network service name.
2. View the database tracing status.
SQL>show parameter trace;
NAME TYPE VALUE
------------------------------- ------- -----
log_archive_trace integer 0
sec_protocol_error_trace_action string TRACE
sqltrace bollean FALSE
trace_enabled boolean TRUE
tracefile_identifier string
The VALUE field value for trace_enabled is TRUE, which indicates that the tracing is enabled.
3. Disable database tracing.
SQL>alter system set trace_enabled=FALSE scope=spfile;
System altered.
4. Restart the database.
SQL>shutdown immediate;
SQL>startup;
5. Verify that the database tracing feature is disabled.
SQL>show parameter trace_enabled;
NAME TYPE VALUE
------------- ------- -----
trace_enabled boolean FALSE
The VALUE field value for trace_enabled is FALSE, which indicates that database tracing is disabled.
Removing Oracle Database 12c R2
You can remove the Oracle database by using the uninstall script deinstall provided by the database, or remove Oracle program files, users, and user groups by executing commands as root. To use the uninstall script, see Oracle Database Installation Guide 12c Release 2 (12.2) for Linux.
To manually remove Oracle Database 12c R2:
1. Log in to Linux as root.
2. Stop the Oracle service.
cd $ORACLE_HOME/bin
sqlplus sys/imc123 as sysdba
SQL>shutdown
In the command, imc123 is the password of the sys user.
3. Stop the listener.
cd $ORACLE_HOME/bin
./lsnrctl stop
4. Delete the Oracle installation directory /u01 in the root directory.
cd /
rm –rf /u01
5. Delete the directory /usr/local/bin/oracle (the default is /user/local/bin). This is the directory created by the configuration script during database installation (see Figure 26). The string of asterisks (*) in the command represents the name of the file to delete.
rm –rf ****
6. Delete files oratab and oraInst.loc in the /etc directory.
cd /etc
rm –rf oratab
rm –rf oraInst.loc
7. Delete the oracle user.
userdel oracle
8. Delete the oinstall user group.
groupdel oinstall
9. Delete the dba user group.
groupdel dba
10. Delete the /home/oracle directory.
cd /home
rm –rf oracle/
11. Delete the startup service.
chkconfig -–del oracled
12. Reboot Linux.
FAQ
Why does the system display an insufficient disk space error when creating the database instance?
Verify that the etc/sysctl.conf file is correctly configured. For more information, see "Adjusting kernel parameters."
Why are there unreadable characters displayed on IMC that uses the Oracle database?
The following issues can cause unreadable characters:
· Incorrect character set for the database.
The character set selected for the Oracle database during installation is incompatible with the language setting of IMC. For example, the Oracle database uses the English character set, but IMC uses a non-English language coding. To resolve the issue, reinstall the Oracle database and select the correct character set.
· Incorrect NLS_LANG variable setting.
The NLS_LANG environment variable is not set correctly. To resolve the issue, correct the NLS_LANG setting, and then restart the server and IMC. For information about setting the NLS_LANG variable, see "Setting the NLS_LANG environment variable."
· Incorrect LANG variable setting for the Oracle database server that uses the default character set.
The LANG variable is not set correctly for a database server that is configured to use the default character set during installation. The default character set is determined by the LANG variable. For more information about setting the LANG variable, see "Setting environment variables for the oracle user."
For example, the LANG variable is set to LANG=en_US.UTF-8 for a database that requires a non-English character set. If the database is configured to use the default character set, which is WE8ISO8859P15 in this example, unreadable characters will be displayed.
To resolve the issue, reinstall the Oracle database with the correct character set. For more information, see "Installing and configuring the Oracle database server."
For more information about setting the database and client character sets, see Oracle Database Globalization Support Guide at the Oracle website.
How can I identify whether the environment variable settings have taken effect?
Execute the echo $environment variable name command under the root user to verify that the Oracle main directory, Oracle LIB directory, and Oracle instance settings have taken effect as follows:
echo $ORACLE_HOME
/u01/app/oracle/product/11.1.0/db_1
echo $LD_LIBRARY_PATH
/u01/app/oracle/product/11.1.0/db_1/lib
echo $ORACLE_SID
orcl
How do I update database passwords for IMC?
After the database password of an IMC component is changed by using the database management tool, execute pwdmgr.bat to update the password in the server-addr.xml file on the IMC server. The file is located in the /common/conf/server-addr.xml file in the IMC installation path. It stores database passwords of all IMC components in ciphertext.
The following is an example for updating the password of the config_db database stored in IMC:
cd deploy/
./pwdmgr.sh –modify 127.0.0.1 config_db imc_config dbpasswd
Change password successfully
In the example, the dbpasswd string represents the new password of the imc_config user. The config_db string represents the database name. The 127.0.0.1 string represents the IP address of the database. The database IP address and name can be retrieved from the $IMCROOT/common/conf/server-addr.xml file.
If IMC is deployed in distributed mode, you must update the database password on every IMC server.
What should I do if the connection to the database server fails or takes a long time?
By default, DNS first searches the /etc/hosts file for the matching entry of the database server. If no matching entry exists, a resolution request is sent to a DNS server configured in the /etc/resolv.conf file. This file has a maximum of three DNS servers. When resolution fails on one DNS server, the resolution request is sent to another DNS server.
If the connection to the database server fails or takes a long time, a possible reason is that the DNS server settings in the /etc/resolv.conf file are incorrect.
Suppose the host name in the tnsnames.ora file is used for connecting to the database server, but the IP address and host name of the database server are not associated in the /etc/hosts file. In this case, the DNS server configured in the /etc/resolv.conf file is used to perform host name resolution. Verify that the DNS server settings are correctly configured in the /etc/resolv.conf file:
cd /etc
vi resolv.conf
nameserver 10.72.66.36
nameserver 10.72.66.37
How do I add the network service name of the pluggable database for communication with IMC?
1. Open a terminal window and open the tnsnames.ora file.
cd $ORACLE_HOME/network/admin/
vi tnsnames.ora
2. Add the network service name to the file, as shown in Figure 64.
¡ PDBORCL is the network service name for connecting to the database. If the database is a remote database for IMC, make sure you configure the same network service name on the Oracle database server and client.
¡ Set SERVICE_NAME to the pluggable database name. This example uses pdborcl.
Figure 64 Adding a network service name
What should I do if the IMC deployment encounters an interruption in a container database environment?
Figure 65 Interrupted IMC deployment
Figure 65 shows that the deployment of IMC is interrupted because of the incorrect database connection configuration.
To resolve the problem:
1. Open a terminal window and view the log details, as shown in Figure 66:
vi /etc/iMC-Reserved/log/dbresult_201802111401150.log
Figure 66 Log for deployment interruption
The log is generated because the network service name of the pluggable database is not correctly specified during IMC installation. The pluggable database communicates with IMC if Create as Container database is selected during the database installation.
2. Configure the pluggable database correctly during database installation.
3. Select the network service name of the pluggable database during IMC installation, as shown in Figure 67.
Figure 67 Checking database connectivity
What should I do if insufficient swap space is detected in the prerequisites check?
Figure 68 Insufficient swap space
To resolve the problem:
1. Switch to root.
su – root
2. Check the partition information.
free –m
3. Add a swap file with a specific size. The count value specifies the block size of the file. In this example, a file of 11 GB is added.
dd if=/dev/zero of=/home/swap bs=1024 count=11264000
4. Set up the swap file.
mkswap /home/swap
5. Enable the swap file immediately, as shown in Figure 69.
swapon /home/swap
Figure 69 Adding a swap file and enabling the file immediately
6. Add the following line to the /etc/fstab file to enable the swap file at the next boot, as shown in Figure 70.
/home/swap swap swap defaults 0 0
Figure 70 Enabling the swap file at the next boot
After you modify the swap space, run the prerequisites check again.
After you configure global database variables, other third-party software cannot start. How can I resolve this issue?
Because certain third-party software does not support configuring global environment variables, the software might fail to start correctly. To resolve this issue, you can change the global database variable settings to the Oracle user's environment variables as follows:
CAUTION: If only the Oracle user's database environment variables are configured and global database environment variables are not configured, the DBMan feature might be unavailable. |
1. Open the profile file in the /home/oracle/.bash_profile directory:
vi /home/oracle/.bash_profile
2. Add the following content to the profile file:
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/11.1.0/db_1
ORACLE_SID=orcl
PATH=$PATH:$ORACLE_HOME/bin:$HOME/bin
LD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH LD_LIBRARY_PATH
The variable description is as follows:
¡ ORACLE_BASE—Oracle base directory.
¡ ORACLE_HOME—Oracle home directory.
¡ ORACLE_SID—Oracle database instance ID. Use the same instance ID for Oracle database installation.
3. Save and close the file.