Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Rac12r2 Sol11.4 Install

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 8

1/ OS

vi /etc/ssh/sshd_config
LoginGraceTime 0
-- Restart
svcadm restart ssh
-- /etc/hosts
::1 localhost
127.0.0.1 localhost loghost
192.168.197.131 rac1.oracle.com rac1
192.168.197.132 rac2.oracle.com rac2
192.168.197.133 rac3.oracle.com rac3
192.168.42.131 rac1-priv.oracle.com rac1-priv
192.168.42.132 rac2-priv.oracle.com rac2-priv
192.168.42.133 rac3-priv.oracle.com rac3-priv
192.168.197.231 rac-scan.oracle.com rac-scan
192.168.197.232 rac-scan.oracle.com rac-scan
192.168.197.233 rac-scan.oracle.com rac-scan
2/ Kiem tra vung swap va memory
/*RAM Swap Space
Between 1 GB and 2 GB 1.5 times the size of RAM
Between 2 GB and 16 GB Equal to the size of RAM
More than 16 GB 16 GB */
-- Kiem tra
root@rac1:~# swap -lh
swapfile dev swaplo blocks free
/dev/zvol/dsk/rpool/swap 231,1 4K 12G 12G
-- Neu thieu thi them
--swap
zfs set volsize=12g rpool/swap
-- RAM
/usr/sbin/prtconf | grep "Memory size"
3/ Install package tren 2 node
pkg install oracle-rdbms-server-12-1-preinstall
-- verify
pkg contents -ro type,fmri -t depend oracle-rdbms-server-12-1-preinstall
--
pkginfo -i SUNWarc SUNWbtool SUNWcsl SUNWhea SUNWlibC SUNWlibm UNWlibms UNWsprot
SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt

pkg install UNWlibms


pkg install UNWsprot
pkg install SUNWi1of
pkg install SUNWi1cs
pkg install SUNWi15cs
pkg install SUNWxwfnt
--
userdel -r oracle
groupdel oinstall
groupdel dba
groupdel oper
4/ Tao group
groupadd -g 1000 oinstall
groupadd -g 1020 asmadmin
groupadd -g 1021 asmdba
groupadd -g 1022 asmoper
groupadd -g 1031 dba
groupadd -g 1032 oper
groupadd -g 1033 racdba
5/ Tao user
useradd -u 1100 -g oinstall -G dba,asmadmin,asmdba,asmoper,racdba,oper -m -d
/export/home/grid grid
useradd -u 1101 -g oinstall -G dba,asmadmin,asmdba,racdba,oper -m -d
/export/home/oracle oracle
-- Kiem tra
id -a grid
6/ Set pass cho grid va oracle
passwd grid
passwd oracle
7/ Tao thu muc
mkdir -p /u01/app/oraInventory
chown -R grid:oinstall /u01/app/oraInventory
chmod -R 775 /u01/app/oraInventory

--Grid Infrastructure home directory


mkdir -p /u01/app/12.2.0.1/grid
chown -R grid:oinstall /u01/app/12.2.0.1/grid
chmod -R 775 /u01/app/12.2.0.1/grid
mkdir -p /u01/app/grid
chown -R grid:oinstall /u01/app/grid
chmod -R 775 /u01/app/grid

--Oracle Base directory


mkdir -p /u01/app/oracle
mkdir -p /u01/app/oracle/cfgtoollogs
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/app/oracle

-- Oracle RDBMS Home directory


mkdir -p /u01/app/oracle/product/12.2.0.1/dbhome_1
chown -R oracle:oinstall /u01/app/oracle/product/12.2.0.1/dbhome_1
chmod -R 775 /u01/app/oracle/product/12.2.0.1/dbhome_1
8/ Disable Firewall, autofs
svcadm disable ipfilter
svcadm disable autofs
svcadm disable ntp
9/ Setting Network Time Protocol for Cluster Time Synchronization
# /usr/sbin/svccfg -s svc:/network/ntp:default setprop config/slew_always = true
# /usr/sbin/svcadm refresh svc:/network/ntp:default
# /usr/sbin/svcadm enable ntp
cd /etc/inet
cp ntp.client ntp.conf
chmod +x ntp.conf
vi /etc/inet/ntp.conf
server 10.88.3.200
server 10.88.1.254
/usr/sbin/svcadm enable ntp
/usr/sbin/svcadm restart ntp
ntpq -p
--
10/UDP and TCP Kernel Parameters (2 node)
ipadm show-prop -p smallest_anon_port,largest_anon_port tcp
--
/usr/sbin/ndd /dev/tcp tcp_smallest_anon_port tcp_largest_anon_port
/usr/sbin/ndd /dev/udp udp_smallest_anon_port udp_largest_anon_port
ipadm set-prop -p smallest_anon_port=9000 tcp
ipadm set-prop -p largest_anon_port=65500 tcp
ipadm set-prop -p smallest_anon_port=9000 udp
ipadm set-prop -p largest_anon_port=65500 udp
ipadm set-prop -p send_buf=65536 udp
ipadm set-prop -p recv_buf=65536 udp
ipadm set-prop -p largest_anon_port=65500 udp
--
ipadm set-prop -p smallest_anon_port=9000 tcp
ipadm set-prop -p smallest_anon_port=9000 udp
ipadm set-prop -p send_buf=65536 udp
ipadm set-prop -p recv_buf=65536 udp
-- oracle doc
ipadm set-prop -p smallest_anon_port=9000 tcp
ipadm set-prop -p largest_anon_port=65500 tcp
ipadm set-prop -p smallest_anon_port=9000 udp
ipadm set-prop -p largest_anon_port=65500 udp
--
11/ grid profile
umask 022
TMP=/tmp; export TMP
TMPDIR=/tmp; export TMPDIR
TEMPDIR=/tmp; export TEMPDIR
TEMP=/tmp; export TEMP
ORACLE_HOME=/u01/app/12.2.0.1/grid;export ORACLE_HOME
ORACLE_BASE=/u01/app/grid;export ORACLE_BASE
ORACLE_SID=+ASM1; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
# NLS_LANG=AMERICAN_AMERICA.AL32UTF8; export NLS_LANG
TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH
LIBPATH=$LD_LIBRARY_PATH; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jdk:$ORACLE_HOME/jdk/jre/bin:$ORACLE_HOME/jlib:
$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/jdbc/lib; export CLASSPATH
ulimit -t unlimited
ulimit -f unlimited
ulimit -d unlimited
ulimit -s unlimited
ulimit -n 65536
ulimit -v unlimited
-- rac2
umask 022
TMP=/tmp; export TMP
TMPDIR=/tmp; export TMPDIR
TEMPDIR=/tmp; export TEMPDIR
TEMP=/tmp; export TEMP
ORACLE_HOME=/u01/app/12.2.0.1/grid;export ORACLE_HOME
ORACLE_BASE=/u01/app/grid;export ORACLE_BASE
ORACLE_SID=+ASM2; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
# NLS_LANG=AMERICAN_AMERICA.AL32UTF8; export NLS_LANG
TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH
LIBPATH=$LD_LIBRARY_PATH; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jdk:$ORACLE_HOME/jdk/jre/bin:$ORACLE_HOME/jlib:
$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/jdbc/lib; export CLASSPATH
ulimit -t unlimited
ulimit -f unlimited
ulimit -d unlimited
ulimit -s unlimited
ulimit -n 65536
ulimit -v unlimited
--oracle
umask 022
TMP=/tmp; export TMP
TMPDIR=/tmp; export TMPDIR
TEMPDIR=/tmp; export TEMPDIR
TEMP=/tmp; export TEMP
ORACLE_HOME=/u01/app/oracle/product/12.2.0.1/dbhome_1;export ORACLE_HOME
ORACLE_BASE=/u01/app/oracle;export ORACLE_BASE
ORACLE_SID=DOFSPC1; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
# NLS_LANG=AMERICAN_AMERICA.AL32UTF8; export NLS_LANG
TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH
LIBPATH=$LD_LIBRARY_PATH; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jdk:$ORACLE_HOME/jdk/jre/bin:$ORACLE_HOME/jlib:
$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/jdbc/lib; export CLASSPATH
-- rac2
umask 022
TMP=/tmp; export TMP
TMPDIR=/tmp; export TMPDIR
TEMPDIR=/tmp; export TEMPDIR
TEMP=/tmp; export TEMP
ORACLE_HOME=/u01/app/oracle/product/12.2.0.1/dbhome_1;export ORACLE_HOME
ORACLE_BASE=/u01/app/oracle;export ORACLE_BASE
ORACLE_SID=DOFSPC2; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
# NLS_LANG=AMERICAN_AMERICA.AL32UTF8; export NLS_LANG
TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH
LIBPATH=$LD_LIBRARY_PATH; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jdk:$ORACLE_HOME/jdk/jre/bin:$ORACLE_HOME/jlib:
$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/jdbc/lib; export CLASSPATH

12/ Resource limit


-- Tinh SHMMAX
RAM_MB=`prtconf |grep Memory|awk '{print $3 }'`
SHMMAX=`expr $RAM_MB \* 1024 \* 1024 \* 70 / 100`
echo $SHMMAX
--
projadd -U grid -K "project.max-shm-memory=(priv,6g,deny)" user.grid
projmod -sK "project.max-sem-nsems=(priv,512,deny)" user.grid
projmod -sK "project.max-sem-ids=(priv,256,deny)" user.grid
projmod -sK "project.max-shm-ids=(priv,256,deny)" user.grid
projmod -sK "project.max-shm-memory=(priv,6g,deny)" user.grid
projadd -U oracle -K "project.max-shm-memory=(priv,6g,deny)" user.oracle
projmod -sK "project.max-sem-nsems=(priv,512,deny)" user.oracle
projmod -sK "project.max-sem-ids=(priv,256,deny)" user.oracle
projmod -sK "project.max-shm-ids=(priv,256,deny)" user.oracle
projmod -sK "project.max-shm-memory=(priv,6g,deny)" user.oracle
/usr/sbin/projmod -sK "process.max-file-descriptor=(priv,65536,deny)" user.oracle
/usr/sbin/projmod -sK "process.max-file-descriptor=(priv,65536,deny)" user.grid
--
projects -l user.grid
projects -l user.oracle
--
echo "set max_nprocs = 65536" >> /etc/system
echo "set user_reserve_hint_pct = 70" >> /etc/system
-- Reboot
-- Kiem tra
root@rac1:~# su - grid
Oracle Corporation SunOS 5.11 11.4 Aug 2018
grid@rac1:~$ id -p
uid=1100(grid) gid=1000(oinstall) projid=102(user.grid)
13/ Chuan bi disk asm
root@rac1:~# echo | format
Searching for disks...done

AVAILABLE DISK SELECTIONS:


0. c7t0d0 <ATA-VBOX HARDDISK-1.0-160.00GB>
/pci@0,0/pci8086,2829@d/disk@0,0
1. c7t2d0 <ATA-VBOX HARDDISK-1.0 cyl 1303 alt 2 hd 255 sec 63>
/pci@0,0/pci8086,2829@d/disk@2,0
Specify disk (enter its number): Specify disk (enter its number):
# id
uid=0(root) gid=0(root)
root@rac1:~# format
Searching for disks...done

AVAILABLE DISK SELECTIONS:


0. c1t0d0 <VBOX-HARDDISK-1.0-160.00GB>
/pci@0,0/pci8086,2829@d/disk@0,0
1. c1t2d0 <VBOX-HARDDISK-1.0-50.00GB>
/pci@0,0/pci8086,2829@d/disk@2,0
Specify disk (enter its number): 1
selecting c1t2d0 <ATA-VBOX HARDDISK-1.0 cyl 6524 alt 2 hd 255 sec 63>
[disk formatted]

FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
fdisk - run the fdisk program
repair - repair a defective sector
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
inquiry - show disk ID
volname - set 8-character volume name
!<cmd> - execute <cmd>, then return
quit
format> current
Current Disk = c1t2d0
<ATA-VBOX HARDDISK-1.0 cyl 6524 alt 2 hd 255 sec 63>
/pci@0,0/pci8086,2829@d/disk@2,0

format> fdisk
No fdisk table exists. The default partition for the disk is:

a 100% "SOLARIS System" partition

Type "y" to accept the default partition, otherwise type "n" to edit the
partition table.
y

format> partition

PARTITION MENU:
0 - change `0' partition
1 - change `1' partition
2 - change `2' partition
3 - change `3' partition
4 - change `4' partition
5 - change `5' partition
6 - change `6' partition
7 - change `7' partition
select - select a predefined table
modify - modify a predefined partition table
name - name the current table
print - display the current table
label - write partition map and label to the disk
!<cmd> - execute <cmd>, then return
quit
partition> print
Current partition table (original):
Total disk cylinders available: 6524 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks


0 unassigned wm 0 0 (0/0/0) 0
1 unassigned wm 0 0 (0/0/0) 0
2 backup wu 0 - 6523 49.98GB (6524/0/0) 104808060
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
8 boot wu 0 - 0 7.84MB (1/0/0) 16065
9 unassigned wm 0 0 (0/0/0) 0

partition> 6
Part Tag Flag Cylinders Size Blocks
6 unassigned wm 0 0 (0/0/0) 0

Enter partition id tag[unassigned]: usr


Enter partition permission flags[wm]:
Enter new starting cyl[1]: 3
Enter partition size[0b, 0c, 3e, 0.00mb, 0.00gb, 0.00tb]: 6521c

partition> print
Current partition table (unnamed):
Total disk cylinders available: 6524 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 0 (0/0/0) 0
1 unassigned wm 0 0 (0/0/0) 0
2 backup wu 0 - 6523 49.98GB (6524/0/0) 104808060
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 usr wm 3 - 6523 49.95GB (6521/0/0) 104759865
7 unassigned wm 0 0 (0/0/0) 0
8 boot wu 0 - 0 7.84MB (1/0/0) 16065
9 unassigned wm 0 0 (0/0/0) 0

partition> label
Ready to label disk, continue? y

partition> quit

FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
fdisk - run the fdisk program
repair - repair a defective sector
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
inquiry - show disk ID
volname - set 8-character volume name
!<cmd> - execute <cmd>, then return
quit
format> quit
--
root@rac1:~# ls -lrt /dev/rdsk/c1t2d0s6
lrwxrwxrwx 1 root root 51 Mar 18 08:14 /dev/rdsk/c1t2d0s6 ->
../../devices/pci@0,0/pci8086,2829@d/disk@2,0:g,raw
ls -lLh /dev/rdsk/c1t2d0s6
chmod 660 /dev/rdsk/c1t2d0s6
chown -R grid:asmadmin /dev/rdsk/c1t2d0s6
--
root@rac1:~# ls -lLh /dev/rdsk/c1t2d0s6
crw-rw---- 1 grid asmadmin 168, 134 Mar 18 09:37 /dev/rdsk/c1t2d0s6
14/ Check
/u01/app/12.2.0.1/grid/runInstaller
grid@rac1:/u01/app/12.2.0.1/grid$ ./runcluvfy.sh stage -pre crsinst -n rac1,rac2 -
verbose
-- patch
unzip -d /u01/app/12.2.0/grid p6880880_210000_Solaris86-64.zip
grid@rac1:/u01/app/12.2.0/grid$ ./gridSetup.sh -applyPSU /export/home/grid/33583921
./gridSetup.sh -applyOneOffs /export/home/grid/33583921/26839277
./gridSetup.sh -applyOneOffs /export/home/grid/33583921/33587128
./gridSetup.sh -applyOneOffs /export/home/grid/33583921/33678030
./gridSetup.sh -applyOneOffs /export/home/grid/33583921/33116894
./gridSetup.sh -applyOneOffs /export/home/grid/33583921/33610989
-- VNC viewer
root@rac2:~# vncserver :1

You will require a password to access your desktops.

Password:
Verify:
xauth: file /root/.Xauthority does not exist

New 'rac2.oracle.com:1 ()' desktop is rac2.oracle.com:1

Creating default startup script /root/.vnc/xstartup


Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/rac2.oracle.com:1.log

root@rac2:~# export DISPLAY=local_host:0.0

-- client
192.168.197.132:1

You might also like