Linux平台误删homeoracle根目录的解决方法(二)

2015-07-24 10:53:26 · 作者: · 浏览: 11
la' [root@dg1 ~]# [root@dg1 home]# ls -la /home/oracle total 24 drwxr-xr-x 2 root root 4096 Aug 27 14:47 . drwxr-xr-x. 4 root root 4096 Aug 27 14:47.. -rw-r--r-- 1 root root 18 Aug 27 14:47.bash_logout -rw-r--r-- 1 root root 176 Aug 27 14:47.bash_profile -rw-r--r-- 1 root root 124 Aug 27 14:47.bashrc -rw-r--r-- 1 root root 121 Aug 27 14:47.kshrc [root@dg1 home]# [root@dg1 home]# chown -R oracle:oinstall/home/oracle [root@dg1 home]# cd /home/oracle [root@dg1 oracle]# ls -la total 24 drwxr-xr-x 2 oracle oinstall 4096 Aug 27 14:47 . drwxr-xr-x. 4 root root 4096 Aug 27 14:47 .. -rw-r--r-- 1 oracle oinstall 18 Aug 2714:47 .bash_logout -rw-r--r-- 1 oracle oinstall 176 Aug 2714:47 .bash_profile -rw-r--r-- 1 oracle oinstall 124 Aug 2714:47 .bashrc -rw-r--r-- 1 oracle oinstall 121 Aug 2714:47 .kshrc [root@dg1 oracle]# //修改oracle 用户的环境变量: [oracle@dg1 ~]$ cat .bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then .~/.bashrc fi # User specific environment and startupprograms PATH=$PATH:$HOME/bin export PATH #
Oracle
Settings TMP=/tmp; export TMP TMPDIR=$TMP; export TMPDIR ORACLE_HOSTNAME=dave; exportORACLE_HOSTNAME ORACLE_UNQNAME=dave; export ORACLE_UNQNAME ORACLE_BASE=/u01/app/oracle; exportORACLE_BASE ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1;exportORACLE_HOME ORACLE_SID=dave; export ORACLE_SID PATH=/u01:/usr/sbin:$PATH; export PATH PATH=$ORACLE_HOME/bin:$PATH; export PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;exportLD_LIBRARY_PATH CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;exportCLASSPATH [oracle@dg1 ~]$

恢复正常。 但如果有数据文件,那么恢复就比这里更复杂。