|
发表于 2016-7-7 20:54:18
|
显示全部楼层
不能直接这样改GI。
参考推系统的kickstart文件:
- # ROOTSH
- echo "rm -rf /etc/oracle" >> /usr/sbin/crs.sh
- echo "/u01/app/oracle/product/11.2.0/grid/root.sh <<- EOF" >> /usr/sbin/crs.sh
- echo >> /usr/sbin/crs.sh
- echo "y" >> /usr/sbin/crs.sh
- echo "y" >> /usr/sbin/crs.sh
- echo "y" >> /usr/sbin/crs.sh
- echo "EOF" >> /usr/sbin/crs.sh
- chmod +x /usr/sbin/crs.sh
- # ASM
- echo "export ORACLE_SID=+ASM" >> /usr/bin/asm.sh
- echo "export ORACLE_HOME=/u01/app/oracle/product/11.2.0/grid" >> /usr/bin/asm.sh
- echo "/u01/app/oracle/product/11.2.0/grid/bin/sqlplus /nolog <<- EOF" >> /usr/bin/asm.sh
- echo "conn / as sysasm" >> /usr/bin/asm.sh
- echo "alter system set asm_diskstring='/dev/oracleasm/disks/*';" >> /usr/bin/asm.sh
- echo "alter system set asm_diskgroups='DATA','FRA';" >> /usr/bin/asm.sh
- echo "alter diskgroup data mount;" >> /usr/bin/asm.sh
- echo "alter diskgroup fra mount;" >> /usr/bin/asm.sh
- echo "exit" >> /usr/bin/asm.sh
- echo "EOF" >> /usr/bin/asm.sh
- echo "*.asm_diskgroups='DATA', 'FRA'" > /u01/app/oracle/product/11.2.0/grid/dbs/init+ASM.ora
- echo "*.asm_diskstring='/dev/oracleasm/disks/*'" > /u01/app/oracle/product/11.2.0/grid/dbs/init+ASM.ora
- chown oracle:oinstall /u01/app/oracle/product/11.2.0/grid/dbs/init+ASM.ora
- chown oracle:oinstall /usr/bin/asm.sh
- chmod +x /usr/bin/asm.sh
- # EMCA1
- echo "/u01/app/oracle/product/11.2.0/grid/bin/srvctl add listener" >> /usr/bin/emca.sh
- echo "/u01/app/oracle/product/11.2.0/grid/bin/srvctl add asm" >> /usr/bin/emca.sh
- echo "/u01/app/oracle/product/11.2.0/grid/bin/crsctl start resource ora.asm" >> /usr/bin/emca.sh
- echo "/usr/bin/asm.sh" >> /usr/bin/emca.sh
- echo "/u01/app/oracle/product/11.2.0/grid/bin/srvctl add database -d orcl -o /u01/app/oracle/product/11.2.0/dbhome_1" >> /usr/bin/emca.sh
复制代码 |
|