I want to change oracle "homedir" how to do? A good link as answer is ok.
I want to change "homedir" or "basedir" of oracle db from /oracle to
/var/oracle.
How to do?
I have set the oracle unix variables($ORACLE_HOME,$ORACLE_BASE)
with the new path,but db doesn't start.
So i reset them to old dir,and make a symlink for now,it work
but how to tell to oracle the new path?
Solution found,following this link

I wrote so a dirty and quick solution
In my case olddir was /oracle and new /var/oracle on aix 71
oracle was working,user created,etc..

#for safe shutdown oracle,is not necessary,but better

#mkdir
mkdir -p /var/oracle/app/oracle/product/12.2.0/dbhome_1;chown -R oracle:oradba  /var/oracle

#clone with tar
tar -zcvf  /var/oracle/Oracle_Home11g_clone.tar.gz . -X ~/exclude.txt
or better  use  rsync
rsync -avP --delete $HOMEOLD/ $HOMENEW

#edit /etc/ora* and set new home

#clone with runinstaller
/oracle/app/oracle/product/12.2.0/dbhome_1/oui/bin/runInstaller -clone -silent -defaultHomeName ORACLE_HOME=/var/oracle/app/oracle/product/12.2.0/dbhome_1 ORACLE_BASE=/var/oracle/app -waitForCompletion

# script from root
su root -
/var/oracle/app/oracle/product/12.2.0/dbhome_1/root.sh

#rsync remaining dir
rsync -avP --exclude app /oracle/* .

#edit all variables on oracle homedir(.profile,.bashrc,etc)

#edit  /etc/filesystems or fstab

#edit orafiles
find . -iname *.ora|xargs grep -lw "/oracle"
vim file.ora..

#test running db with olddir unmounted