This day I was playing around in OEM 12c again, and decided to look for trouble and install an agent to a target already running a very non critical db. This looked to me the ideal candidate to have an agent deployed.
I’ve read about this deployment procedure in a manual, but hey, let’s go for an adventure and just see what we come across when we follow the steps..We are looking for trouble, right?
Before we start, and have a nice next,next,finish experience, we have to prepare the target.
We need to be sure the target meets the requirements of the agent, like having the correct library and packages installed. Most of the time, when the target is running an oracle product (database, weblogic etc) it already meets these requirements.
Next will be the user preparation, and specifically the SUDO part. We are going to use the “oracle” account to run the agent, so we elevating these permissions in the /etc/sudoers file.
Log into the target with root permissions and open the sudoers config file:
[root@TARGET ~]# vi /etc/sudoers
Add/alter the following lines:
User_Alias ADMIN=oracle ADMIN ALL=(ALL) NOPASSWD:ALL # Needed for OEM on OEMSRV Defaults:oracle !requiretty
Before you continue, make sure the command below is working for the oracle user FROM the OEMSRV. You might have to accept some ssh keys if never logged on before with ssh from the OEMSRV:
[oracle@OEMSRV ~]$ ssh TARGET sudo -u oracle ls /tmp
Ok, done! On to the installation..
Select add target manually:
Press Next (upper right corner).
Fill in the base dir where you would like to install the agent software on (on the target).
Press the big blue plus on the line “named credential” to fill in the details of the user to install/connect to this server.
This is a really cool feature, and only needs to be done once per server. It makes it possible to have the OS admin fill in the credentials without the OEM admin to have the need for an special privileged account. Ideal when separating responsibilities!
Press Ok on the box, and Next on the previous screen to go to the next step.
The agent is successfully deployed. This was almost no hassle at all, and none compared with the previous versions of OEM grid..
Some nice information regarding the agent on the target: