1. Oracle linux 5 Update 2 installation.
Click on YES to initialize the partitions. Do this for all 3 new partitions (sda,sdb,sdc)
fs.suid_dumpable = 1
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
Add following to /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 4096
oracle hard nofile 65536
oracle soft stack 10240
Install following packages (using RPM or yum):
rpm -Uvh binutils-2.*
rpm -Uvh compat-libstdc++-33*
rpm -Uvh compat-libstdc++-33*.i386.rpm
rpm -Uvh elfutils-libelf*
rpm -Uvh gcc-4.*
rpm -Uvh gcc-c++-4.*
rpm -Uvh glibc-2.*
rpm -Uvh glibc-common-2.*
rpm -Uvh glibc-devel-2.*
rpm -Uvh glibc-headers-2.*
rpm -Uvh ksh*
rpm -Uvh libaio-0.*
rpm -Uvh libaio-devel-0.*
rpm -Uvh libgomp-4.*
rpm -Uvh libgcc-4.*
rpm -Uvh libstdc++-4.*
rpm -Uvh libstdc++-devel-4.*
rpm -Uvh make-3.*
rpm -Uvh sysstat-7.*
rpm -Uvh unixODBC-2.*
rpm -Uvh unixODBC-devel-2.*
rpm -Uvh numactl-devel-*
Create oracle user:
groupadd oinstall
groupadd dba
groupadd oper
groupadd asmadmin
useradd -g oinstall -G dba,oper,asmadmin oracle
Create directories:
chown -R oracle:dba /oracle/
chown -R oracle:dba /grid10g/
mkdir -p /oracle/product/11.2/db_1
chown -R oracle:dba /oracle/product/11.2/db_1/
Set the environment variables:
export ORACLE_HOSTNAME=grid10g.localdomain
export ORACLE_BASE=/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2/db_1
export ORACLE_SID=grid10g
export PATH=$PATH:$ORACLE_HOME/bin:/usr/sbin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
Check, if the X-Window system is working:
run the xclock command.
Now we can start with the installation:
./runInstaller
[oracle@grid10g db_1]$ cd /oracle/product/11.2/db_1/dbs/[oracle@grid10g dbs]$ vi grid10g.ora
db_name=grid10g
db_block_size=8192
db_cache_size=100M
shared_pool_size=100M
java_pool_size=25M
diagnostic_dest=/oracle/admin
control_files='/oracle/oradata/control01.ctl','/oracle/oradata/control02.ctl'
undo_management=AUTO
undo_tablespace=undotbs1
open_cursors=500
sessions=500
[oracle@grid10g ~]$ sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.3.0 Production on Thu Nov 24 13:24:33 2011
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 242724864 bytes
Fixed Size 1344144 bytes
Variable Size 134221168 bytes
Database Buffers 104857600 bytes
Redo Buffers 2301952 bytes
SQL> create database grid10g
user system identified by *******
user sys identified by *******
maxdatafiles 255
maxlogfiles 5
maxlogmembers 5
character set AL32UTF8
logfile group 1 ('/oracle/oradata/redo1_1.log','/oracle/oradata/redo1_2.log') size 100M blocksize 512,
group 2 ('/oracle/oradata/redo2_1.log','/oracle/oradata/redo2_2.log') size 100M blocksize 512,
group 3 ('/oracle/oradata/redo3_1.log','/oracle/oradata/redo3_2.log') size 100M blocksize 512
datafile '/oracle/oradata/system01.dbf' size 500M extent management local
sysaux datafile '/oracle/oradata/sysaux01.dbf' size 500M
undo tablespace undotbs1 datafile '/oracle/oradata/undotbs1.dbf' size 250M
default temporary tablespace temp tempfile '/oracle/oradata/temp01.dbf' size 150M;
Database created.
SQL> @?/rdbms/admin/catalog.sql
SQL> @?/rdbms/admin/catproc.sql
SQL> conn
Enter user-name: system
Enter password:
Connected.
SQL> @?/sqlplus/admin/pupbld.sql
SQL> conn
Enter user-name: /as sysdba
Connected.
SQL> shu immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 242724864 bytes
Fixed Size 1344144 bytes
Variable Size 134221168 bytes
Database Buffers 104857600 bytes
Redo Buffers 2301952 bytes
Database mounted.
Database opened.
Now, we can create listener and tnsnames.ora:
[oracle@grid10g ~]$ cd /oracle/product/11.2/db_1/dbs/
[oracle@grid10g dbs]$ vi listener.ora
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(SID_NAME=grid10g)
(ORACLE_HOME=/oracle/product/11.2/db_1)
)
)
LISTENER =
(DESCRIPTION =
(ADDRESS = (HOST=localhost)(PROTOCOL=tcp)(PORT=1521))
)
[oracle@grid10g admin]$ vi tnsnames.ora
grid10g=
(DESCRIPTION=
(ADDRESS=(HOST=localhost)(PROTOCOL=tcp)(PORT=1521))
(CONNECT_DATA=(SERVICE_NAME=grid10g))
)
Check the connection:
[oracle@grid10g admin]$ sqlplus system@grid10g
SQL*Plus: Release 11.2.0.3.0 Production on Thu Nov 24 14:49:12 2011
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Now create password file:
SQL> select * from v$pwfile_users;
no rows selected
[oracle@grid10g dbs]$ orapwd file=/oracle/product/11.2/db_1/dbs/orapwgrid10g password=******* entries=5
[oracle@grid10g dbs]$ sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.3.0 Production on Thu Nov 24 14:51:37 2011
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from v$pwfile_users;
USERNAME SYSDB SYSOP SYSAS
------------------------------ ----- ----- -----
SYS TRUE TRUE FALSE
[root@grid10g ~]# yum install xorg-x11-deprecated-libs
[root@grid10g ~]# ln -s /usr/lib/libgdbm.so /usr/lib/libdb.so.2
[oracle@grid10g install]$ export ORACLE_SID=oms10g
[oracle@grid10g install]$ mkdir -p /grid10g/product/10.2.0/oms10g
[oracle@grid10g install]$ mkdir -p /grid10g/product/10.2.0/agent10g
[oracle@grid10g ~]$ sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.3.0 Production on Thu Nov 24 15:20:51 2011
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> @?/rdbms/admin/dbmspool.sql
SQL> @?/rdbms/admin/prvtpool.plb
SQL> alter system set session_cached_cursors=200 scope=spfile;
SQL> shu immediate
SQL> startup
./runInstaller
so on the next day I have analyzed the problem and was able to solve it.
The problem was, that the password for the sysman user was wrong and I have to change it.
Here is the how to:
Stop the agent: AGENT_HOME/bin/emctl stop agent
Stop the OMS OMS_HOME/opmn/bin/opmnctl stopall
Change the password int the OMS_HOME/sysman/config/emoms.properties
Edit the file emoms.properties and change the following lines
oracle.sysman.eml.mntr.emdRepPwd=new_password
oracle.sysman.eml.mntr.emdRepPwdEncrypted=FALSE
Change the sysman password in the DB alter user sysman identified by *******;
Restart OMS OMS_HOME/opmn/bin/opmnctl startall
The problem with the password was solved, but the connection between agent and OMS was not working.
So I decided to secure both of them:
OMS:
[oracle@grid10g bin]$ ./opmnctl stopall
opmnctl: stopping opmn and all managed processes...
[oracle@grid10g bin]$ ./emctl secure oms
Oracle Enterprise Manager 10g Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
Enter Enterprise Manager Root Password :
Enter Agent Registration password :
OPMN processes already stopped... Done.
Securing central oms... Started.
Checking Repository... Done.
Checking Em Key... Done.
Checking Repository for an existing Enterprise Manager Root Key... Done.
Fetching Root Certificate from the Repository... Done.
Generating Registration Password Verifier in the Repository... Done.
Generating Oracle Wallet Password for Enterprise Manager OMS... Done.
Generating Oracle Wallet for Enterprise Manager OMS... Done.
Generating Oracle Wallet for iAS HTTP Server... Done.
Updating HTTPS port in emoms.properties file... Done.
Generating HTTPS Virtual Host for Enterprise Manager OMS... Done.
Securing central oms... Ended.
[oracle@grid10g bin]$ ./opmnctl startall
opmnctl: starting opmn and all managed processes...
AGENT:
[oracle@grid10g bin]$ ./emctl stop agent
Oracle Enterprise Manager 10g Release 10.2.0.1.0.
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
Stopping agent ... stopped.
[oracle@grid10g bin]$ ./emctl secure agent
Oracle Enterprise Manager 10g Release 10.2.0.1.0.
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
Enter Agent Registration password :
Agent is already stopped... Done.
Securing agent... Started.
Requesting an HTTPS Upload URL from the OMS... Done.
Requesting an Oracle Wallet and Agent Key from the OMS... Done.
Check if HTTPS Upload URL is accessible from the agent... Done.
Configuring Agent for HTTPS in CENTRAL_AGENT mode... Done.
EMD_URL set in /grid10g/product/10.2.0/agent10g/sysman/config/emd.properties
Securing agent... Successful.
After this, the connection was working fine :)
Grant succeeded.
SQL> grant execute on dbms_random to sysman;
Grant succeeded.
SQL> select object_name, object_type, owner from dba_objects where status='INVALID';
no rows selected
SQL> SELECT value FROM nls_database_parameters WHERE parameter='NLS_LENGTH_SEMANTICS';
VALUE
--------------------------------------------------------------------------------
BYTE
SQL> connect sysman
Enter password:
Connected.
SQL> exec emd_maintenance.analyze_emd_schema('SYSMAN');
PL/SQL procedure successfully completed.
SQL> execute emd_maintenance.remove_em_dbms_jobs;
PL/SQL procedure successfully completed.
SQL> select a.instance_name as sid, b.value as jobqueue from gv$instance a, gv$parameter b where a.inst_id = b.inst_id and b.name='job_queue_processes';
SID JOBQUEUE
---------------- --------------------------
grid10g 1000
SQL> alter system set job_queue_processes=0 sid='*';
System altered.
SQL> exec dbms_scheduler.set_scheduler_attribute ('SCHEDULER_DISABLED','TRUE');
PL/SQL procedure successfully completed.
SQL> select count(*) from dba_scheduler_running_jobs where SLAVE_PROCESS_ID IS NOT NULL;
COUNT(*)
----------
0
[oracle@grid10g new]$ cd 3731593/Disk1/
[oracle@grid10g Disk1]$ ./runInstaller
PL/SQL procedure successfully completed.
SQL> alter system set job_queue_processes=1000 scope=both;
System altered.
5. Upgrade EM agentfrom 10.2.0.1 to 10.2.0.5.
[oracle@grid10g bin]$ pwd
/grid10g/product/10.2.0/agent10g/bin
[oracle@grid10g bin]$ ./emctl stop agent
Oracle Enterprise Manager 10g Release 10.2.0.1.0.
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
Stopping agent ... stopped.
[oracle@grid10g bin]$ export ORACLE_HOME=/grid10g/product/10.2.0/agent10g/
[oracle@grid10g new]$ cd 3731593/Disk1
[oracle@grid10g Disk1]$ ./runInstaller
[oracle@grid10g bin]$ ./emctl status agent
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
Agent Version : 10.2.0.5.0
OMS Version : 10.2.0.5.0
Protocol Version : 10.2.0.5.0
Agent Home : /grid10g/product/10.2.0/agent10g
Agent binaries : /grid10g/product/10.2.0/agent10g
Agent Process ID : 17123
Parent Process ID : 17097
Agent URL : https://grid10g.localdomain:3872/emd/main/
Repository URL : https://grid10g.localdomain:1159/em/upload
Started at : 2011-11-28 13:13:28
Started by user : oracle
Last Reload : 2011-11-28 13:13:28
Last successful upload : 2011-11-28 13:15:50
Total Megabytes of XML files uploaded so far : 8.01
Number of XML files pending upload : 21
Size of XML files pending upload(MB) : 4.15
Available disk space on upload filesystem : 20.57%
Last successful heartbeat to OMS : 2011-11-28 13:15:59
---------------------------------------------------------------
Agent is Running and Ready
Configure the Enterprise Manager repository