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

來源:互聯網
上載者:User

標籤:monitor   host   pos   .sh   download   --   cannot   安裝配置   server   

注意:

此文檔為生產上操作文檔,省略了IP,oracle使用者server,agent 端至少需要sudo,ping,ssh,建立目錄許可權。

一、安裝要求1.1. 系統情況一覽

IP

資料庫

OEM

作業系統

資料庫版本

XX1

單機

service(12.1.0.5)

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資料庫需要先添加主機,叢集高可用服務(也可以直接添加資料庫,不添加高可用服務,後續文檔補充),後添加資料庫;單機先添加主機(不用添加叢集高可用服務),後添加資料庫。

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

二、開始安裝Oracle 12c OEM2.1. 安裝Oracle 12c OEM server

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

修改一下參數:

 

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

 

[[email protected] agent]# ln -s /usr/bin/sudo /usr/local/bin/sudo

[[email protected] agent]# ls -lh /usr/local/bin/sudo

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

[[email protected] agent]# ls -lh /usr/bin/sudo

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

 [[email protected] agent]# ls -l /etc/sudoers

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

[[email protected] 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

 

[[email protected] ~]$ ls -lh /root/

ls: cannot open directory /root/: Permission denied

[[email protected] ~]$ 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):(bpmexrac1)為例:

[[email protected] u01]# mkdir -p /app/u01/agent/

[[email protected] u01]# chown -R oracle:oinstall /app/u01/agent

[[email protected] u01]# cat /etc/hosts

IP hostname

[[email protected] u01]# ls -lh /usr/bin/sudo

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

[[email protected] u01]# ls -l /etc/sudoers

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

[[email protected] u01]# ls -lh /usr/local/bin/sudo

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

[[email protected] u01]# ln -s /usr/bin/sudo /usr/local/bin/sudo

[[email protected] u01]# ls -lh /usr/local/bin/sudo

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

[[email protected] u01]# cp /etc/sudoers /etc/sudoers.bak

[[email protected] 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

[[email protected] u01]# su - oracle

[[email protected] ~]$ ls -lh /root/

ls: cannot open directory /root/: Permission denied

[[email protected] ~]$ 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,[email protected],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,[email protected]

重啟sshd 服務:service sshd restart

 

2.3.2安裝agent

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

 

 

添加需要監控的資料庫:

 

 

next:

 

 

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

 

下一步部署agent:

 

 

下一步:

 

添加成功

2.4. 添加叢集服務

 

 

下一步:

 

 

 

下一步:

 

 

進行儲存(已添加過可以更新)

可以根據選擇添加主機的叢集高可用服務。

2.5. 添加管理的資料庫

點擊 Target -> Database -> add 添加資料庫配置資訊:(注意,如果有多套cluster 資料庫添加,建議用不用這種這種辦法添加,後續有文章發出)

 

 

Next

 

 

 

Next:

 

 

注意以需要配置1,2,3:

 

 

 

依次配置1,2,3;配置2的時候,設定執行個體->監聽程式電腦名稱,需要設定IP,最好不要寫成網域名稱。

Next:

 

 

看添加成功的資料庫:

目標->資料庫

 

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.