rac+CentOS48Word文档下载推荐.docx
- 文档编号:16660215
- 上传时间:2022-11-25
- 格式:DOCX
- 页数:15
- 大小:49.93KB
rac+CentOS48Word文档下载推荐.docx
《rac+CentOS48Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《rac+CentOS48Word文档下载推荐.docx(15页珍藏版)》请在冰豆网上搜索。
rpm-qa|grepgcc
rpm-ivhopenmotif21-2.1.3.......rpm
vi/etc/hosts
增加以下信息:
#public
172.30.0.77
rac1
172.30.0.78
rac2
#private
172.30.1.77
rac1-rac1-priv
172.30.1.78
rac2-rac2-priv
#Virtual
172.30.2.77
rac1-
rac1-vip
172.30.2.79
rac2-
rac2-vip
vi/etc/sysctl.conf
增加内核参数
kernel.shmall=2097152
kernel.shmmax=2147483648
kernel.shmmni=4096
#semaphores:
semmsl,semmns,semopm,semmni
kernel.sem=25032000100128
fs.file-max=65536
net.ipv4.ip_local_port_range=102465000
/sbin/sysctl-p
内核参数生效
vi/etc/security/limits.conf
*softnproc2047
*hardnproc16384
*softnofile1024
*hardnofile65536
vi/etc/pam.d/login
essionrequired
/lib/security/pam_limits.so
cat/etc/selinux/config
SELINUX=disable
serviceiptablesstatus
防火墙是否关闭
vi/etc/modprobe.conf
optionshangcheck-timer
hangcheck_tick=30
hangcheck_margin=180
modprobe
-vhangcheck-timer
groupaddoinstall
groupadddba
useradd-goinstallGdba
oracle
passwdoracle
mkdir-p/oracle/product/10.2.0/crs
mkdir-p/oracle/product/10.2.0/asm
mkdir-p/oracle/product/10.2.0/db_1
chown-Roracle:
oinstall/oracle
ls-l
rshon
rloginon
servicexinetd
reload
su-oracle
vi.bash_profile
#OracleSettings
exportPS1="
‘/bin/hostname–s’->
"
exportEDITOR=vi
exportTMP=/tmp
exportTMPDID=$TMP
exportORACLE_BASE=/oracle
export
ASM_HOME=/oracle/product/10.2.0/asm
export
ORACLE_CRS_HOME=/oracle/product/10.2.0/crs
exportORACLE_HOME=/oracle/product/10.2.0/db_1
ORACLE_SID=orcl1
PATH=$ORACLE_HOEM/bin:
$ORACLE_CRS_HOME/bin:
/usr/sbin:
$PATH
exportLD_LIBRARY_PATH=$ORACLE_HOME/bin:
/lib:
/usr/slib:
$PATH
exportCLASSPATH=$ORACLE_HOME/JRE:
$ORACLE_HOME/jlib:
$ORACLE_HOME/rdbms/jlib
aliassqlplus="
rlwrapsqlplus"
aliasrman="
rlwraprman"
sttyerase^H
umask
022
if[$USER="
oracle"
];
then
if[$SHELL="
/bin/ksh"
ulimit-p16384
ulimit-n65536
else
ulimit-u16384-n65536
fi
fi
source.bash_profile
关机:
su-
init0
修改虚拟机的vmx文件
disk.locking="
FALSE"
diskLib.dataCacheMaxSize="
0"
scsi1.sharedBus="
virtual"
scsi1:
0.mode的下面一行
0.deviceType="
disk"
1.deviceType="
2.deviceType="
3.deviceType="
4.deviceType="
5.deviceType="
rac1目录下的内容,复制一份到rac2目录,然后同时打开rac1,rac2
对rac2进行适当的修改,网卡,机器名
配置时间服务器
rac1
#
chkconfigntpdon
servicentpdstatus
servicentpdstart
rac2
启动xmanagerpassive
exportDISPLAY=172.30.0.32:
0.0
system-config-date
设置rac1为时间服务器
EnableNetWorkTimeProtocol
先上
server172.30.0.77
vi/etc/rc.local
while[1];
dontpdaterac11>
/dev/null2>
&
1;
sleep2;
done&
建立ssh有效性
mkdir~/.ssh
chmod700~/.ssh
ssh-keygen-trsa
ssh-keygen-tdsa
cat~/.ssh/id_rsa.pub>
>
~/.ssh/authorized_keys
cat~/.ssh/id_dsa.pub>
sshrac2cat~/.ssh/id_rsa.pub>
sshrac2cat~/.ssh/id_dsa.pub>
scp~/.ssh/authorized_keysrac2:
~/.ssh/authorized_keys
测试SSH等效性:
sshrac1date
sshrac2date
sshdate
sshrac1-privdate
sshrac2-privdate
sshrac1-date
sshrac2-date
ssh
rac2ntpd关闭
servicentpdstop
---******************备份***********************************
exec/usr/bin/ssh-agent$SHELL
/usr/bin/ssh-add
rac2
配置裸设备服务,oracle用户要有权限
修改裸设备配置文件
vi/etc/sysconfig/rawdevices
#两个512M的磁盘
/dev/raw/raw1/dev/sdb1
/dev/raw/raw2/dev/sdc1
配置权限
vi/etc/udev/permissions.d/50-udev.permisssions
#rawdevices
#raw/*:
root.:
disk:
0660
raw/*:
oracle:
dba:
0660
chkconfig--listrawdevices
servicerawdevicesrestart
检查权限oracle,dba
cd/dev/raw
ll
raw/*:
检查裸设备的权限
创建ASM磁盘:
两个节点都安装RPM三个ASM包
查看Linux内核
uname-rm
下载ASM三个包
cd/asmrpm
rpm-ivh*.rpm
rpm-qa|grepoacleasm
两个节点都安装好ASM包
rac1创建ASM磁盘
/etc/init.d/oracleasmconfigure
oracle
dba
y
检测ASM驱动是否加载l
1.lsmod|grepasm
2.cat/proc/filesystems
3.df-ha
/etc/init.d/oracleasmcreatediskVOL1/dev/sdd1
/etc/init.d/oracleasmcreatediskVOL2/dev/sde1
/etc/init.d/oracleasmcreatediskVOL3/dev/sdf1
/etc/init.d/oracleasmcreatediskVOL4/dev/sdg1
检查创建是否成功
cd/dev/oracleasm/disks
/etc/init.d/oracleasmlistdisks
/dtc/init.d/oracleasmquerydiskVOL1
rac2创建ASM磁盘
/etc/init.d/oracleasmscandisks
配置ASM磁盘
/etc/init.d/oracleasmconfigure
---------------------*******备份*********************
6.下载安装oracleclusterware
chown-Roracle:
oinstallclusterware
oinstalldatabase
chmod-R775/oracle
cd/oracle
ls-l
chmod-R775/oracle
rac1安装clusterware
su-oracle
exec/usr/bin/ssh-agent$SHELL
/usr/bin/ssh-add
cd/oracle/clusterware
检测环境是否可以安装clusterware
/oracle/clusterware/cluvfy/runcluvfy.shstage-precrsinst-nrac1,rac2
./runInstaller
path:
/oracle/...../crs
SpecifyClusterConfiguration
add
rac2-
SpecifyNetworkInterfaceUsage
eth0public
OCR:
extend:
/dev/raw/raw1
VotingDiskCongfiguration
/dev/raw/raw2
以root用户:
执行两个脚本:
/oracle/oraInventory/orainstRoot.sh
/oracle/product/10.2.0/crs/root.sh
如果报错:
解决eth0isnotpublic.
/oracle/product/10.2.0/crs/bin/vipca
eth0rac1:
rac1-
rac2:
rac1:
安装好后:
crs_stat-t
crs_stat-t
------------------****************备份***********************************
rac1
7.单独安装ASMASM管理多实例
便于升级
cd/oracle/database
specifyhomedetails
OraASM10g_home1
/oracle/product/10.2.0/asm
ClusterInstallation
SelectConfigurationOption
configureASM
Configureautomaticstoragemanagerment
data
normal
选择orcl:
vol1
orcl:
vol2
执行脚本:
完成安装
安装数据库软件:
选Installdatabasesoftwareonly
执行脚本:
安装完成
rac1:
配置:
listener
netca
crs_stat-t查看listener
rac2
crs_stat-t
创建另一个ASM磁盘组
dbca
selectrac1rac2
createnew
creatediskgroup
RECOVERY
vol3
vol4
创建数据库
dbca
gobalservicename:
test1
availableasm
useoracle-managefiles
不创建databaseservice
创建好后检查状态
crs_stat-t-v
crs_stat-t
crs_stat-t-v
statnnodeapps-nrac1
statnnodeapps-nrac2
srvctlstatusasm-nrac1
srvctlstatusasm-nrac2
srvctlstatusdatabase-dfirstrac
crsctlcheckcrs
sqlplus/nolog
conn/assysdba
selectinstance_name,host_name,archiver,thread#,statusfromgv$instance;
exit;
sqlplussystem/oracle@testrac1
sqlplussystem/oracle@testrac2
sqlplussystem/oracle@testrac
exportORACLE_SID=testrac1
sqlplus/assysdba
showsga
selectfile_namefromdba_datafiles;
exit
exportORACLE_SID=+ASM1
sqlplus/assysdba
启动数据库
$srvctlstartnodeapps-nrac1
$srvctlstartnodeapps-nrac2
$srvctlstartasm-nrac1
$srvctlstartasm-nrac2
$srvctlstartinstance-dracdb-iracdb1
$srvctlstartinstance-dracdb-iracdb2
可以用以下方动启动crs:
$/etc/init.d/init.cssdstart
$/etc/init.d/init.crsstart
rac1->
./init.crsstart
Startupwillbequeuedtoinitwithin90seconds.
./init.cssdstart
Startupwillbequeuedtoinitwithin90
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- rac CentOS48