6 Replies Latest reply on Mar 4, 2020 11:21 PM by Dude!

    Change Oracle Home for 18c XE install

    Jeff Chirco

      It is possible to install Oracle 18c XE on Linux in a different location other than /opt?  I've been searching around and I can't find anything.

       

      Thanks!

        • 1. Re: Change Oracle Home for 18c XE install
          Dude!

          XE will be installed in /opt/oracle/product/18c/dbhomeXE

           

          You can create a symbolic link, e.g.:

           

          mkdir -p /u01/oracle

          ln -s /u01/oracle /opt/oracle

           

          The access to /opt/oracle will be redirected to /u01/oracle.

          • 2. Re: Change Oracle Home for 18c XE install
            Jeff Chirco

            That didn't seem to work. The symbolic link is owned my oracle:oinstall and the folder it is pointing to is also owned by oracle:oinstall but when I run the install I get an error stating "cannot proceed because ORACLE_BASE directory (/opt/oracle) is not owned by "oracle""

            I am confused why it wont work though. Any ideas?

            • 3. Re: Change Oracle Home for 18c XE install
              Dude!

              I would have to try and see for myself. There are, however, other options that might work For example, you could create a partition or a disk image and mount it under /opt/oracle.

              • 4. Re: Change Oracle Home for 18c XE install
                Dude!

                Below is an example how to create a dynamic disk image. The disk image will have initially 0 size but can grow up to the specified file size, e.g. 50 GB. It can even be larger than the phycial space available.

                 

                sudo su -

                truncate -s 50G /home/oracle/orabase.img

                mkfs.xfs /home/oracle/orabase.img

                mkdir -p /opt/oracle

                echo "/home/oracle/orabase.img /opt/oracle xfs defaults 0 0" >> /etc/fstab

                mount -a

                chmod 775 /opt/oracle

                chown oracle:oinstall /opt/oracle

                 

                df -Ph

                Filesystem           Size  Used Avail Use% Mounted on

                devtmpfs             834M     0  834M   0% /dev

                tmpfs                850M     0  850M   0% /dev/shm

                tmpfs                850M  8.5M  842M   1% /run

                tmpfs                850M     0  850M   0% /sys/fs/cgroup

                /dev/mapper/ol-root   22G  1.8G   21G   9% /

                /dev/sda1           1014M  322M  693M  32% /boot

                tmpfs                170M     0  170M   0% /run/user/0

                /dev/loop1            50G  390M   50G   1% /opt/oracle

                • 5. Re: Change Oracle Home for 18c XE install
                  Jeff Chirco

                  Thanks for that script. Very helpful

                   

                  The reason I wanted it in something other than /opt/oracle is that we install XE in some retail locations and I was thinking it would be easier to manage for future changes if the Oracle Home was on a separate disk from OS.

                  • 6. Re: Change Oracle Home for 18c XE install
                    Dude!

                    Previous XE versions, like 11gXE, installed the software in /u01, and there was no problem using symbolic links to offload the database datafiles and FRA. The /opt directory under enterprise Linux is rarely used, and typically only for small stuff and 3rd party add-ons. Systems like Solaris, however, make more use of /opt for installations. Installing 18c XE inside /opt is unlike Linux, which is typically not a partition and part of the root directory.

                     

                    Have you tried if 18c XE installer honors ORACLE_BASE and ORACLE_HOME environment variables?