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

Build the DG machine configuration of 11gR2 rac+dg step by step (7)

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

DG machine configuration

The document structure of this article:

The configuration of the DG machine in this step is the same as installing the DB+ASM of a single instance. Here, I copy the contents of the previous document directly, and I don't explain too much.

The configuration work before installation checks the hardware

Before the formal installation begins, please check whether your hardware and software conditions meet the installation needs.

On hardware, you can use commands to view memory and CPU features:

# more / proc/meminfo

# more / proc/cpuinfo

The requirement of memory is not less than 1G.

The following is not required and is optional to use

# df-k / dev/shm check shared memory

# df-k / tmp check temporary disk space

# more / proc/version check operating system version

# uname-r check the kernel version

Memory

# grep MemTotal / proc/meminfo

Swap space

# grep SwapTotal / proc/meminfo

Disk space

# df-ah

# free

# free-m

Install package check

It can be checked uniformly:

Rpm-Q binutils\

Compat-libstdc++-33\

Elfutils-libelf\

Gcc\

Gcc-c++\

Glibc\

Glibc-common\

Glibc-devel\

Glibc-headers\

Ksh\

Libaio\

Libaio-devel\

Libgomp\

Libgcc\

Libstdc++\

Libstdc++-devel\

Make\

Sysstat\

UnixODBC\

UnixODBC-devel\

Numactl-devel

We can see that packages that have not been installed have is not installed:

[root@rhel6_lhr ~] # rpm-Q binutils\

> compat-libstdc++-33\

> elfutils-libelf\

> gcc\

> gcc-c++\

> glibc\

> glibc-common\

> glibc-devel\

> glibc-headers\

> ksh\

> libaio\

> libaio-devel\

> libgomp\

> libgcc\

> libstdc++\

> libstdc++-devel\

> make\

> sysstat\

> unixODBC\

> unixODBC-devel\

> numactl-devel

Binutils-2.20.51.0.2-5.36.el6.x86_64

Compat-libstdc++-33-3.2.3-69.el6.x86_64

Compat-libstdc++-33-3.2.3-69.el6.i686

Elfutils-libelf-0.152-1.el6.x86_64

Gcc-4.4.7-4.el6.x86_64

Gcc-c++-4.4.7-4.el6.x86_64

Glibc-2.12-1.132.el6.x86_64

Glibc-common-2.12-1.132.el6.x86_64

Glibc-devel-2.12-1.132.el6.x86_64

Glibc-headers-2.12-1.132.el6.x86_64

Package ksh is not installed

Libaio-0.3.107-10.el6.x86_64

Libaio-devel-0.3.107-10.el6.x86_64

Libaio-devel-0.3.107-10.el6.i686

Libgomp-4.4.7-4.el6.x86_64

Libgcc-4.4.7-4.el6.x86_64

Libstdc++-4.4.7-4.el6.x86_64

Libstdc++-devel-4.4.7-4.el6.x86_64

Libstdc++-devel-4.4.7-4.el6.i686

Make-3.81-20.el6.x86_64

Sysstat-9.0.4-22.el6.x86_64

UnixODBC-2.2.14-12.el6_3.x86_64

UnixODBC-2.2.14-12.el6_3.i686

UnixODBC-devel-2.2.14-12.el6_3.i686

UnixODBC-devel-2.2.14-12.el6_3.x86_64

Package numactl-devel is not installed

[root@rhel6_lhr ~] #

If some packages do not exist

You can update the installation in batches, but if the dependency is missing, you may need to perform it twice more

Or adjust it manually.

Modify hostname

Permanent effect:

[root@zijuan /] # vim / etc/sysconfig/network

NETWORKING=yes

NETWORKING_IPV6=yes

HOSTNAME=dg

Note: after modifying the hostname, it will take effect after you restart the system, or switch to a user and then switch back to OK.

View / etc/hosts file must contain a fully qualified name for the server

[root@localhost lhr] # cat / etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

:: 1 localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.59.140 dg

[root@localhost lhr] # hostname dg

[root@localhost lhr] # hostname

Dg

Disk preparation

To save space here, we use the dd command to faking 5 bare device disks

1 hard disk to install the operating system

234 blocks are used to store data in ASM.

5 hard drives are used to store FRA

-directly post the script and execute it under the root user

Mkdir / asmdisk

Dd if=/dev/zero of=/asmdisk/disk1 bs=1024k count=2000

Dd if=/dev/zero of=/asmdisk/disk2 bs=1024k count=2000

Dd if=/dev/zero of=/asmdisk/disk3 bs=1024k count=2000

Dd if=/dev/zero of=/asmdisk/disk4 bs=1024k count=2000

Dd if=/dev/zero of=/asmdisk/disk5 bs=1024k count=2000

/ sbin/losetup / dev/loop1 / asmdisk/disk1

/ sbin/losetup / dev/loop2 / asmdisk/disk2

/ sbin/losetup / dev/loop3 / asmdisk/disk3

/ sbin/losetup / dev/loop4 / asmdisk/disk4

/ sbin/losetup / dev/loop5 / asmdisk/disk5

Raw/ dev/raw/raw1 / dev/loop1

Raw/ dev/raw/raw2 / dev/loop2

Raw/ dev/raw/raw3 / dev/loop3

Raw/ dev/raw/raw4 / dev/loop4

Raw/ dev/raw/raw5 / dev/loop5

Chmod 660 / dev/raw/raw1

Chmod 660 / dev/raw/raw2

Chmod 660 / dev/raw/raw3

Chmod 660 / dev/raw/raw4

Chmod 660 / dev/raw/raw5

Chown oracle:dba / dev/raw/raw1

Chown oracle:dba / dev/raw/raw2

Chown oracle:dba / dev/raw/raw3

Chown oracle:dba / dev/raw/raw4

Chown oracle:dba / dev/raw/raw5

-add the following to the file / etc/rc.local file

-Add the following entries to the file "/ etc/rc.local"

/ sbin/losetup / dev/loop1 / asmdisk/disk1

/ sbin/losetup / dev/loop2 / asmdisk/disk2

/ sbin/losetup / dev/loop3 / asmdisk/disk3

/ sbin/losetup / dev/loop4 / asmdisk/disk4

/ sbin/losetup / dev/loop5 / asmdisk/disk5

Raw/ dev/raw/raw1 / dev/loop1

Raw/ dev/raw/raw2 / dev/loop2

Raw/ dev/raw/raw3 / dev/loop3

Raw/ dev/raw/raw4 / dev/loop4

Raw/ dev/raw/raw5 / dev/loop5

Chmod 660 / dev/raw/raw1

Chmod 660 / dev/raw/raw2

Chmod 660 / dev/raw/raw3

Chmod 660 / dev/raw/raw4

Chmod 660 / dev/raw/raw5

Chown oracle:dba / dev/raw/raw1

Chown oracle:dba / dev/raw/raw2

Chown oracle:dba / dev/raw/raw3

Chown oracle:dba / dev/raw/raw4

Chown oracle:dba / dev/raw/raw5

If you need to delete, delete the command:

Losetup-d / dev/loop1

Losetup-d / dev/loop1

.

View the results:

[root@dg ~] # ll / dev/raw/raw*

Crw-rw---- 1 oracle dba 162, 1 Oct 9 16:35 / dev/raw/raw1

Crw-rw---- 1 oracle dba 162, 2 Oct 9 16:35 / dev/raw/raw2

Crw-rw---- 1 oracle dba 162, 3 Oct 9 16:35 / dev/raw/raw3

Crw-rw---- 1 oracle dba 162, 4 Oct 9 16:35 / dev/raw/raw4

Crw-rw---- 1 oracle dba 162, 5 Oct 9 16:35 / dev/raw/raw5

Crw-rw---- 1 root disk 162, 0 Oct 5 15:42 / dev/raw/rawctl

[root@dg ~] #

For more information, please refer to:

E:\ cloud disk\ data disk\ Li Huarong (personal finishing)\ oracle-linux\ asmdisk_ create asm disk .sql

Configure directories, users, etc., configure users and user groups

Use the / usr/sbin/groupadd command

-what Oracle users may have installed here has no effect:

Code:

Groupadd oinstall

Groupadd dba

Groupadd oper

Groupadd asmadmin

Groupadd asmoper

Groupadd asmdba

-- add users to the group

Useradd-g oinstall-G dba,asmdba,oper,asmadmin oracle

Useradd-g oinstall-G asmadmin,asmdba,asmoper,dba grid

-- change the password

Passwd oracle

Passwd grid

Echo oracle | passwd-- stdin lhr

Echo grid | passwd-- stdin lhr

-check the owner

[root@rhel_linux_asm ~] # id oracle

Uid=501 (oracle) gid=502 (dba) groups=502 (dba), 501,504 (asmadmin), 506 (asmdba)

[root@rhel_linux_asm ~] # id grid

Uid=502 (grid) gid=501 (oinstall) groups=501 (oinstall), 502,504 (asmadmin), 505 (asmoper), 506 (asmdba)

[root@rhel_linux_asm ~] #

Create directories and configure profiles for grid and oracle users

Code:

-- under root users:

Mkdir-p / u01/app/oracle

Mkdir-p / u01/app/grid

Mkdir-p / u01/app/11.2.0/grid

Chown-R grid:oinstall / u01/app/grid

Chown-R grid:oinstall / u01/app/11.2.0/grid

Chown-R oracle:oinstall / u01/app/oracle

Chmod-R 775 / U01

Mkdir-p / u01/app/oraInventory

Chown-R grid:oinstall / u01/app/oraInventory

Chmod-R 775 / u01/app/oraInventory

-Oracle User---- switches to Oracle users-

[root@rhel_linux_asm ~] # su-oracle

[grid@rhel_linux_asm] $vi ~ / .bash_profile

Export ORACLE_SID=phydb

Export ORACLE_BASE=/u01/app/oracle

Export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1

Export LD_LIBRARY_PATH=$ORACLE_HOME/lib

Export NLS_DATE_FORMAT= "yyyy-mm-dd HH24:MI:SS"

Export TMP=/tmp

Export TMPDIR=$TMP

Export PATH=$PATH:$ORACLE_HOME/bin

Export GLOBAL_DB_UNIQUE_NAME=phydb

Export ORACLE_HOSTNAME=192.168.59.140

Export ORACLE_UNQNAME=phydb

Export ORACLE_ALERT=$ORACLE_BASE/diag/rdbms/$ORACLE_UNQNAME/$ORACLE_SID/trace

Alias sqlplus='rlwrap sqlplus'

Alias rman='rlwrap rman'

Alias asmcmd='rlwrap asmcmd'

Alias alert_log='tail-200f $ORACLE_ALERT/alert_$ORACLE_SID.log'

Alias alert_listener='tail-200f $ORACLE_BASE/diag/tnslsnr/rhel6/listener/trace/listener.log'

-Grid User- switches to grid users-

Cd / home/grid

Vim .bash _ profile

Export ORACLE_SID=+ASM

Export ORACLE_BASE=/u01/app/grid

Export ORACLE_HOME=/u01/app/11.2.0/grid

Export LD_LIBRARY_PATH=$ORACLE_HOME/lib

Export NLS_DATE_FORMAT= "yyyy-mm-dd HH24:MI:SS"

Export PATH=$ORACLE_HOME/bin:$PATH

Alias sqlplus='rlwrap sqlplus'

Alias asmcmd='rlwrap asmcmd'

Alias alert_log='tail-200f $ORACLE_BASE/diag/asm/+asm/$ORACLE_SID/trace/alert_$ORACLE_SID.log'

Execute source .bash _ profile to make the settings take effect after the modification is completed

Modify the system kernel parameters and edit the / etc/security/limits.conf file, adding the following at the end of the file:

[root@localhost] # tail-8 / etc/security/limits.conf

# add by lhr for oracle and grid on 2014-05-02

Oracle soft nproc 2047

Oracle hard nproc 16384

Oracle soft nofile 1024

Oracle hard nofile 65536

Grid soft nproc 2047

Grid hard nproc 16384

Grid soft nofile 1024

Grid hard nofile 65536

Edit the / etc/pam.d/login file and add the following at the end of the file:

[root@localhost] # tail-1 / etc/pam.d/login

Session required pam_limis.so

[root@localhost ~] #

Edit the / etc/profile file, set the shell limit, and add the following at the end of the file:

[root@localhost] # tail-9 / etc/profile

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

/ etc/sysctl.conf

Configuring Kernel Parameters for Linux

Vim / etc/sysctl.conf

Fs.aio-max-nr = 1048576

Fs.file-max = 6815744

Kernel.shmall = 2097152

Kernel.shmmax = 4294967295

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

Take effect

# / sbin/sysctl-p

Prepare the library to install grid software

Install GridInfrastructure:

Create an ASM disk group

Execute root script

[root@dg 11.2.0] # / u01/app/oraInventory/orainstRoot.sh

Changing permissions of / u01/app/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions for world.

Changing groupname of / u01/app/oraInventory to oinstall.

The execution of the script is complete.

[root@dg 11.2.0] # / u01/app/11.2.0/grid/root.sh

Performing root user operation for Oracle 11g

The following environment variables are set as:

ORACLE_OWNER= grid

ORACLE_HOME= / u01/app/11.2.0/grid

Enter the full pathname of the local bin directory: [/ usr/local/bin]:

The contents of "dbhome" have not changed. No need to overwrite.

The file "oraenv" already exists in / usr/local/bin. Overwrite it? (YBO)

[n]:

The file "coraenv" already exists in / usr/local/bin. Overwrite it? (YBO)

[n]:

Creating / etc/oratab file...

Entries will be added to the / etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root script.

Now product-specific root actions will be performed.

Using configuration parameter file: / u01/app/11.2.0/grid/crs/install/crsconfig_params

Creating trace directory

LOCAL ADD MODE

Creating OCR keys for user 'grid', privgrp' oinstall'..

Operation successful.

LOCAL ONLY MODE

Successfully accumulated necessary OCR keys.

Creating OCR keys for user 'root', privgrp' root'..

Operation successful.

CRS-4664: Node dg successfully pinned.

Adding Clusterware entries to upstart

Dg 2014-10-02 22:59:43 / u01/app/11.2.0/grid/cdata/dg/backup_20141002_225943.olr

Successfully configured Oracle Grid Infrastructure for a Standalone Server

[root@dg 11.2.0] #

Install oracle softwar

① logs in to the graphical interface as an oracle user and executes / home/oracle/database/runInsta

[root@dg ~] # / u01/app/oracle/product/11.2.0/dbhome_1/root.sh

Performing root user operation for Oracle 11g

The following environment variables are set as:

ORACLE_OWNER= oracle

ORACLE_HOME= / u01/app/oracle/product/11.2.0/dbhome_1

Enter the full pathname of the local bin directory: [/ usr/local/bin]:

The contents of "dbhome" have not changed. No need to overwrite.

The file "oraenv" already exists in / usr/local/bin. Overwrite it? (YBO)

[n]:

The file "coraenv" already exists in / usr/local/bin. Overwrite it? (YBO)

[n]:

Entries will be added to the / etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root script.

Now product-specific root actions will be performed.

Finished product-specific root actions.

[root@dg ~] #

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