How to install Oracle Solaris 11.4 within VirtualBox 6.0.2 and install Oracle Database

The below tutorial was performed on a machine running OEL7.4 using an Intel processor x86-64

The first step is to create the VM virtual hardware

Now we will proceed to download the OS installer, for that, we will go to this place:

https://www.oracle.com/technetwork/server-storage/solaris11/downloads/install-2245079.html

Then we need to configure the VM media to boot with the installer and set the para-virtualization to KVM (if you are doing this with windows then use Hyper-V)

Installing Solaris

Then F2 key

Configuring SSH on Solaris

As root vi /etc/ssh/sshd_config look for PermitRootLoginand set it to yes

This will make our life easier, now let’s connect to the VM using ssh, this will be done using a port-forwarding rule that way we will be able to connect using Putty or any other ssh client.

After this, you can connect to the VM using ssh, that will help you copy and paste the rest of the commands used here 🙂 you might need to restart the service or even better, shutdown the VM and take a snapshot just in case something goes wrong

Solaris configuration

Guest Additions

Recommendation, install the guest additions to allow have better control of the Solaris VM, also, if you are going to use this for testing, you may want to quit the password for the sudo users.

In case of problems mounting the device (on some cases the guest additions image does not get mounted automatically) you can manually mounted using

eject -l //this will show you the device name like /dev/dsk/c1t0d0s1

then mount it using

mount -F hsfs -o ro /dev/dsk/c1t0d0s1 /cdrom

more info here and here then reboot

Passwordless sudo

As root execute vim /etc/sudores then go to the end of the file.

Once connected using ssh to the VM, in my case

ssh -p 11300 root@localhost

Let’s update the system

pkg update --accept
groupadd oinstall
groupadd dba
usermod -g oinstall -G dba oracle

The next step is to setup some kernel parameters (all processes and tasks then created within the project inherit these controls)

projadd user.oracle
projmod -U oracle -sK "process.max-file-descriptor=(basic,65536,deny)" \
user.oracle
projmod -U oracle -sK "project.max-shm-memory=(priv,8589934592,deny)" \
user.oracle

Now we have to install the dependencies required by the Oracle version you want to run, to do it, we will use the preinstall package

//for 121*
pkg install oracle-rdbms-server-12-1-preinstall
/for 122*
pkg install oracle-rdbms-server-12-2-preinstall
//if you are installing 18
pkg install oracle-rdbms-server-18c-preinstall

The next step is to create the partition where the database files will live, in my case as this machine is only for testing, I will only create a folder and change its owner

mkdir /databases
chown -R oracle:dba /databases

Then we need to set the password of the oracle user

passwd oracle

As a final step, change the limits of the Oracle user

-bash-4.4$ ulimit -a
core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
file size               (blocks, -f) unlimited
open files                      (-n) 65536
pipe size            (512 bytes, -p) 10
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 29995
virtual memory          (kbytes, -v) unlimited
-bash-4.4$ ulimit -s 32768
-bash-4.4$ ulimit -a
core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
file size               (blocks, -f) unlimited
open files                      (-n) 65536
pipe size            (512 bytes, -p) 10
stack size              (kbytes, -s) 32768
cpu time               (seconds, -t) unlimited
max user processes              (-u) 29995
virtual memory          (kbytes, -v) unlimited

(usually oracle is not a sudoer user, if that is the case you will have to change the limits from an admin user)

Oracle RDBMS Installation

Connected as root execute

pkg install oracle-rdbms-server-18c-preinstall

Once the preinstall finished, we can proceed to install Oracle RDBMS, in this case we will do it with two version

Oracle 18.3 and Oracle 12.2

The installation will be performed using the silent mode since Solaris does not come with a GUI, also because even if you try to install one using something like this you might face a lot of problems.

Installing a GUI may induce to a kernel panics on your system on some hosts, if you plan to do it, take a snapshot of your system and also follow this fix to prevent those kernel panics due to slow CPU communication between the host and the guest

ugly error after installing gui (kernel panics)

The Oracle installation changed from version 12c to version 18c

Installing Oracle 18c in silent mode

Download the Oracle installer from here

//create the home directory & unzip the file
mkdir /databases/product/18.3.0/dbhome_1
cd  /databases/product/18.3.0/dbhome_1
unzip -q ~/Download/OracleRDBMS18c.zip

//export the env variables
export ORACLE_HOME=/databases/product/18.3.0/dbhome_1
export ORACLE_BASE=/databases
export PATH=$ORACLE_HOME/bin:$PATH

//execute the clonner
$ORACLE_HOME/perl/bin/perl $ORACLE_HOME/clone/bin/clone.pl ORACLE_BASE="$ORACLE_BASE" ORACLE_HOME="$ORACLE_HOME" OSDBA_GROUP=dba OSOPER_GROUP=dba -defaultHomeName -nowait
expected output

once the binaries are installer we can proceed to create a database

// NonCDB 18c
dbca -silent -createDatabase \
-templateName General_Purpose.dbc \
-gdbname db18300 -sid db18300 -responseFile NO_VALUE \
-characterSet AL32UTF8 \
-sysPassword admin123 \
-systemPassword admin123 \
-createAsContainerDatabase false \
-databaseType MULTIPURPOSE \
-automaticMemoryManagement false \
-totalMemory 1536 \
-storageType FS \
-datafileDestination "/databases/oradata/" \
-redoLogFileSize 50 \
-emConfiguration NONE \
-ignorePreReqs

//CDB 18c
dbca -silent -createDatabase \
-templateName General_Purpose.dbc \
-gdbname cdb18300 -sid cdb18300 -responseFile NO_VALUE \
-characterSet AL32UTF8 \
-sysPassword admin123 \
-systemPassword admin123 \
-createAsContainerDatabase true \
-numberOfPDBs 1 \
-pdbName pdb \
-pdbAdminPassword admin123 \
-databaseType MULTIPURPOSE \
-automaticMemoryManagement false \
-totalMemory 1536 \
-storageType FS \
-datafileDestination "/databases/oradata/" \
-redoLogFileSize 50 \
-emConfiguration NONE \
-ignorePreReqs
dbca 18c expected output

Installing Oracle 12cR2 in silent mode

Download Oracle 12c from here

Once the binaries are in place we will proceed to the installation

mkdir -p /databases/product/12.2.0/
cd /databases/product/12.2.0/
unzip -q ~/Downloads/OracleRDBMS12cR2.zip

//this will create a directory called database on the current dir
cd database

./runInstaller -silent -showProgress -force \
oracle.install.option=INSTALL_DB_SWONLY \
UNIX_GROUP_NAME=oinstall \
ORACLE_HOME=/databases/product/12.2.0/dbhome_1 \
ORACLE_BASE=/databases \
oracle.install.db.InstallEdition=EE \
oracle.install.db.isCustomInstall=false \
oracle.install.db.DBA_GROUP=dba \
oracle.install.db.OPER_GROUP=dba \
oracle.install.db.OSBACKUPDBA_GROUP=dba \
oracle.install.db.OSDGDBA_GROUP=dba \
oracle.install.db.OSKMDBA_GROUP=dba \
oracle.install.db.OSRACDBA_GROUP=dba \
DECLINE_SECURITY_UPDATES=true

Now we will proceed to create a couple of databases

export ORACLE_HOME=/databases/product/12.2.0/dbhome_1
export ORACLE_BASE=/databases
export PATH=$ORACLE_HOME/bin:$PATH

Then call dbca in silent mode

//non cdb 12c
dbca -silent -createDatabase \
-templateName General_Purpose.dbc \
-gdbname db12200 -sid db12200 -responseFile NO_VALUE \
-characterSet AL32UTF8 \
-sysPassword admin123 \
-systemPassword admin123 \
-createAsContainerDatabase false \
-databaseType MULTIPURPOSE \
-automaticMemoryManagement false \
-totalMemory 1536 \
-storageType FS \
-datafileDestination "/databases/oradata/" \
-redoLogFileSize 50 \
-emConfiguration NONE \
-ignorePreReqs

//cdb 12c
dbca -silent -createDatabase \
-templateName General_Purpose.dbc \
-gdbname cdb12200 -sid cdb12200 -responseFile NO_VALUE \
-characterSet AL32UTF8 \
-sysPassword admin123 \
-systemPassword admin123 \
-createAsContainerDatabase true \
-numberOfPDBs 1 \
-pdbName pdb \
-pdbAdminPassword admin123 \
-databaseType MULTIPURPOSE \
-automaticMemoryManagement false \
-totalMemory 1536 \
-storageType FS \
-datafileDestination "/databases/oradata/" \
-redoLogFileSize 50 \
-emConfiguration NONE \
-ignorePreReqs

that’s all, now you can switch to the database using . oraenv followed by the ORACLE_SID you chose

References

https://community.oracle.com/docs/DOC-910652
https://docs.oracle.com/en/database/oracle/oracle-database/12.2/cwsol/checking-resource-limits-for-oracle-software-installation-user.html#GUID-293874BD-8069-470F-BEBF-A77C06618D5A
https://docs.oracle.com/cd/E26502_01/html/E29006/gizfl.html
https://oraclefact.wordpress.com/2018/04/06/how-to-install-11-2-12-1-12-2-database-client-software-in-silent-mode-with-without-using-response-file-doc-id-885643-1/

12 thoughts on “How to install Oracle Solaris 11.4 within VirtualBox 6.0.2 and install Oracle Database

    1. Hello Alhumaid, the command should be executed in the host terminal, if you are using Linux, open a terminal and type the command, if you happen to use Windows (as host) install an ssh client and execute the command.

      what we are doing there is to create a port-forwarding rule from the host to the guest to make the latest steps easier

  1. Hello Frederick,
    Thank you for providing this procedure. I just followed the instruction but at the beginning of the installation, installer exits with the following error:

    [WARNING] [INS-08109] Unexpected error occurred while validating inputs at state ‘inventoryPage’.
    CAUSE: No additional information available.
    ACTION: Contact Oracle Support Services or refer to the software manual.
    SUMMARY:
    – java.lang.NullPointerException
    A log of this session is currently saved as: /tmp/OraInstall2020-04-13_12-06-50AM/installActions2020-04-13_12-06-50AM.log. Oracle recommends that if you want to keep this log, you should move it from the temporary location.

    Thank you in advance for your help.

    1. it is hard to tell what the problem is just from that error, at first sight I would say the path for the inventory is incorrect, review the log file check what the specific problem is

      1. here is the error section from log file,

        INFO: Waiting for completion of background operations
        INFO: Completed background operations
        INFO: Waiting for completion of background operations
        INFO: Completed background operations
        INFO: Moved to state
        INFO: Waiting for completion of background operations
        INFO: Completed background operations
        INFO: Validating state
        INFO: Terminating all background operations
        INFO: Terminated all background operations
        WARNING: [WARNING] [INS-08109] Unexpected error occurred while validating inputs at state ‘inventoryPage’.
        CAUSE: No additional information available.
        ACTION: Contact Oracle Support Services or refer to the software manual.
        SUMMARY:
        – java.lang.NullPointerException.
        Refer associated stacktrace #oracle.install.commons.util.exception.AbstractErrorAdvisor:507
        INFO: Advice is CONTINUE
        INFO: Adding ExitStatus FAILURE to the exit status set
        WARNING: A log of this session is currently saved as: /tmp/OraInstall2020-04-13_12-06-50AM/installActions2020-04-13_12-06-50AM.log. Oracle recommends that if you want to keep this log, you should move it from the temporary location.
        INFO: Finding the most appropriate exit status for the current application
        INFO: Exit Status is -1
        INFO: Shutdown Oracle Database 12c Release 2 Installer
        INFO: Unloading Setup Driver

  2. yes, I do,

    ./runInstaller -silent -showProgress -force \
    oracle.install.option=INSTALL_DB_SWONLY \
    UNIX_GROUP_NAME=oinstall \
    ORACLE_HOME=/databases/product/12.2.0/dbhome_1 \
    ORACLE_BASE=/databases \
    oracle.install.db.InstallEdition=EE \
    oracle.install.db.isCustomInstall=false \
    oracle.install.db.DBA_GROUP=dba \
    oracle.install.db.OPER_GROUP=dba \
    oracle.install.db.OSBACKUPDBA_GROUP=dba \
    oracle.install.db.OSDGDBA_GROUP=dba \
    oracle.install.db.OSKMDBA_GROUP=dba \
    oracle.install.db.OSRACDBA_GROUP=dba \
    DECLINE_SECURITY_UPDATES=true

  3. Yes I think so,

    ./runInstaller -silent -showProgress -force \
    oracle.install.option=INSTALL_DB_SWONLY \
    UNIX_GROUP_NAME=oinstall \
    ORACLE_HOME=/databases/product/12.2.0/dbhome_1 \
    ORACLE_BASE=/databases \
    oracle.install.db.InstallEdition=EE \
    oracle.install.db.isCustomInstall=false \
    oracle.install.db.DBA_GROUP=dba \
    oracle.install.db.OPER_GROUP=dba \
    oracle.install.db.OSBACKUPDBA_GROUP=dba \
    oracle.install.db.OSDGDBA_GROUP=dba \
    oracle.install.db.OSKMDBA_GROUP=dba \
    oracle.install.db.OSRACDBA_GROUP=dba \
    DECLINE_SECURITY_UPDATES=true

    1. looks like a bug, try using the graphical way and go step by step, maybe one of the parameters is incorrect and we are seeing the symptoms, step by step it would be easier to identify the root cause

Leave a Reply

Your email address will not be published. Required fields are marked *

Verified by MonsterInsights