Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Building oracle 11g Dataguard under CentOS6.5 (1)

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

I. Environmental preparation

Host 1 (main library)

Host 2 (standby library)

Operating system

Centos6.5 64 bit

Centos6.5 64 bit

Hostnam

Primary

Standby

IP

192.168.2.11

192.168.2.12

Database software version

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

II. Database installation

1. Basic parameter setting

[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

two。 Create users and groups, set environment variables

[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

Make the environment variable effective

[oracle@localhost ~] $source .bash _ profile

3. Configure a local yum source

[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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report