您好,登錄后才能下訂單哦!
|
主機(jī) 1 (主庫) |
主機(jī) 2 (備庫) |
操作系統(tǒng) |
Centos6.5 64 位 |
Centos6.5 64 位 |
主機(jī)名 |
Primary |
Standby |
IP |
192.168.2.11 |
192.168.2.12 |
數(shù)據(jù)庫軟件版本 |
oracle 11.2.0.4 |
oracle 11.2.0.4 |
ORACLE_BASE |
/u01/app/oracle |
/u01/app/oracle |
ORACLE_HOME |
/u01/app/oracle/product/11.2.0/db_1 |
/u01/app/oracle/product/11.2.0/db_1 |
ORACLE_SID |
orcl |
lorcl |
1. 基礎(chǔ)參數(shù)設(shè)置
[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
[root@localhost ~]# vi /etc/hosts
[root@localhost ~]# /etc/init.d/iptables stop
[root@localhost ~]# chkconfig iptables off
[root@localhost ~]# vi /etc/pam.d/login
session required /lib64/security/pam_limits.so
[root@localhost ~]# vi /etc/selinux/config
SELINUX=disabled
[root@localhost ~]# vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
[root@localhost ~]# vi /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmni = 4096
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
[root@localhost ~]# sysctl -p
[root@localhost ~]# 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. 創(chuàng)建用戶和組,設(shè)置環(huán)境變量
[root@localhost ~]# groupadd oinstall
[root@localhost ~]# groupadd dba
[root@localhost ~]# groupadd oper
[root@localhost ~]# useradd -g oinstall -G dba,oper oracle
[root@localhost ~]# passwd oracle
[root@localhost ~]# su - oracle
[oracle@localhost ~]$ vi .bash_profile
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;
export CLASSPATH
if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
使環(huán)境變量生效
[oracle@localhost ~]$ source .bash_profile
3. 配置本地 yum 源
[root@localhost ~]# umount /dev/cdrom
[root@localhost ~]# mount /dev/cdrom /mnt/
mount: block device /dev/sr0 is write-protected, mounting read-only
[root@localhost ~]# mount -o remount,rw /dev/cdrom /mnt/cdrom
[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost ~]# mv CentOS-Base.repo CentOS-Base.repo.bak
[root@localhost ~]# mv CentOS-Debuginfo.repo CentOS-Debuginfo.repo.bak
[root@localhost ~]# mv CentOS-Vault.repo CentOS-Vault.repo.bak
[root@localhost yum.repos.d]# vi /etc/yum.repos.d/CentOS-Media.repo
[c6-media]
name=CentOS-$releasever - Media
baseurl=file:///mnt/
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
[root@localhost yum.repos.d]# yum clean all
[root@localhost yum.repos.d]# yum list
[root@localhost yum.repos.d]# yum -y install binutils compat-libcap1 compat-libstdc* gcc gcc-c++* glibc glibc-devel ksh libgcc libstdc libaio libaio-devel make elfutils-libelf-devel sysstat
[root@strong ~]# chown -R oracle.oinstall /u01
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。