Oracle 10g RAC for linux 的完全解除安裝
目的主要是為了透過重複刪除和重新安裝來熟練Oracle Rac的安裝配置過程。[@more@]
1.現有配置資訊的收集:
為了正確解除安裝,對現有配置和路徑進行查詢:
.bash_profile檔案內容如下:
[oracle@dbserv1 ~]$ more .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db
export ORA_ASM_HOME=$ORACLE_BASE/product/10.2.0/asm
export ORA_CRS_HOME=/u01/crs1020
export ORACLE_SID=racdb1
# export ORACLE_SID=racdb2
export PATH=$ORA_CRS_HOME/bin:$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
export LC_CTYPE=en_US.UTF-8
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export TMPDIR=/tmp
export TMP=/tmp
裸裝置配置資訊及磁碟分割槽情況:
[root@dbserv1 ~]# more /etc/sysconfig/rawdevices
# raw device bindings
# format:
#
# example: /dev/raw/raw1 /dev/sda1
# /dev/raw/raw2 8 5
#OCR
/dev/raw/raw1 /dev/sdb1
#Voting Disk
/dev/raw/raw2 /dev/sdc1
#Ora Disk
/dev/raw/raw3 /dev/sdd1
/dev/raw/raw4 /dev/sde1
/dev/raw/raw5 /dev/sdf1
[root@dbserv1 ~]# fdisk -l
Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 892 7164958+ 83 Linux
/dev/sda2 893 2480 12755610 83 Linux
/dev/sda3 2481 2610 1044225 82 Linux swap / Solaris
Disk /dev/sdb: 321 MB, 321912832 bytes
64 heads, 32 sectors/track, 307 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 2 307 313344 83 Linux
Disk /dev/sdc: 213 MB, 213909504 bytes
64 heads, 32 sectors/track, 204 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
/dev/sdc1 1 204 208880 83 Linux
Disk /dev/sdd: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdd1 1 391 3140676 83 Linux
Disk /dev/sde: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sde1 1 391 3140676 83 Linux
Disk /dev/sdf: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdf1 1 391 3140676 83 Linux
2.開始解除安裝:
解除安裝之前需要關閉RAC
在所有節點執行如下兩條命令:
crs_stop -all -f
crs_stat -t -v
crsctl stop crs
例如:
[oracle@dbserv1 ~]$ crs_stop -all
Attempting to stop `ora.dbserv1.gsd` on member `dbserv1`
Attempting to stop `ora.RACDB.TEST.RACDB1.srv` on member `dbserv1`
Attempting to stop `ora.RACDB.TEST.cs` on member `dbserv1`
Stop of `ora.dbserv1.gsd` on member `dbserv1` succeeded.
Attempting to stop `ora.dbserv1.ons` on member `dbserv1`
Attempting to stop `ora.RACDB.TEST.RACDB2.srv` on member `dbserv2`
Stop of `ora.RACDB.TEST.RACDB1.srv` on member `dbserv1` succeeded.
Attempting to stop `ora.dbserv2.gsd` on member `dbserv2`
Attempting to stop `ora.dbserv2.ons` on member `dbserv2`
Stop of `ora.dbserv1.ons` on member `dbserv1` succeeded.
Attempting to stop `ora.RACDB.db` on member `dbserv2`
Stop of `ora.RACDB.TEST.RACDB2.srv` on member `dbserv2` succeeded.
Stop of `ora.dbserv2.gsd` on member `dbserv2` succeeded.
Stop of `ora.dbserv2.ons` on member `dbserv2` succeeded.
Stop of `ora.RACDB.TEST.cs` on member `dbserv1` succeeded.
Stop of `ora.RACDB.db` on member `dbserv2` succeeded.
Attempting to stop `ora.dbserv1.LISTENER_DBSERV1.lsnr` on member `dbserv1`
Attempting to stop `ora.dbserv2.LISTENER_DBSERV2.lsnr` on member `dbserv2`
Stop of `ora.dbserv1.LISTENER_DBSERV1.lsnr` on member `dbserv1` succeeded.
`ora.RACDB.RACDB1.inst` is already OFFLINE.
Attempting to stop `ora.dbserv1.ASM1.asm` on member `dbserv1`
...
[root@dbserv1 ~]# cd /u01/crs1020/
[root@dbserv1 crs1020]# cd bin/
[root@dbserv1 bin]# ./crsctl stop
Missing parameter.
[root@dbserv1 bin]# ./crsctl stop crs
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
[root@dbserv1 bin]#
清理裸裝置:
dd if=/dev/zero of=/dev/raw/raw1 bs=1M count=300
dd if=/dev/zero of=/dev/raw/raw2 bs=1M count=300
dd if=/dev/zero of=/dev/raw/raw3 bs=1M count=300
dd if=/dev/zero of=/dev/raw/raw4 bs=1M count=300
dd if=/dev/zero of=/dev/raw/raw5 bs=1M count=300
刪除Oracle database db sofetware:
rm -rf /u01/app/oracle/*
刪除Oracle database clustware sofetware:
rm -rf /u01/crs1020/*
刪除其餘安裝過程中生成的相關檔案:
rm -rf /etc/rc.d/rc5.d/S96init.crs
rm -rf /etc/rc.d/init.d/init.crs
rm -rf /etc/rc.d/rc4.d/K96init.crs
rm -rf /etc/rc.d/rc6.d/K96init.crs
rm -rf /etc/rc.d/rc1.d/K96init.crs
rm -rf /etc/rc.d/rc0.d/K96init.crs
rm -rf /etc/rc.d/rc2.d/K96init.crs
rm -rf /etc/rc.d/rc3.d/S96init.crs
rm -rf /etc/oracle/*
rm -rf /etc/oraInst.loc
rm -rf /etc/oratab
rm -rf /usr/local/bin/coraenv
rm -rf /usr/local/bin/dbhome
rm -rf /usr/local/bin/oraenv
rm -f /etc/init.d/init.cssd
rm -f /etc/init.d/init.crs
rm -f /etc/init.d/init.crsd
rm -f /etc/init.d/init.evmd
rm -f /etc/rc2.d/K96init.crs
rm -f /etc/rc2.d/S96init.crs
rm -f /etc/rc3.d/K96init.crs
rm -f /etc/rc3.d/S96init.crs
rm -f /etc/rc5.d/K96init.crs
rm -f /etc/rc5.d/S96init.crs
rm -f /etc/inittab.crs
還原原有的inittab檔案:
mv /etc/inittab /etc/inittab_bak
cp /etc/inittab.orig /etc/inittab
重新安裝RAC之前,需要在兩個節點分別執行如下命令來啟用使用者等效驗證:
exec /usr/bin/ssh-agent $SHELL
/usr/bin/ssh-add
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/18841027/viewspace-1060668/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle RAC叢集解除安裝步驟Oracle
- 解除安裝windows安裝ubuntu的完全指南WindowsUbuntu
- 如何完全解除安裝WSL
- Linux下Oracle 11.2.0.1 RAC安裝筆記LinuxOracle筆記
- Oracle Linux 7.1 靜默安裝Oracle 18c RACOracleLinux
- [轉]如何完全解除安裝WSL
- Elementary os完全解除安裝DockerDocker
- 完全解除安裝刪除 GitLabGitlab
- 完全解除安裝刪除gitlabGitlab
- 如何將Java完全解除安裝Java
- CentOS 7 完全解除安裝PHPCentOSPHP
- oracle 10g在linux下的安裝及簡單命令Oracle 10gLinux
- Debian中完全解除安裝MySQL的方法MySql
- ORACLE11GR2 RAC解除安裝ASM例項步驟OracleASM
- Mysql--所有版本安裝以及完全解除安裝MySql
- ISO 映象安裝oracle 10gOracle 10g
- Oracle 19c RAC on Linux 7.6安裝手冊OracleLinux
- Linux安裝解除安裝MySQLLinuxMySql
- Oracle 10g RAC故障處理Oracle 10g
- linux環境下解除安裝oracle11gLinuxOracle
- oracle rac資料庫的安裝Oracle資料庫
- oracle 19c 安裝、解除安裝Oracle
- linux解除安裝anocondaLinux
- Linux 解除安裝openjdk 安裝oraclejdkLinuxJDKOracle
- linux 解除安裝jdk和安裝LinuxJDK
- win10怎麼解除安裝cygwin_win10如何完全解除安裝cygwinWin10
- Linux下jdk的安裝解除安裝切換LinuxJDK
- Oracle11g解除安裝Oracle
- Linux-Ubuntu-mysql-安裝&解除安裝LinuxUbuntuMySql
- win10怎麼解除安裝nginx_win10完全解除安裝nginx的操作方法Win10Nginx
- 完全解除安裝MacOS應用程式的兩種方法Mac
- VM解除安裝不完全,重灌的一個下午
- Oracle 11G RAC叢集安裝(3)——安裝OracleOracle
- linux解除安裝軟體的命令Linux
- vgant 安裝oracle資料庫racOracle資料庫
- centos7 安裝ORACLE 11.2.0.4.0 RACCentOSOracle
- Solaris下Oracle RAC 11.2.0.4 安裝方法Oracle
- 基於Linux的oracle 12cR2 RAC 標準化安裝(一)LinuxOracle
- 基於Linux的oracle 12cR2 RAC 標準化安裝(二)LinuxOracle