主機(jī) 1 (主庫) 創(chuàng)新互聯(lián)公司是一家以重慶網(wǎng)站建設(shè)公司、網(wǎng)頁設(shè)計(jì)、品牌設(shè)計(jì)、軟件運(yùn)維、seo優(yōu)化、小程序App開發(fā)等移動(dòng)開發(fā)為一體互聯(lián)網(wǎng)公司。已累計(jì)為生料攪拌車等眾行業(yè)中小客戶提供優(yōu)質(zhì)的互聯(lián)網(wǎng)建站和軟件開發(fā)服務(wù)。 | 主機(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
分享文章:CentOS6.5下搭建oracle11gDataguard(一)-創(chuàng)新互聯(lián)
URL網(wǎng)址:http://jinyejixie.com/article20/egcjo.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站設(shè)計(jì)、云服務(wù)器、企業(yè)建站、網(wǎng)站內(nèi)鏈、網(wǎng)站維護(hù)、面包屑導(dǎo)航
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容