star帶你玩轉Oracle-零基礎openfiler共享儲存安裝Oracle 11G RAC-(3/8)-orastar
10、作業系統_配置(htdb1、htdb2)
10.1 修改/etc/hosts
root執行指令碼
-
cat>>/etc/hosts<<EOF
-
#Public
-
192.168.1.115 htdb1
-
192.168.1.117 htdb2
-
-
#Private
-
10.10.10.115 htdb1-priv
-
10.10.10.117 htdb2-priv
-
-
#Virtual
-
192.168.1.116 htdb1-vip
-
192.168.1.118 htdb2-vip
-
-
#SCAN
-
192.168.1.119 htdb-scan
- EOF
10.2 配置YUM
10.2.1 首次掛載報錯
[root@htdb1 ~]# mount /dev/cdrom /mnt
mount: you must specify the filesystem type
10.2.2 處理報錯方法
[root@htdb1 ~]# mount /dev/cdrom /mnt
mount: block device /dev/sr0 is write-protected, mounting read-only
#vi /etc/yum.repos.d/rhel-source.repo --說明: 先清空該檔案,再新增以下內容。 有同學反應,yum無法正常安裝rpm包,因為沒有正常該檔案造成。
[rhel-oracle-lib]
name=oracle
baseurl=file:///mnt
enabled=1
gpgcheck=0
#yum clean all
#yum list |head
10.3 安裝RPM包
10.4 安裝Oracle安裝所需RPM包
|
[root@htdb2 ~]# yum install -y gcc compat-gcc-34 elfutils-libelf-devel compat-libstdc++-33
elfutils-libelf gcc-c++ glibc-headers libaio libaio-devel libgcc libstdc++
libstdc++-devel make ksh sysstat unixODBC compat-libcap1 libXp
Loaded plugins: product-id, refresh-packagekit, search-disabled-repos, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Install Process
Package elfutils-libelf-0.164-2.el6.x86_64 already installed and latest version
Package glibc-headers-2.12-1.192.el6.x86_64 already installed and latest version
Package libaio-0.3.107-10.el6.x86_64 already installed and latest version
Package libgcc-4.4.7-17.el6.x86_64 already installed and latest version
Package libstdc++-4.4.7-17.el6.x86_64 already installed and latest version
Package 1:make-3.81-23.el6.x86_64 already installed and latest version
Package sysstat-9.0.4-31.el6.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package compat-gcc-34.x86_64 0:3.4.6-19.el6 will be installed
---> Package compat-libcap1.x86_64 0:1.10-1 will be installed
---> Package compat-libstdc++-33.x86_64 0:3.2.3-69.el6 will be installed
---> Package elfutils-libelf-devel.x86_64 0:0.164-2.el6 will be installed
---> Package gcc.x86_64 0:4.4.7-17.el6 will be installed
--> Processing Dependency: cpp = 4.4.7-17.el6 for package: gcc-4.4.7-17.el6.x86_64
--> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.4.7-17.el6.x86_64
---> Package gcc-c++.x86_64 0:4.4.7-17.el6 will be installed
--> Processing Dependency: libmpfr.so.1()(64bit) for package: gcc-c++-4.4.7-17.el6.x86_64
---> Package ksh.x86_64 0:20120801-33.el6 will be installed
---> Package libXp.x86_64 0:1.0.2-2.1.el6 will be installed
---> Package libaio-devel.x86_64 0:0.3.107-10.el6 will be installed
---> Package libstdc++-devel.x86_64 0:4.4.7-17.el6 will be installed
---> Package unixODBC.x86_64 0:2.2.14-14.el6 will be installed
--> Running transaction check
---> Package cloog-ppl.x86_64 0:0.15.7-1.2.el6 will be installed
--> Processing Dependency: libppl.so.7()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64
--> Processing Dependency: libppl_c.so.2()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64
---> Package cpp.x86_64 0:4.4.7-17.el6 will be installed
---> Package mpfr.x86_64 0:2.4.1-6.el6 will be installed
--> Running transaction check
---> Package ppl.x86_64 0:0.10.2-11.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=========================================================================================================================
Package Arch Version Repository Size
=========================================================================================================================
Installing:
compat-gcc-34 x86_64 3.4.6-19.el6 rhel-oracle-lib 3.7 M
compat-libcap1 x86_64 1.10-1 rhel-oracle-lib 17 k
compat-libstdc++-33 x86_64 3.2.3-69.el6 rhel-oracle-lib 183 k
elfutils-libelf-devel x86_64 0.164-2.el6 rhel-oracle-lib 32 k
gcc x86_64 4.4.7-17.el6 rhel-oracle-lib 10 M
gcc-c++ x86_64 4.4.7-17.el6 rhel-oracle-lib 4.7 M
ksh x86_64 20120801-33.el6 rhel-oracle-lib 761 k
libXp x86_64 1.0.2-2.1.el6 rhel-oracle-lib 29 k
libaio-devel x86_64 0.3.107-10.el6 rhel-oracle-lib 13 k
libstdc++-devel x86_64 4.4.7-17.el6 rhel-oracle-lib 1.6 M
unixODBC x86_64 2.2.14-14.el6 rhel-oracle-lib 378 k
Installing for dependencies:
cloog-ppl x86_64 0.15.7-1.2.el6 rhel-oracle-lib 93 k
cpp x86_64 4.4.7-17.el6 rhel-oracle-lib 3.7 M
mpfr x86_64 2.4.1-6.el6 rhel-oracle-lib 156 k
ppl x86_64 0.10.2-11.el6 rhel-oracle-lib 1.3 M
Transaction Summary
=========================================================================================================================
Install 15 Package(s)
Total download size: 27 M
Installed size: 70 M
Downloading Packages:
-------------------------------------------------------------------------------------------------------------------------
Total 33 MB/s | 27 MB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : mpfr-2.4.1-6.el6.x86_64 1/15
Installing : cpp-4.4.7-17.el6.x86_64 2/15
Installing : libstdc++-devel-4.4.7-17.el6.x86_64 3/15
Installing : ppl-0.10.2-11.el6.x86_64 4/15
Installing : cloog-ppl-0.15.7-1.2.el6.x86_64 5/15
Installing : gcc-4.4.7-17.el6.x86_64 6/15
Installing : gcc-c++-4.4.7-17.el6.x86_64 7/15
Installing : libXp-1.0.2-2.1.el6.x86_64 8/15
Installing : compat-libstdc++-33-3.2.3-69.el6.x86_64 9/15
Installing : compat-gcc-34-3.4.6-19.el6.x86_64 10/15
Installing : libaio-devel-0.3.107-10.el6.x86_64 11/15
Installing : unixODBC-2.2.14-14.el6.x86_64 12/15
Installing : ksh-20120801-33.el6.x86_64 13/15
Installing : elfutils-libelf-devel-0.164-2.el6.x86_64 14/15
Installing : compat-libcap1-1.10-1.x86_64 15/15
rhel-oracle-lib/productid | 1.6 kB 00:00 ...
Verifying : compat-libcap1-1.10-1.x86_64 1/15
Verifying : elfutils-libelf-devel-0.164-2.el6.x86_64 2/15
Verifying : ksh-20120801-33.el6.x86_64 3/15
Verifying : ppl-0.10.2-11.el6.x86_64 4/15
Verifying : unixODBC-2.2.14-14.el6.x86_64 5/15
Verifying : libaio-devel-0.3.107-10.el6.x86_64 6/15
Verifying : compat-gcc-34-3.4.6-19.el6.x86_64 7/15
Verifying : mpfr-2.4.1-6.el6.x86_64 8/15
Verifying : libstdc++-devel-4.4.7-17.el6.x86_64 9/15
Verifying : gcc-c++-4.4.7-17.el6.x86_64 10/15
Verifying : gcc-4.4.7-17.el6.x86_64 11/15
Verifying : compat-libstdc++-33-3.2.3-69.el6.x86_64 12/15
Verifying : libXp-1.0.2-2.1.el6.x86_64 13/15
Verifying : cpp-4.4.7-17.el6.x86_64 14/15
Verifying : cloog-ppl-0.15.7-1.2.el6.x86_64 15/15
Installed:
compat-gcc-34.x86_64 0:3.4.6-19.el6 compat-libcap1.x86_64 0:1.10-1 compat-libstdc++-33.x86_64 0:3.2.3-69.el6
elfutils-libelf-devel.x86_64 0:0.164-2.el6 gcc.x86_64 0:4.4.7-17.el6 gcc-c++.x86_64 0:4.4.7-17.el6
ksh.x86_64 0:20120801-33.el6 libXp.x86_64 0:1.0.2-2.1.el6 libaio-devel.x86_64 0:0.3.107-10.el6
libstdc++-devel.x86_64 0:4.4.7-17.el6 unixODBC.x86_64 0:2.2.14-14.el6
Dependency Installed:
cloog-ppl.x86_64 0:0.15.7-1.2.el6 cpp.x86_64 0:4.4.7-17.el6 mpfr.x86_64 0:2.4.1-6.el6 ppl.x86_64 0:0.10.2-11.el6
Complete!
[root@htdb2 ~]#
10.5 安裝iscsi包
使用root執行命令:yum install -y iscsi-initiator-*
[root@htdb1 ~]# yum install -y iscsi-initiator-*
Loaded plugins: product-id, refresh-packagekit, search-disabled-repos, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package iscsi-initiator-utils.x86_64 0:6.2.0.873-21.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=========================================================================================================================
Package Arch Version Repository Size
=========================================================================================================================
Installing:
iscsi-initiator-utils x86_64 6.2.0.873-21.el6 rhel-oracle-lib 730 k
Transaction Summary
=========================================================================================================================
Install 1 Package(s)
Total download size: 730 k
Installed size: 2.5 M
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : iscsi-initiator-utils-6.2.0.873-21.el6.x86_64 1/1
Verifying : iscsi-initiator-utils-6.2.0.873-21.el6.x86_64 1/1
Installed:
iscsi-initiator-utils.x86_64 0:6.2.0.873-21.el6
Complete!
10.6 安裝multipath包
yum install -y device-mapper-multipath-*
[root@htdb1 ~]# yum install -y device-mapper-multipath-*
Loaded plugins: product-id, refresh-packagekit, search-disabled-repos, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package device-mapper-multipath.x86_64 0:0.4.9-93.el6 will be installed
---> Package device-mapper-multipath-libs.x86_64 0:0.4.9-93.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=========================================================================================================================
Package Arch Version Repository Size
=========================================================================================================================
Installing:
device-mapper-multipath x86_64 0.4.9-93.el6 rhel-oracle-lib 128 k
device-mapper-multipath-libs x86_64 0.4.9-93.el6 rhel-oracle-lib 198 k
Transaction Summary
=========================================================================================================================
Install 2 Package(s)
Total download size: 326 k
Installed size: 687 k
Downloading Packages:
-------------------------------------------------------------------------------------------------------------------------
Total 15 MB/s | 326 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : device-mapper-multipath-libs-0.4.9-93.el6.x86_64 1/2
Installing : device-mapper-multipath-0.4.9-93.el6.x86_64 2/2
Verifying : device-mapper-multipath-libs-0.4.9-93.el6.x86_64 1/2
Verifying : device-mapper-multipath-0.4.9-93.el6.x86_64 2/2
Installed:
device-mapper-multipath.x86_64 0:0.4.9-93.el6 device-mapper-multipath-libs.x86_64 0:0.4.9-93.el6
Complete!
10.7 關閉防火牆及selinux
/sbin/iptables -F; /sbin/ip6tables -F
/sbin/chkconfig iptables off; /sbin/chkconfig ip6tables off
/bin/sed -i s/SELINUX=enforcing/SELINUX=disabled/ /etc/selinux/config
/usr/sbin/setenforce 0
10.8 修改/etc/sysctl.conf引數
-
cat>>/etc/sysctl.conf<<EOF
-
#fororacle
-
kernel.shmmni=4096
-
kernel.sem=250 32000 100 128
-
fs.aio-max-nr=1048576
-
fs.file-max=6815744
-
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
-
kernel.shmmni=4096
-
kernel.sem=250 32000 100 128
- EOF
10.9 修改/etc/security/limits.conf引數
-
cat>>/etc/security/limits.conf<<EOF
-
#fororacle
-
grid soft nproc 2047
-
grid hard nproc 16384
-
grid soft nofile 1024
-
grid hard nofile 65536
-
grid soft stack 10240
-
grid hard stack 10240
-
oracle soft nproc 2047
-
oracle hard nproc 16384
-
oracle soft nofile 1024
-
oracle hard nofile 65536
-
oracle soft stack 10240
-
oracle hard stack 10240
- EOF
10.10 修改/etc/pam.d/login引數
-
cat>>/etc/pam.d/login<<EOF
-
#fororacle
-
session required pam_limits.so
- EOF
10.11 修改/etc/profile引數
-
cat >> /etc/profile <<EOF
#for oracle
if [ \$USER = "oracle" ] || [ \$USER = "grid" ]; then
if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
EOF
10.12 建立使用者
-
/usr/sbin/groupadd -g 1000 oinstall
-
/usr/sbin/groupadd -g 1001 dba
-
/usr/sbin/groupadd -g 1002 oper
-
/usr/sbin/groupadd -g 1003 asmadmin
-
/usr/sbin/groupadd -g 1004 asmoper
-
/usr/sbin/groupadd -g 1005 asmdba
-
/usr/sbin/useradd –u 1000-g oinstall-G dba,oper,asmdba oracle
-
/usr/sbin/useradd –u 1001-g oinstall-G dba,asmadmin,asmdba,asmoper grid
-
/bin/echo"grid"|/usr/bin/passwd --stdin grid
- /bin/echo"oracle"|/usr/bin/passwd --stdin oracle
10.13 建立目錄
-
/bin/mkdir -p /u01/app/grid
-
/bin/mkdir -p /u01/app/11.2.0/grid
-
/bin/mkdir -p /u01/app/oracle
-
/bin/chown -R grid:oinstall /u01
-
/bin/chown -R oracle:oinstall /u01/app/oracle
- /bin/chmod -R 775 /u01
10.14 修改環境變數
GRID使用者:
-
cat >> /home/grid/.bash_profile <<EOF
-
export ORACLE_BASE=/u01/app/grid
-
export ORACLE_HOME=/u01/app/11.2.0/grid
-
export ORACLE_SID=+ASM1
-
export PATH=\$ORACLE_HOME/OPatch:\$ORACLE_HOME/bin:\$PATH
-
umask=022
- EOF
ORACLE使用者:
-
cat >> /home/oracle/.bash_profile <<EOF
-
export ORACLE_BASE=/u01/app/oracle
-
export ORACLE_HOME=\$ORACLE_BASE/product/11.2.0/db_1
-
export ORACLE_SID=htdb1
-
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
-
export LD_LIBRARY_PATH=\$ORACLE_HOME/lib
-
export PATH=\$ORACLE_HOME/OPatch:\$ORACLE_HOME/bin:\$PATH
-
umask=022
- EOF
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31442014/viewspace-2138823/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- star帶你玩轉Oracle-零基礎openfiler共享儲存安裝Oracle 11G RAC-(1/8)-orastarOracleAST
- star帶你玩轉Oracle-零基礎openfiler共享儲存安裝Oracle 11G RAC-(2/8)-orastarOracleAST
- star帶你玩轉Oracle-零基礎openfiler共享儲存安裝Oracle 11G RAC-(8/8)-orastaOracleAST
- star帶你玩轉Oracle-零基礎openfiler共享儲存安裝Oracle 11G RAC-(4/8)-orastaOracleAST
- star帶你玩轉Oracle-零基礎openfiler共享儲存安裝Oracle 11G RAC-(5/8)-orastaOracleAST
- star帶你玩轉Oracle-零基礎openfiler共享儲存安裝Oracle 11G RAC-(6/8)-orastaOracleAST
- star帶你玩轉Oracle-零基礎openfiler共享儲存安裝Oracle 11G RAC-(7/8)-orastaOracleAST
- star帶你玩轉Oracle_2_安裝oracle 10g on Redhat 6.8_orastarOracle 10gRedhatAST
- Oracle 11g RAC安裝--基於openfiler儲存+多路徑+udev方式Oracledev
- openfiler配置rac共享儲存
- star帶你玩轉postgre資料庫_1_postgre安裝資料庫
- 帶你玩轉七牛雲端儲存——高階篇
- 《轉》VMware vSphere 5.1 學習系列之二:安裝 Openfiler 儲存
- 安裝oracle 11g 使用ASM儲存 詳細OracleASM
- openfiler配置共享儲存shared storage及如何在客戶機發現使用共享儲存卷
- 零基礎玩轉ServerlessServer
- 【零基礎】帶你學C帶你飛
- openfiler安裝
- 虛擬RHEL5上安裝11g RAC-安裝配置
- 帶你玩轉css3的3D!CSSS33D
- Oracle 共享儲存掛載Oracle
- 儲存管理(一):openfiler介紹及儲存理解
- 教你零基礎玩轉 vim
- 儲存管理(二):openfiler之accounts
- openfiler安裝使用
- 安裝 openfiler on vmware
- Oracle 11G RAC叢集安裝(3)——安裝OracleOracle
- 零基礎:邪惡帶你3步快速掌握iSCSI搭建
- 大牛帶你玩轉 CSS3 3D 技術CSSS33D
- 帶你重新“玩轉”FlutterFlutter
- 使用VMware ESXi Server 5.0在OEL6.1上安裝 Oracle RAC 11gR1(8)-新增共享儲存硬碟ServerOracle硬碟
- 三步帶你玩轉前端裝飾器前端
- oracle 11g rac 共享儲存壞掉後資料庫恢復Oracle資料庫
- 成功安裝Oracle 11gR2 for Linux RAC,使用NFS作為共享儲存OracleLinuxNFS
- Oracle-安裝好oracle就有的tnsnames檔案Oracle
- DM8使用共享儲存DMASM搭建DMRACASM
- 儲存系列1-openfiler開源儲存管理平臺實踐
- NFS共享儲存NFS