這篇文章主要講解了“RHEL7.3怎么安裝11G grid和Rdbms”,文中的講解內容簡單清晰,易于學習與理解,下面請大家跟著小編的思路慢慢深入,一起來研究和學習“RHEL7.3怎么安裝11G grid和Rdbms”吧!
10年積累的網(wǎng)站設計、成都網(wǎng)站制作經(jīng)驗,可以快速應對客戶對網(wǎng)站的新想法和需求。提供各種問題對應的解決方案。讓選擇我們的客戶得到更好、更有力的網(wǎng)絡服務。我雖然不認識你,你也不認識我。但先制作網(wǎng)站后付款的網(wǎng)站建設流程,更有涵江免費網(wǎng)站建設讓你可以放心的選擇與我們合作。
##安裝桌面
yum -y groupinstall "Server with GUI"
#啟動桌面
startx
#設置啟動模式
[root@localhost ~]# systemctl get-default
multi-user.target
[root@localhost ~]# cat /etc/inittab
# inittab is no longer used when using systemd.
#
# ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
#
# Ctrl-Alt-Delete is handled by /usr/lib/systemd/system/ctrl-alt-del.target
#
# systemd uses 'targets' instead of runlevels. By default, there are two main targets:
#
# multi-user.target: analogous to runlevel 3 #多用戶模式
# graphical.target: analogous to runlevel 5 #圖形化模式
#
# To view current default target, run:
# systemctl get-default
#
# To set a default target, run:
# systemctl set-default TARGET.target
#
[root@localhost ~]# systemctl set-default graphical.target
Removed symlink /etc/systemd/system/default.target.
Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/graphical.target.
[root@localhost ~]# systemctl get-default
graphical.target
##創(chuàng)建用戶和組
groupadd -g 500 oinstall
groupadd -g 501 dba
groupadd -g 502 oper
groupadd -g 600 asmadmin
groupadd -g 601 asmdba
groupadd -g 602 asmoper
useradd -u 1000 -g oinstall -G dba,oper,asmdba oracle
useradd -u 1001 -g oinstall -G dba,asmdba,asmadmin,asmoper grid
##安裝包
yum -y install binutils compat-libstdc++ compat-libcap1 gcc gcc-c++ glibc glibc*.i686 glibc-devel glibc-devel*.i686 ksh libaio*.i686 libaio libaio-devel*.i686 libaio-devel libgcc*.i686 libgcc libstdc++*.i686 libstdc++ libstdc++-devel*.i686 libstdc++-devel libXi*.i686 libXi libXtst*.i686 libXtst make sysstat unixODBC*.i686 unixODBC unixODBC-devel
yum -y localinstall compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm
yum -y localinstall elfutils-libelf-devel-0.166-2.el7.x86_64.rpm
rpm -qa | grep binutils-2.23.52.0.1-12.el7.x86_64
rpm -qa | grep compat-libcap1-1.10-3.el7.x86_64
rpm -qa | grep gcc-4.8.2-3.el7.x86_64
rpm -qa | grep gcc-c++-4.8.2-3.el7.x86_64
rpm -qa | grep glibc-2.17-36.el7.i686
rpm -qa | grep glibc-2.17-36.el7.x86_64
rpm -qa | grep glibc-devel-2.17-36.el7.i686
rpm -qa | grep glibc-devel-2.17-36.el7.x86_64
rpm -qa | grep ksh
rpm -qa | grep libaio-0.3.109-9.el7.i686
rpm -qa | grep libaio-0.3.109-9.el7.x86_64
rpm -qa | grep libaio-devel-0.3.109-9.el7.i686
rpm -qa | grep libaio-devel-0.3.109-9.el7.x86_64
rpm -qa | grep libgcc-4.8.2-3.el7.i686
rpm -qa | grep libgcc-4.8.2-3.el7.x86_64
rpm -qa | grep libstdc++-4.8.2-3.el7.i686
rpm -qa | grep libstdc++-4.8.2-3.el7.x86_64
rpm -qa | grep libstdc++-devel-4.8.2-3.el7.i686
rpm -qa | grep libstdc++-devel-4.8.2-3.el7.x86_64
rpm -qa | grep libXi-1.7.2-1.el7.i686
rpm -qa | grep libXi-1.7.2-1.el7.x86_64
rpm -qa | grep libXtst-1.2.2-1.el7.i686
rpm -qa | grep libXtst-1.2.2-1.el7.x86_64
rpm -qa | grep make-3.82-19.el7.x86_64
rpm -qa | grep sysstat-10.1.5-1.el7.x86_64
binutils-2.23.52.0.1-12.el7.x86_64
compat-libcap1-1.10-3.el7.x86_64
compat-libstdc++-33-3.2.3-71.el7.i686
compat-libstdc++-33-3.2.3-71.el7.x86_64
gcc-4.8.2-3.el7.x86_64
gcc-c++-4.8.2-3.el7.x86_64
glibc-2.17-36.el7.i686
glibc-2.17-36.el7.x86_64
glibc-devel-2.17-36.el7.i686
glibc-devel-2.17-36.el7.x86_64
ksh
libaio-0.3.109-9.el7.i686
libaio-0.3.109-9.el7.x86_64
libaio-devel-0.3.109-9.el7.i686
libaio-devel-0.3.109-9.el7.x86_64
libgcc-4.8.2-3.el7.i686
libgcc-4.8.2-3.el7.x86_64
libstdc++-4.8.2-3.el7.i686
libstdc++-4.8.2-3.el7.x86_64
libstdc++-devel-4.8.2-3.el7.i686
libstdc++-devel-4.8.2-3.el7.x86_64
libXi-1.7.2-1.el7.i686
libXi-1.7.2-1.el7.x86_64
libXtst-1.2.2-1.el7.i686
libXtst-1.2.2-1.el7.x86_64
make-3.82-19.el7.x86_64
sysstat-10.1.5-1.el7.x86_64
##關閉防火墻和selinux
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
[root@rhel7ora11 ~]# getenforce
Enforcing
[root@rhel7ora11 ~]# setenforce 0
[root@rhel7ora11 ~]# getenforce
Permissive
[root@rhel7ora11 ~]# vi /etc/selinux/config
SELINUX=disabled
或
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
##內存參數(shù)配置
vi /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.shmmax = 964507648
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 = 1048576
##(英文為官檔建議),/sbin/sysctl -a | grep shm
kernel.shmall = 2097152 #共享內存的總量,8G內存設置:2097152*4k/1024/1024
40 percent of the size of physical memory in pages
Note: If the server supports multiple databases, or uses a large SGA, then set this parameter to a value that is equal to the total amount of shared memory, in 4K pages, that the system can use at one time.
kernel.shmmax = 4294967295 #最大共享內存的段大小
Half the size of physical memory in bytes
See My Oracle Support Note 567506.1 for additional information about configuring shmmax.
##查詢配置
/sbin/sysctl -a | grep ""
#vi /etc/security/limits.conf
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
##創(chuàng)建安裝目錄和賦權
mkdir -p /u01/grid
mkdir -p /u01/gridhome
mkdir -p /u01/oracle
chown -R grid:oinstall /u01/grid
chmod -R 755 /u01/grid
chown -R grid:oinstall /u01/gridhome
chmod -R 755 /u01/gridhome
chown -R oracle:oinstall /u01/oracle
chmod -R 755 /u01/oracle
#udev綁定裸設備,這里只綁定權限
[root@rhel7ora11 ~]# /usr/lib/udev/scsi_id -g -u /dev/sdb1
1ATA_VBOX_HARDDISK_VBfa21baba-d14e1c11
[root@rhel7ora11 ~]# /usr/lib/udev/scsi_id -g -u /dev/sdb2
1ATA_VBOX_HARDDISK_VBfa21baba-d14e1c11
[root@rhel7ora11 ~]# vi /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id -g -u -d /dev/$parent",
RESULT=="1ATA_VBOX_HARDDISK_VBfa21baba-d14e1c11", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?2", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id -g -u -d /dev/$parent",
RESULT=="1ATA_VBOX_HARDDISK_VBfa21baba-d14e1c11", OWNER="grid", GROUP="asmadmin", MODE="0660"
[root@rhel7ora11 ~]# systemctl restart systemd-udev-trigger.service
[root@rhel7ora11 ~]# ls -l /dev/sdb*
brw-rw---- 1 root disk 8, 16 Aug 7 14:02 /dev/sdb
brw-rw---- 1 grid asmadmin 8, 17 Aug 7 14:02 /dev/sdb1
brw-rw---- 1 grid asmadmin 8, 18 Aug 7 14:02 /dev/sdb2
#設置用戶參數(shù)文件
su - grid
export ORACLE_BASE=/u01/grid
export ORACLE_HOME=/u01/gridhome/11g
export ORACLE_SID=+ASM1
PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/local/bin
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
su - oracle
export ORACLE_BASE=/u01/oracle
export ORACLE_HOME=$ORACLE_BASE/11g
export ORACLE_SID=orcl
PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/local/bin
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
##安裝grid
./runInstaller
#注意,在執(zhí)行root腳本前,要執(zhí)行下面的步驟,否則會報錯無法啟動ohas服務
touch /usr/lib/systemd/system/ohas.service
chmod 777 /usr/lib/systemd/system/ohas.service
[Unit] Description=Oracle High Availability Services After=syslog.target [Service] ExecStart=/etc/init.d/init.ohasd run >/dev/null 2>&1 Type=simple Restart=always [Install] WantedBy=multi-user.target |
systemctl daemon-reload
systemctl enable ohas.service
systemctl start ohas.service
systemctl status ohas.service
[root@rhel7ora11 ~]# systemctl daemon-reload
[root@rhel7ora11 ~]# systemctl enable ohas.service
Created symlink from /etc/systemd/system/multi-user.target.wants/ohas.service to /usr/lib/systemd/system/ohas.service.
[root@rhel7ora11 ~]# systemctl start ohas.service
[root@rhel7ora11 ~]# systemctl status ohas.service
[0m ohas.service - Oracle High Availability Services
Loaded: loaded (/usr/lib/systemd/system/ohas.service; enabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Sun 2017-08-06 00:10:44 CST; 3s ago
Process: 20405 ExecStart=/etc/init.d/init.ohasd run >/dev/null 2>&1 Type=simple (code=exited, status=203/EXEC)
Main PID: 20405 (code=exited, status=203/EXEC)
Aug 06 00:10:44 rhel7ora11 systemd[1]: ohas.service: main process exited, code=exited, status=203/EXEC
Aug 06 00:10:44 rhel7ora11 systemd[1]: Unit ohas.service entered failed state.
Aug 06 00:10:44 rhel7ora11 systemd[1]: ohas.service failed.
Aug 06 00:10:44 rhel7ora11 systemd[1]: ohas.service holdoff time over, scheduling restart.
Aug 06 00:10:44 rhel7ora11 systemd[1]: start request repeated too quickly for ohas.service
Aug 06 00:10:44 rhel7ora11 systemd[1]: Failed to start Oracle High Availability Services.
Aug 06 00:10:44 rhel7ora11 systemd[1]: Unit ohas.service entered failed state.
Aug 06 00:10:44 rhel7ora11 systemd[1]: ohas.service failed.
##如果一直不能正常啟動,一直檢查下面的文件是否存在,當文件存在馬上手動啟動oha,推介
[root@rhel7ora11 ~]# ls /etc/init.d/init.ohasd
ls: cannot access /etc/init.d/init.ohasd: No such file or directory
[root@rhel7ora11 ~]# ls /etc/init.d/init.ohasd
/etc/init.d/init.ohasd
[root@rhel7ora11 ~]# systemctl start ohas.service
[root@rhel7ora11 ~]# systemctl status ohas.service
[0m ohas.service - Oracle High Availability Services
Loaded: loaded (/usr/lib/systemd/system/ohas.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2017-08-06 00:12:18 CST; 2s ago
Main PID: 23278 (init.ohasd)
CGroup: /system.slice/ohas.service
23278 /bin/sh /etc/init.d/init.ohasd run >/dev/null 2>&1 Type=simple
Aug 06 00:12:18 rhel7ora11 systemd[1]: Started Oracle High Availability Services.
Aug 06 00:12:18 rhel7ora11 systemd[1]: Starting Oracle High Availability Services...
Aug 06 00:12:18 rhel7ora11 su[23298]: (to grid) root on none
[root@rhel7ora11 ~]# systemctl status ohas.service
[0m ohas.service - Oracle High Availability Services
Loaded: loaded (/usr/lib/systemd/system/ohas.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2017-08-06 00:12:18 CST; 13s ago
Main PID: 23278 (init.ohasd)
CGroup: /system.slice/ohas.service
23278 /bin/sh /etc/init.d/init.ohasd run >/dev/null 2>&1 Type=simple
Aug 06 00:12:18 rhel7ora11 systemd[1]: Started Oracle High Availability Services.
Aug 06 00:12:18 rhel7ora11 systemd[1]: Starting Oracle High Availability Services...
Aug 06 00:12:18 rhel7ora11 su[23298]: (to grid) root on none
##安裝rdbms
cd database/
./runInstaller
注意:如果報告錯誤Error in invoking target ‘a(chǎn)gent nmhs‘ of makefile
解決方法:
cd $ORACLE_HOME/sysman/lib
vi ins_emagent.mk
修改此處如下:
#===========================
# emdctl
#===========================
$(SYSMANBIN)emdctl:
$(MK_EMAGENT_NMECTL)
替換為:
$(SYSMANBIN)emdctl:
$(MK_EMAGENT_NMECTL)-lnnz11
然后retry
感謝各位的閱讀,以上就是“RHEL7.3怎么安裝11G grid和Rdbms”的內容了,經(jīng)過本文的學習后,相信大家對RHEL7.3怎么安裝11G grid和Rdbms這一問題有了更深刻的體會,具體使用情況還需要大家實踐驗證。這里是創(chuàng)新互聯(lián),小編將為大家推送更多相關知識點的文章,歡迎關注!