本篇內(nèi)容主要講解“ASM搭建單實(shí)例分享”,感興趣的朋友不妨來(lái)看看。本文介紹的方法操作簡(jiǎn)單快捷,實(shí)用性強(qiáng)。下面就讓小編來(lái)帶大家學(xué)習(xí)“ASM搭建單實(shí)例分享”吧!
亞?wèn)|ssl適用于網(wǎng)站、小程序/APP、API接口等需要進(jìn)行數(shù)據(jù)傳輸應(yīng)用場(chǎng)景,ssl證書未來(lái)市場(chǎng)廣闊!成為成都創(chuàng)新互聯(lián)的ssl證書銷售渠道,可以享受市場(chǎng)價(jià)格4-6折優(yōu)惠!如果有意向歡迎電話聯(lián)系或者加微信:028-86922220(備注:SSL證書合作)期待與您的合作!
1.修改主機(jī)名
[root@Test_run_CRM soft]# vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
172.16.25.235 Test_run_CRM
2.查看rpm包
查看是否有包:
rpm -qa binutils* compat-libstdc* glibc-2* ksh* libaio* make-3* compat-libcap1* gcc-4* gcc-c* libstdc++-devel* sysstat* glibc-devel* libgcc-4* libstdc++-4* unixODBC-2* unixODBC-devel-2* elfutils-libelf-devel* libXp*
安裝包:
yum -y install binutils* compat-libstdc* glibc-2* ksh* libaio* make-3* compat-libcap1* gcc-4* gcc-c* libstdc++-devel* sysstat* glibc-devel* libgcc-4* libstdc++-4* unixODBC-2* unixODBC-devel-2* elfutils-libelf-devel* libXp*
3.修改系統(tǒng)參數(shù)
1)
[root@Test_run_CRM soft]# vi /etc/sysctl.conf
kernel.msgmnb = 65536
kernel.shmall = 4294967296
fs.file-max = 6815744
kernel.msgmni = 2878
kernel.msgmax = 8192
kernel.msgmnb = 65536
kernel.sem = 250 32000 100 142
kernel.shmmni = 4096
kernel.shmmax = 329853488333
net.core.wmem_default = 262144
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 1048576
fs.aio-max-nr = 3145728
net.ipv4.ip_local_port_range = 9000 65500
vm.min_free_kbytes = 51200
生效:
[root@Test_run_FOSS u01]# sysctl -p
2)[root@Test_run_CRM soft]# vi /etc/pam.d/login
最后一行添加
session required pam_limits.so
3)[root@Test_run_CRM soft]# vi /etc/security/limits.conf
最后添加:
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
4)[root@Test_run_CRM soft]# vi /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
3.創(chuàng)建組和用戶
創(chuàng)建組:
groupadd -g 501 oinstall
groupadd -g 502 dba
groupadd -g 503 oper
groupadd -g 504 asmadmin
groupadd -g 505 asmdba
groupadd -g 506 asmoper
創(chuàng)建用戶:
# useradd -u 501 -g oinstall -G dba,oper,asmadmin,asmdba,asmoper -s /bin/bash grid
# useradd -u 502 -g oinstall -G dba,oper,asmadmin,asmdba,asmoper -s /bin/bash oracle
修改密碼:
passwd oracle
passwd grid
修改路徑權(quán)限:
mkdir -p /u01/app/
chown -R oracle:oinstall /u01/app/
chmod -R 775 /u01/app/
4.修改bash_profile
oracle:
export ORACLE_BASE=/u01/app/oracle
export ORACLE_SID=sfsdb1
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export ORACLE_TERM=xterm
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/lib64:/usr/lib64
export NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
export TNS_ADMIN=$ORACLE_HOME/network/admin
grid:
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/11.2.0/grid
export ORACLE_SID=+ASM
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/lib64:/usr/lib64
export ORACLE_TERM=xterm
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export TNS_ADMIN=$ORACLE_HOME/network/admin
5.使用udev 綁定磁盤
查看存儲(chǔ)磁盤:
1)跟主機(jī)組確定,可使用的1a到1f
[root@Test_run_CRM soft]# ll /dev/mapper/
total 0
lrwxrwxrwx 1 root root 7 May 27 19:58 32ff70002ac012ff4 -> ../dm-7
lrwxrwxrwx 1 root root 7 May 27 15:07 360002ac0000000000000001300012ff4 -> ../dm-0
lrwxrwxrwx 1 root root 7 May 27 15:07 360002ac0000000000000001300012ff4p1 -> ../dm-8
lrwxrwxrwx 1 root root 7 May 27 15:07 360002ac0000000000000001a00012ff4 -> ../dm-5
lrwxrwxrwx 1 root root 7 May 27 15:07 360002ac0000000000000001b00012ff4 -> ../dm-4
lrwxrwxrwx 1 root root 7 May 27 15:07 360002ac0000000000000001c00012ff4 -> ../dm-3
lrwxrwxrwx 1 root root 7 May 27 15:07 360002ac0000000000000001d00012ff4 -> ../dm-2
lrwxrwxrwx 1 root root 7 May 27 15:07 360002ac0000000000000001e00012ff4 -> ../dm-1
lrwxrwxrwx 1 root root 7 May 27 15:07 360002ac0000000000000001f00012ff4 -> ../dm-6
crw-rw---- 1 root root 10, 236 May 27 15:07 control
2)新增udev綁定文件:
[root@Test_run_CRM soft]# vi /etc/udev/rules.d/12-dm-permissions.rules
ENV{DM_NAME}=="360002ac0000000000000001a00012ff4", OWNER:="grid", GROUP:="asmadmin", MODE:="660"
ENV{DM_NAME}=="360002ac0000000000000001b00012ff4", OWNER:="grid", GROUP:="asmadmin", MODE:="660"
ENV{DM_NAME}=="360002ac0000000000000001c00012ff4", OWNER:="grid", GROUP:="asmadmin", MODE:="660"
ENV{DM_NAME}=="360002ac0000000000000001d00012ff4", OWNER:="grid", GROUP:="asmadmin", MODE:="660"
ENV{DM_NAME}=="360002ac0000000000000001e00012ff4", OWNER:="grid", GROUP:="asmadmin", MODE:="660"
ENV{DM_NAME}=="360002ac0000000000000001f00012ff4", OWNER:="grid", GROUP:="asmadmin", MODE:="660"
3)啟動(dòng)UDEV
/sbin/start_udev
4)查看磁盤用戶和組已經(jīng)被修改為grid和asmadmin
[root@Test_run_FOSS u01]# ll /dev/ | grep grid
brw-rw---- 1 grid asmadmin 252, 1 May 27 18:24 dm-1
brw-rw---- 1 grid asmadmin 252, 2 May 27 18:24 dm-2
brw-rw---- 1 grid asmadmin 252, 3 May 27 18:24 dm-3
brw-rw---- 1 grid asmadmin 252, 4 May 27 18:24 dm-4
brw-rw---- 1 grid asmadmin 252, 5 May 27 18:24 dm-5
brw-rw---- 1 grid asmadmin 252, 6 May 27 18:24 dm-6
6.解壓文件
[root@Test_run_CRM soft]# unzip p13390677_112040_Linux-x86-64_1of7.zip
[root@Test_run_CRM soft]# unzip p13390677_112040_Linux-x86-64_2of7.zip
[root@Test_run_CRM soft]# unzip p13390677_112040_Linux-x86-64_3of7.zip
修改其權(quán)限:
[root@Test_run_CRM soft]# chown -R oracle:oinstall database/
[root@Test_run_CRM soft]# chown -R grid:oinstall grid/
7.安裝grid軟件
[root@Test_run_CRM soft]# su - grid
[grid@Test_run_CRM ~]$ cd /u01/soft/grid/
[grid@Test_run_CRM grid]$ xhost
access control disabled, clients can connect from any host
INET:10.253.1.13
[grid@Test_run_CRM grid]$
[grid@Test_run_CRM grid]$
[grid@Test_run_CRM grid]$ export DISPLAY=10.253.1.13:110.0
[grid@Test_run_CRM grid]$ ./runInstaller
默認(rèn):
8.安裝Oracle軟件:
[root@Test_run_CRM soft]# su - oracle
[oracle@Test_run_CRM database]$ pwd
/u01/soft/database
[oracle@Test_run_CRM database]$ ./runInstaller
9.新建DB:
采用asm磁盤
不開(kāi)歸檔
指定SGA+PGA:
指定字符集:
到此,相信大家對(duì)“ASM搭建單實(shí)例分享”有了更深的了解,不妨來(lái)實(shí)際操作一番吧!這里是創(chuàng)新互聯(lián)網(wǎng)站,更多相關(guān)內(nèi)容可以進(jìn)入相關(guān)頻道進(jìn)行查詢,關(guān)注我們,繼續(xù)學(xué)習(xí)!