一、環境概要linux
--------- | -------- | IP | 內存 |
---|---|---|---|
Linux 6.7 | DB 12.2 | 192.168.3.2 | 32G |
OEM | 13.2 | 192.168.3.2 | 32G |
二、系統環境配置shell
[root@leo ~]# vi /etc/sysctl.conf kernel.shmall = 4294967296 kernel.sem = 510 65280 510 128 kernel.shmmni = 4096 kernel.shmmax = 137438953472 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 1048576 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576 fs.file-max = 6815744 fs.aio-max-nr = 1048576 vm.swappiness = 0 vm.dirty_background_ratio = 3 vm.dirty_ratio = 80 vm.dirty_expire_centisecs = 500 vm.dirty_writeback_centisecs = 100 net.ipv4.tcp_sack = 0 net.ipv4.tcp_timestamps = 0 net.ipv4.conf.default.rp_filter = 0 net.ipv4.tcp_wmem = 262144 net.ipv4.tcp_rmem = 4194304 [root@leo ~]# sysctl -p --使參數生效
2.1 配置用戶shell限制數據庫
[root@leo ~]# vi /etc/security/limits.conf oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 oracle soft memlock 3145728 oracle hard memlock 3145728 oracle soft stack 10240 oracle hard stack 10240
2.2 模塊配置瀏覽器
[root@leo ~]# vi /etc/pam.d/login session required /lib64/security/pam_limits.so
2.3 建立用戶和組bash
groupadd oinstall groupadd dba useradd -m -g oinstall -G dba oracle echo "oracle"|passwd --stdin oracle mkdir -p /DBSoft/product/12.2.0.1/db_1 chown -R oracle:oinstall /DBSoft
2.4 操做系統profile配置服務器
[root@leo ~]# vi /etc/profile if [ \$USER = "oracle" ]; then if [ \$SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi
2.5 配置oracle用戶環境變量session
vi /home/oracle/.bash_profile export EDITOR=vi export ORACLE_SID=woo export ORACLE_BASE=/DBSoft export ORACLE_HOME=\$ORACLE_BASE/product/12.2.0.1/db_1 export LD_LIBRARY_PATH=\$ORACLE_HOME/lib export PATH=\$ORACLE_HOME/bin:\$PATH umask 022
2.6 關閉防火牆、selinuxoracle
chkconfig --level 345 ip6tables off chkconfig --level 345 iptables off service ip6tables stop service iptables stop sed -i "/^SELINUX=/s#enforcing#disabled#" /etc/selinux/config
2.7 修改hosts文件app
vi /etc/hosts 192.168.3.2 leo
3 安裝數據庫軟件tcp
[oracle@leo ~]$ ls linuxx64_12201_database.zip [oracle@oemdb ~]$ unzip linuxx64_12201_database.zip [oracle@leo ~]$ ll total 3372760 drwxr-xr-x. 7 oracle oinstall 4096 July 09 2019 database -rwxr-xr-x. 1 root root 3453696911 July 07 16:03 linuxx64_12201_database.zip [oracle@leo database]$ ./runInstaller -silent -noconfig -responseFile /home/oracle/database/response/db_install.rsp -ignorePrereq Starting Oracle Universal Installer... Checking Temp space: must be greater than 500 MB. Actual 27734 MB Passed Checking swap space: must be greater than 150 MB. Actual 20479 MB Passed Preparing to launch Oracle Universal Installer from /tmp/OraInstall2019-07-09_10-23-25AM. Please wait ...[oracle@leo database]$ [WARNING] [INS-32055] The Central Inventory is located in the Oracle base. ACTION: Oracle recommends placing this Central Inventory in a location outside the Oracle base directory. You can find the log of this install session at: /DBSoft/oracle/oraInventory/logs/installActions2019-07-09_10-23-25AM.log 提示執行root腳本: [oracle@leo database]$ The installation of Oracle Database 12c was successful. Please check '/DBSoft/oracle/oraInventory/logs/silentInstall2019-07-09_10-23-25AM.log' for more details. As a root user, execute the following script(s): 1. /DBSoft/oracle/oraInventory/orainstRoot.sh 2. /DBSoft/oracle/product/12.2.0.1/db_1/root.sh Successfully Setup Software.
3.1 GUI界面
這是一個bug,已經執行而且添加,不用管,詳見supprt (文檔 ID 2287806.1),點擊忽略便可。
3.2 執行root腳本
[root@leo ~]# /DBSoft/oracle/product/12.2.0.1/db_1/root.sh
4 DBCA建立數據庫
修改日誌組的大小爲250M
4.1 修改數據庫配置
SQL> alter system set processes= 2000 scope=spfile; SQL> alter system set session_cached_cursors=300 scope=spfile SQL> alter system set open_cursors=350 scope=spfile; SQL> alter system set sessions=2000 scope=spfile; SQL> alter system set shared_pool_size=5120M scope=spfile; SQL> alter system set "_allow_insert_with_update_check"=true;
5 安裝OEM
注意:OEM 13cR2安裝包下載以後不要解壓,直接執行em13200_linux64.bin文件會自動解壓到/tmp目錄中,隨後會會調用安裝程序起圖形界面,這個過程大約5-10分鐘,需耐心等待。
注意:看到這些信息要在數據庫端修改對應的參數再從新執行便可。
注意:通過3.5個小時的安裝終於出現彈出須要執行allroot.sh腳本界面,安裝基本告成。執行allroot.sh腳本
6 使用OEM
打開瀏覽器進入OEM頁面https://192.168.3.2:7802/em 用戶名sysman密碼oracle123
進入以後接受許可協議
7 安裝部署Agent
7.1 添加地址解析
在全部受管理的服務器增長OMS服務解析地址: # echo 「192.168.3.3 oem13c」 >> /etc/hosts
7.2 部署Agent
7.3 執行root.sh腳本
全部受管節點以root用戶執行root.sh腳本 [root@leo ~]# /DBSoft2/oracle/product/oem13c/AgentHome/agent_13.2.0.0.0/root.sh
至此,EM13C Agent 部署完成。