It’s a long way, but I believe, we’ve accomplished a few percent by now. In this article I’m going to describe how to set up the oracle account, we just created.
The installer will require some environment variables to be set correctly, so that it will find it’s way.
su - oracle export ORACLE_BASE=/opt/oracle/rdbms export ORACLE_HOME=/opt/oracle/rdbms/product/12.20.1
I’m using different values than usual for ORACLE_BASE and ORACLE_HOME, because under all circumstances I want to make sure, that the software will be installed at a different place than the database. The RDBMS is something very different than the database. It’s a 3rd-party COTS (commercial off the shelf software) and that goes to /opt Since oracle will be a technical user, I have chosen reasonably low UID and GID for this user and group. Since we are doing a new installation, old files
/etc/oratab and /etc/oraInst.loc
need to be deleted.
Next we change directory to where we placed the zip-file with the oracle-database-software and here we go. We already changed ownership to that zip-file to oraclel:dba, so we also need to continue working as user-oracle.
Next tried to fire up runInstaller, as so many times I tried it before to show that a remote xterm would open on my host’s display, but this time it wouldn’t, because there is a permission issue when you ssh as yourself to the remote (guest) OS and then su to a different user. It no longer will be able to use your local DISPLAY.
So, we’ll do that differently. This time we open an xterm (I prefer to work with xterm) on our local computer, no matter if it’s the host operating system or any other computer that is able to ssh to this remote computer, respectively virtual machine.
ssh -X firstname.lastname@example.org email@example.com's password: ********** export ORACLE_BASE=/opt/oracle/rdbms export ORACLE_HOME=/opt/oracle/rdbms/product/12.2.0
And here we are. The following command will open an xterm with a shell from the remote computer on our local DISPLAY:
/usr/bin/xterm -sb -ls -sl 50000 -cr red -fg black -bg white &
So we can savely assume that it will also open runInstaller on our local DISPLAY.
cd /data unzip linuxx64_12201_database.zip cd database ./runInstaller
If you the command returns something like
Error in writing to directory /tmp/OraInstall2018-01-28_01-26-12PM. Please ensure that this directory is writable and has atleast 60 MB of disk space. Installation cannot continue.
ignore it and run it again. In my case I found a few of these OraInstall2018…..-directories in /tmp, since repeating my steps to write about a repeatable process. I deleted the directories with
cd /tmp rm -rf OraInstall2018*
I’ll just try to get through without making the big mistakes. There will be things a real pro may do differently, but this is not the purpose here. If you want to do it like the real pro, go to Oracle’s documentation and you will find an outrageously extensive installation documentation. It is so extensive that it raises questions. I remember a time in the early and mid 1990s when UNIX system administrators called in an oracle consultant to get that damn thin installed, because it was impossible for them to link that object files together.
Finally with version 10 Oracle provided an installer that really functioned, but actually it’s still a mess as you can easily read from this database installation guide.
Since I’m just demonstrating the installation of an oracle database, I will not provide my e.mail address etc and prefer to remain uninformed about security issues and I uncheck “I wish to receive security updates via My Oracle Support“
Hit the [Next]-Button and now we decide that we only do a Single instance database installation. From there we go ahead and I’ll also leave the next one as it is. I keep the Enterprise Edition.
Yes, that’s the values I want to see here and so I continue…..
That’s nice. The installer created the oraInventory directory instantly when I started it. Isn’t it a little late to inform me now about this? I keep these values and continue.
I keep these values. At this point you probably ultimately recognize that this is not a DBA-tutorial. It’s just about the installation. If you want to get into this issue, you need to attend more than one Oracle-DBA training and you probably choose to work as an Oracle-DBA for a few years in a professional Organization which runs the whole load of Oracle products.
Next Oracle will come up with a number of complaints. I fixed the worst before I come to this point and left the four shown here, so that we can fix them afterwards. There are installer complaints that have to be fixed before you pass this and the four remaining can be fixed later. So, what I fixed before was setting ulimit -S -s 16384 and install libcap1-1.10. With every new major release, Oracle will come with new requirements, which doesn’t make the product better.
The remaining important complaints can be viewed in detail at the bottom. So you go through each individual OS Kernel Parameter complaint above and view them, document them and fix them. I’ll keep the swap size, because my system will not swap. It is important to keep a system from swapping and with today’s ram-sizes available, it is easily possible. In a “normal” environment (whatever normal means) we rather think about increasing the random access memory available, since this is an affordable resource. This installation will not require a lot of resources and still I allocated 3GB ram to it, which is more than enough! You can run an oracle instance with a huge SGA on it, but what is huge in times when software engineers pack a 2-byte integer value in a 1.5k-Byte XML-file, send this files in an SOA environment over the network and directly save such XML-files in the database?
Here I check the [_] Ignore all checkbox and continue. Oracle now presents me tree widget with settings….. and finally the [Install]-button. I hit that button and give it a go. And now the installer finally gets that thing to where it should go to. After a while, a new window pops up and prompts us to run two scripts:
We can copy the paths to the scripts from that window into a shell and here is the result:
[root@misrad oracle]# id uid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 [root@misrad oracle]# /opt/oracle/oraInventory/orainstRoot.sh Changing permissions of /opt/oracle/oraInventory. Adding read,write permissions for group. Removing read,write,execute permissions for world. Changing groupname of /opt/oracle/oraInventory to dba. The execution of the script is complete. [root@misrad oracle]# /opt/oracle/rdbms/product/12.2.0/root.sh Performing root user operation. The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /opt/oracle/rdbms/product/12.2.0 Enter the full pathname of the local bin directory: [/usr/local/bin]: Copying dbhome to /usr/local/bin ... Copying oraenv to /usr/local/bin ... Copying coraenv to /usr/local/bin ... Creating /etc/oratab file... Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root script. Now product-specific root actions will be performed. Do you want to setup Oracle Trace File Analyzer (TFA) now ? yes|[no] : no Oracle Trace File Analyzer (TFA - User Mode) is available at : /opt/oracle/rdbms/product/12.2.0/suptools/tfa/release/tfa_home/bin/tfactl OR Oracle Trace File Analyzer (TFA - Daemon Mode) can be installed by running this script : /opt/oracle/rdbms/product/12.2.0/suptools/tfa/release/tfa_home/install/roottfa.sh [root@misrad oracle]#
This is definitely not the end of the story, because we still have to install a database. This is a totally different business. We’ll get closer in part 4.