Oracle 12c(12.1.0.5)OEM server agent 安裝配置

注意:html

此文檔爲生產上操做文檔,省略了IP,oracle用戶server,agent 端至少須要sudo,ping,ssh,建立目錄權限;此文章被布布扣引用,網址:http://www.bubuko.com/infodetail-2539057.htmllinux

1、安裝要求

1.1. 系統狀況一覽

IPc++

數據庫web

OEM數據庫

操做系統服務器

數據庫版本oracle

XX1app

單機dom

service(12.1.0.5)ssh

Linux 6.7

oracle11.2.0.4

XX2

RAC

agent

Linux 6.7

Oracle11.2.0.4

XX3

RAC

agent

Linux 6.7

Oracle11.2.0.4

 

注意:OEM管理RAC數據庫須要先添加主機,集羣高可用服務(也能夠直接添加數據庫,不添加高可用服務,後續文檔補充),後添加數據庫;單機先添加主機(不用添加集羣高可用服務),後添加數據庫,GC服務器很耗資源,須要安裝oracle軟件,建立實例再配置OEM服務端,agent端,建議服務端32G+內存。

1.2. 操做系統要求

安裝Enterprise Manager Cloud Control 12c的硬件要求如如下列表,要求至少4G內存,

Linux 6.X 須要的依賴包以下:

yum -y install make binutils gcc libaio glibc-common libstdc++ sysstat glibc-devel glibc-devel

 

linux 5.X的依賴包以下:

yum -y install  make binutils gcc libaio glibc-common libstdc setarch sysstat rng-utils libXtst xorg-x11-utils

 

注意: server和agent端都須要安裝依賴包

1.3. 軟件要求

須要的軟件包:

em12105_linux64_disk1

em12105_linux64_disk2

em12105_linux64_disk3

下載地址:

http://www.oracle.com/technetwork/oem/grid-control/downloads/linuxx8664soft-085949.html

 

1.4. 數據庫要求

若是數據庫配置了dbcontrol,使用以下命令將其刪除:

SYSMAN_PWD: Password for SYSMAN user

SYS_PWD: Password for SYS user

$ emca -deconfig dbcontrol db -repos drop -SYS_PWD -SYSMAN_PWD

刪除EM案例:

$ emca -deconfig dbcontrol db -repos drop -oracle -Oracle123

  

建立目錄

mkdir -p /u01/app/oracle/Middleware/

mkdir -p /u01/app/oracle/agent

chown -R oracle:oinstall /u01/app/oracle/Middleware

chown -R oracle:oinstall /u01/app/oracle/agent

解壓文件(同一個目錄解壓)

unzip em12105_linux64_disk1

unzip em12105_linux64_disk2

unzip em12105_linux64_disk3

2、開始安裝Oracle 12c OEM

2.1. 安裝Oracle 12c OEM server

注意:確保安裝目錄空間至少14G

修改一下參數:

可酌情修改參數,GC服務器很耗資源,建議參數不要過小。

 

oracle用戶進入解壓目錄,運行./runInstaller

 

選擇」Skip」跳過更新,點擊NEXT

 

Prerequisite checks安裝檢測,如遇報錯,請根據提示修改(或者忽略),點擊NEXT

 

定製版本:

安裝目錄選擇,middleware HOME目錄必定要爲空

 

Host name 能夠不爲域名格式

 

用戶名密碼設置:

weblogic/XXX

sysman/XXX 

  

  

 

配置oem服務用戶名和密碼:

 

 

 

 

服務端口號設置:默認便可:

 

 

下一步:

 

執行腳本:

 

 

查看服務器端的OEM 狀態:

/u01/app/oracle/Middleware/oms/bin/emctl status oms

  

查看服務器端agent狀態:

/u01/app/oracle/agent/agent_inst/bin/emctl status agent

 

控制檯地址:

https://IP:7802/em

 

啓動OEM時,須要先啓動所在oms服務器的數據庫,以及中間件控制檯,最後啓動OMS(安裝完成後,默認已啓動),啓動中間件管理臺(默認服務器重啓會自動啓動):

Root:

nohup /u01/app/oracle/gc_inst/user_projects/domains/GCDomain/bin/startWebLogic.sh  &

控制檯地址:

https:// IP:7102/console

啓動oms:

Oracle:

/u01/app/oracle/Middleware/oms/bin/emctl start oms -all

啓動客戶端:

/u01/app/oracle/agent/agent_inst/bin/emctl start agent

 

 

2.2. 服務端配置

 vi /etc/hosts

IP  hostname

 

[root@xxserver agent]# ln -s /usr/bin/sudo /usr/local/bin/sudo

[root@xxserver agent]# ls -lh /usr/local/bin/sudo

lrwxrwxrwx. 1 root root 13 Oct  9 11:08 /usr/local/bin/sudo -> /usr/bin/sudo

[root@xxserver agent]# ls -lh /usr/bin/sudo

---s--x--x. 1 root root 121K May  6  2015 /usr/bin/sudo

 [root@xxserver agent]# ls -l /etc/sudoers

-r--r-----. 1 root root 4002 Mar  2  2012 /etc/sudoers

[root@xxserver agent]# vi /etc/sudoers

打開/etc/sudoers 將如下三處修改

修改前:

Defaults requiretty

修改後:

Defaults:oracle !requiretty

修改前:

Defaults !visiblepw

修改後:

Defaults visiblepw

修改前:

##

## Allow root to run any commands anywhere

root ALL=(ALL) ALL

修改後

##

## Allow root to run any commands anywhere

root ALL=(ALL) ALL

oracle ALL=(ALL) ALL --這裏加一行

以上三處修改完成後,save 文件

測試 oracle 可否正常 sudo

 

[oracle@xxserver ~]$ ls -lh /root/

ls: cannot open directory /root/: Permission denied

[oracle@xxserver ~]$ sudo ls -l /root

 

We trust you have received the usual lecture from the local System

Administrator. It usually boils down to these three things:

 

    #1) Respect the privacy of others.

    #2) Think before you type.

    #3) With great power comes great responsibility.

 

[sudo] password for oracle:

total 104

-rw-------. 1 root root  1554 Sep 27 17:04 anaconda-ks.cfg

drwxr-xr-x. 2 root root  4096 Sep 27 17:06 Desktop

drwxr-xr-x. 2 root root  4096 Sep 27 17:06 Documents

drwxr-xr-x. 2 root root  4096 Sep 27 17:06 Downloads

-rw-r--r--. 1 root root 51940 Sep 27 17:04 install.log

-rw-r--r--. 1 root root 10259 Sep 27 17:02 install.log.syslog

drwxr-xr-x. 2 root root  4096 Sep 27 17:06 Music

drwxr-xr-x. 2 root root  4096 Sep 27 17:06 Pictures

drwxr-xr-x. 2 root root  4096 Sep 27 17:06 Public

drwxr-xr-x. 2 root root  4096 Sep 27 17:06 Templates

drwxr-xr-x. 2 root root  4096 Sep 27 17:06 Videos

  

2.3. 安裝agent

2.3.1前期環境準備

mkdir -p /u01/agent/

chmod oracle.oinstall /u01/agent

注意:

1./u01/agent/ 必定要爲空。

2.全部監控服務器/etc/hosts 配置域名解析

3.全部服務器作如下sudo文件配置:

確保/usr/local/bin/sudo 這個符號連接存在

ROOT:

ln -s /usr/bin/sudo /usr/local/bin/sudo

ls -l /etc/sudoers

-r--r----- 1 root root 3407 Oct 18 19:30 /etc/sudoers

cp /etc/sudoers /etc/sudoers.bak

打開/etc/sudoers 將如下三處修改

修改前:

Defaults requiretty

修改後:

Defaults:oracle !requiretty

修改前:

Defaults !visiblepw

修改後:

Defaults visiblepw

修改前:

##

## Allow root to run any commands anywhere

root ALL=(ALL) ALL

修改後

##

## Allow root to run any commands anywhere

root ALL=(ALL) ALL

oracle ALL=(ALL) ALL --這裏加一行

以上三處修改完成後,save 文件

測試 oracle 可否正常 sudo

su - oracle

ls -l /root

ls: /root: Permission denied

sudo ls -l /root

[sudo] password for oracle:

total 88

-rw------- 1 root root 1832 Aug 11 05:26 anaconda-ks.cfg

drwxr-xr-x 2 root root 4096 Aug 10 21:31 Desktop

-rw-r--r-- 1 root root 56307 Aug 11 05:26 install.log

-rw-r--r-- 1 root root 4136 Aug 11 05:26 install.log.syslog

 

同理設置其餘被管理端(agent):(xxhost1)爲例:

[root@xxhost1 u01]# mkdir -p /app/u01/agent/

[root@xxhost1 u01]# chown -R oracle:oinstall /app/u01/agent

[root@xxhost1 u01]# cat /etc/hosts

IP hostname

[root@xxhost1 u01]# ls -lh /usr/bin/sudo

---s--x--x. 1 root root 121K May  6  2015 /usr/bin/sudo

[root@xxhost1 u01]# ls -l /etc/sudoers

-r--r-----. 1 root root 4002 Mar  2  2012 /etc/sudoers

[root@xxhost1 u01]# ls -lh /usr/local/bin/sudo

ls: cannot access /usr/local/bin/sudo: No such file or directory

[root@xxhost1 u01]# ln -s /usr/bin/sudo /usr/local/bin/sudo

[root@xxhost1 u01]# ls -lh /usr/local/bin/sudo

lrwxrwxrwx 1 root root 13 Oct  9 11:27 /usr/local/bin/sudo -> /usr/bin/sudo

[root@xxhost1 u01]# cp /etc/sudoers /etc/sudoers.bak

[root@xxhost1 u01]# chmod 755 /etc/sudoers

打開/etc/sudoers 將如下三處修改

修改前:

Defaults requiretty

修改後:

Defaults:oracle !requiretty

修改前:

Defaults !visiblepw

修改後:

Defaults visiblepw

修改前:

##

## Allow root to run any commands anywhere

root ALL=(ALL) ALL

修改後

##

## Allow root to run any commands anywhere

root ALL=(ALL) ALL

oracle ALL=(ALL) ALL --這裏加一行

以上三處修改完成後,save 文件

測試 oracle 可否正常 sudo

[root@xxhost1 u01]# su - oracle

[oracle@xxhost1 ~]$ ls -lh /root/

ls: cannot open directory /root/: Permission denied

[oracle@xxhost1 ~]$ sudo ls -lh /root/

 

We trust you have received the usual lecture from the local System

Administrator. It usually boils down to these three things:

 

    #1) Respect the privacy of others.

    #2) Think before you type.

    #3) With great power comes great responsibility.

 

[sudo] password for oracle:

total 84K

-rw-------. 1 root root 1.7K Aug  1 08:07 anaconda-ks.cfg

drwxr-xr-x  2 root root 4.0K Aug  7 06:38 Desktop

drwxr-xr-x  2 root root 4.0K Aug  7 06:38 Documents

drwxr-xr-x  2 root root 4.0K Aug  7 06:38 Downloads

-rw-r--r--. 1 root root  29K Aug  1 08:07 install.log

-rw-r--r--. 1 root root 8.5K Aug  1 08:06 install.log.syslog

drwxr-xr-x  2 root root 4.0K Aug  7 06:38 Music

drwxr-xr-x  2 root root 4.0K Aug  7 06:38 Pictures

drwxr-xr-x  2 root root 4.0K Aug  7 06:38 Public

-rw-r--r--. 1 root root  358 Aug  1 08:07 redhat.repo_bak

drwxr-xr-x  2 root root 4.0K Aug  7 06:38 Templates

drwxr-xr-x  2 root root 4.0K Aug  7 06:38 Videos

mkdir -p /agent

chown -R oracle:oinstall /agent

 

其餘:

說明:因爲主機作了ssh 遠程限制,須要修改監控服務器以及全部被監控主機如下參數文件:

vi /etc/ssh/sshd_config

添加如下:

Ciphers aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr,3des-cbc,arcfour128,arcfour256,arcfour,blowfish-cbc,cast128-cbc

 

MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-sha1-96,hmac-md5-96

 

KexAlgorithms diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group1-sha1,curve25519-sha256@libssh.org

重啓sshd 服務:service sshd restart

 

2.3.2安裝agent

設置 -> 添加目標 ->手動添加目標

靜默安裝agent參照:http://www.cnblogs.com/hmwh/p/8657498.html

 

 

添加須要監控的數據庫:

 

 

next:

 

 

點擊OK,而後next 出現如下,注意紅色圖,填完配置:

 

下一步部署agent:

 

 

下一步:

 

添加成功

2.4. 添加集羣服務

 

 

下一步:

 

 

 

下一步:

 

 

進行保存(已添加過能夠更新)

上圖能夠根據選擇添加主機的集羣高可用服務。

2.5. 添加管理的數據庫

點擊 Target -> Database -> add 添加數據庫配置信息:(注意,若是有多套cluster 數據庫添加,也能夠用這種辦法添加:http://www.cnblogs.com/hmwh/p/8657498.html)

 

 

Next

 

 

 

Next:

 

 

注意如下圖須要配置1,2,3:

 

 

 

依次配置1,2,3;配置2的時候,設置實例->監聽程序計算機名,須要設置IP,最好不要寫成域名。

Next:

 

 

看添加成功的數據庫:

目標->數據庫

相關文章
相關標籤/搜索