Oracle 10g R2 Grid Control Installation On Red Hat Enterprise Linux and CentOS

rongshiyuan發表於2012-12-08

Oracle 10g Release 2 Grid Control Installation On Red Hat Enterprise Linux and CentOS

In this article I'll describe the installation of Oracle 10g Release 2 Grid Control on Red Hat Enterprise Linux and CentOS. The article is based on a server installation with a minimum of 2G swap, secure Linux disabled and the following package groups installed.

  • X Window System
  • GNOME Desktop Environment
  • Editors
  • Graphical Internet
  • Text-based Internet
  • Server Configuration Tools
  • Development Tools
  • Administration Tools
  • System Tools

The Oracle 10g Grid Control allows you to monitor all aspects of your infrastructure including database and application servers. Like the Oracle9i Management Server it replaces, the grid control requires a database repository. A complete installation includes a repository in a 10.1.0.4.0 database. It is possible to install the repository in an existing database of a different version, but I try to install the product as it is shipped.

The grid control uses agents on each server to enable monitoring and interaction. As a result, once the grid control is installed it is necessary to install an agent on each server you wish to monitor. The installation of an agent is described in it's owner section. All other tasks relate only to the grid control.

Download Software

Download the following software.

For convenience you may want to download the agent distribution separately. If you are monitoring servers on different platforms the relevant agents must be downloaded.

Unpack Files

First unzip the grid control installation files.

unzip Linux_Grid_Control_full_102010_disk1.zip
unzip Linux_Grid_Control_full_102010_disk2.zip
unzip Linux_Grid_Control_full_102010_disk3.zip

Hosts File

The "/etc/hosts" file must contain a fully qualified name for the server.

    

Set Kernel Parameters

Modify the "/etc/sysctl.conf" file to include the lines appropriate to your operating system.

# Red Hat Enterprise Linux 3.0 and CentOS 3.x
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.shmmin = 1
kernel.shmseg = 10
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
fs.file-max = 65536


# Red Hat Enterprise Linux 4.0 and CentOS 4.x
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.shmall = 2097152
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144

Run the following command to change the current kernel parameters.

/sbin/sysctl -p

Disable secure linux by editing the "/etc/selinux/config" file, making sure the SELINUX flag is set as follows.

SELINUX=disabled

Alternatively, this alteration can be done using the GUI tool (Applications > System Settings > Security Level). Click on the SELinux tab and disable the feature.

Setup

The documentation states that the following packages are required by the relevant operating systems.

# Red Hat Enterprise Linux 3.0 and CentOS 3.x
glibc-2.2.4-31.7
make-3.79
binutils-2.11.90.0.8-12
gcc-2.96
openmotif21-2.1.30-11


# Red Hat Enterprise Linux 4.0 and CentOS 4.x
glibc-2.3.4-2.9
make-3.79
binutils-2.15.92.0.2-13
gcc-3.4.3-22.1
libaio-0.3.96
glibc-common-2.3.4-2.9
setarch-1.6-1
pdksh-5.2.14-30
openmotif21-2.1.30-11
sysstat-5.0.5-1
gnome-libs-1.4.1.2.90-44.1
libstdc++-3.4.3-22.1
libstdc++devel-3.4.3-22.1
compat-libstdc++-296-2.96-132.7.2
compat-db-4.1.25-9
control-center-2.8.0-12
xscreensaver-4.18-5.rhel4.2

Depending on the update/respin version of Red Hat or CentOS, the exact package versions and locations may vary. The installation of the required packages is shown below, with the versions and locations relevant for CentOS 4.1. The commented packages represent those that are already loaded.

# From CentOS 4.1 Disk 1
cd /media/cdrom/CentOS/RPMS
#rpm -Uvh glibc-2.3.4-2.9.i386.rpm
#rpm -Uvh glibc-common-2.3.4-2.9.i386.rpm
#rpm -Uvh make-3.80-5.i386.rpm
#rpm -Uvh binutils-2.15.92.0.2-13.i386.rpm
#rpm -Uvh setarch-1.6-1.i386.rpm
#rpm -Uvh pdksh-5.2.14-30.i386.rpm
#rpm -Uvh libstdc++-3.4.3-22.1.i386.rpm
rpm -Uvh compat-libstdc++-33-3.2.3-47.3.i386.rpm

# From CentOS 4.1 Disk 2
cd /media/cdrom/CentOS/RPMS
#rpm -Uvh gcc-3.4.3-22.1.i386.rpm
#rpm -Uvh gnome-libs-1.4.1.2.90-44.1.i386.rpm
#rpm -Uvh libstdc++-devel-3.4.3-22.1.i386.rpm
#rpm -Uvh compat-db-4.1.25-9.i386.rpm
#rpm -Uvh control-center-2.8.0-12.i386.rpm
#rpm -Uvh xscreensaver-4.18-5.rhel4.2.i386.rpm

# From CentOS 4.1 Disk 3
cd /media/cdrom/CentOS/RPMS
rpm -Uvh libaio-0.3.103-3.i386.rpm
rpm -Uvh openmotif21-2.1.30-11.RHEL4.4.i386.rpm
rpm -Uvh sysstat-5.0.5-1.i386.rpm
rpm -Uvh compat-libstdc++-296-2.96-132.7.2.i386.rpm

Create the new groups and users.

groupadd oinstall
groupadd dba
groupadd oper

useradd -g oinstall -G dba -s /bin/ksh oracle
passwd oracle

Create the directories in which the Oracle software will be installed.

mkdir -p /u01/app/oracle/product/10.2.0/oms10g
mkdir -p /u01/app/oracle/product/10.2.0/db10g
mkdir -p /u01/app/oracle/product/10.2.0/agent10g
chown -R oracle:oinstall /u01

Login as root and issue the following command.

xhost +

Login as the oracle user and add the following lines at the end of the ".profile" file.

# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db10g; export ORACLE_HOME
ORACLE_SID=emrep; export ORACLE_SID
PATH=.:/usr/sbin:#$ORACLE_HOME/bin:$PATH; export PATH
PATH=$PATH:$ORACLE_HOME/dcm/bin:$ORACLE_HOME/opmn/bin; export PATH
PATH=$PATH:$ORACLE_HOME/Apache/Apache/bin; export PATH

PS1="`hostname`> "
set -o emacs
set filec

Grid Control Installation

Log into the oracle user. If you are using X emulation then set the DISPLAY environmental variable.

DISPLAY=:0.0; export DISPLAY

Start the Oracle Universal Installer (OUI) by issuing the following command in the installation software directory.

./runInstaller

During the installation select the appropriate ORACLE_HOME for the grid control (oms) and select the new database option. The installation will automatically install an agent in the agent home. For a more detailed look at the installation process, click on the links below to see screen shots of each stage.

  1. Specifiy Installation Type
  2. Specifiy Installation Location
  3. Specify Inventory directory and credentials
  4. Unsupported language message
  5. Product-Specific Prerequisite Checks
  6. Prerequisite Check warning message
  7. Specify Configuration
  8. Specify Optional Configuration
  9. Specify Security Options
  10. Summary
  11. Install - OEM Repository Database
  12. Install - OEM Grid Console
  13. Install - OEM Management Agent
  14. Execute Configuration scripts
  15. Configuration Assistants (1)
  16. Configuration Assistants (2) - Database Configuration Assistant
  17. End of Installation

On completion the grid control will be available via a browser using the following style. of URL.

http://:/em

The server name and port (typically 4889) should be adjusted to the values specified in the "$ORACLE_HOME/sysman/setupinfo.txt" files.

Starting and Stopping Grid Control Services

The following script. shows how the whole grid control is started and stopped.

# Start everything
/u01/app/oracle/product/10.2.0/db10g/bin/dbstart
/u01/app/oracle/product/10.2.0/oms10g/opmn/bin/opmnctl startall
/u01/app/oracle/product/10.2.0/agent10g/bin/emctl start agent

# Stop everything
/u01/app/oracle/product/10.2.0/agent10g/bin/emctl stop agent
/u01/app/oracle/product/10.2.0/oms10g/opmn/bin/opmnctl stopall
/u01/app/oracle/product/10.2.0/db10g/bin/dbshut

The dbstart and dbshut commands require the "/etc/oratab" file to be editied to allow auto startup/shutdown.

By default, the database supporting the repository is in NOARCHIVELOG mode.

Agent Installation

This agent installation assumes you are using a doing an installation on a Linux machine which already has a database or application server installed. As such there are no prerequisites as they should match those of the original product installation.

First, unpack the agent installation.

gunzip Linux_Grid_Control_agent_download_10_2_0_1.cpio.gz
cpio -idmv < Linux_Grid_Control_agent_download_10_2_0_1.cpio

If one doesn't already exist, make an appropriate directory for the agent software to be loaded into.

mkdir -p /u01/app/oracle/product
chown -R oracle:oinstall /u01

Log into the oracle user. If you are using X emulation then set the DISPLAY environmental variable.

DISPLAY=:0.0; export DISPLAY

Start the Oracle Universal Installer (OUI) by issuing the following command in the "./linux/agent" directory.

chmod -R u+x *
cd linux/agent
./runInstaller

During the installation, select the "Additional Management Agent" option, enter the installation base directory of "/u01/app/oracle/product/10.2.0" and grid control srver when prompted. The agent will be installed in the "/u01/app/oracle/product/10.2.0/agent10g" directory. For a more detailed look at the installation process, click on the links below to see screen shots of each stage.

  1. Specifiy Installation Type
  2. Specifiy Installation Location
  3. Unsupported language message
  4. Product-Specific Prerequisite Checks
  5. Specify Oracle Management Service Location
  6. Specify Agent Registration Password
  7. Summary
  8. Install
  9. Execute Configuration scripts
  10. Configuration Assistants
  11. End of Installation

With the installation complete the server should now be visible on the grid controls list of targets.

Starting and Stopping Agent Services

The following commands can be used to start and stop the agent.

# Start Agent
/u01/app/oracle/product/10.2.0/agent10g/bin/emctl start agent

# Stop Agent
/u01/app/oracle/product/10.2.0/agent10g/bin/emctl stop agent

For more information see:

Hope this helps. Regards Tim...

Back to the Top.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17252115/viewspace-750774/,如需轉載,請註明出處,否則將追究法律責任。

相關文章