How I learned to stop worrying and enjoy Oracle installations
I have to hand it to the folks at Oracle, they have made installing 12cR1 just that little more complex, which makes us feel really good when it works!
My only gripe is when you don't have a GUI and and X-Term handy, installation for the uninitiated (read: ME) is a tad more complex. So break out vi or emacs, and let's get started. I am doing this in a virtual machine, which may, or may not be officially supported. But it's so much easier while we're learning.
1. You'll need a response file
There's two ways to get one of these. Unpack the installer, and copy it from database/response or run a GUI install somewhere else and save it off. The only things you really need to change are the installation points. Everything else cal remain as-is
2. If you're doing Linux, it might as well be Oracle Linux
Yeah, I am well aware that Oracle Linux is fundamentally RedHat in a different red hat; but you do get the warm fuzzy feeling it's all going to hang together.
Installing Oracle Linux 6 is no different to RedHat or most other distributions, insert media, a handful of mouse clicks and you're done. For the sake of those following my ramblings, I have three 20G disks.
sda0 = 4GB Swap
sda1 = Remainder on / as ext4
sdb1 = /u01 as ext4
sdc1 = /oradata as ext2
"Whoa" I hear you say... ext2? I am a subscriber to the "less is more" theory. Oracle is really good at handling their data files, and don't need us getting in the way with journalling and the like. Ext2 is simpler, low overhead and that for me, is all there is to it. Feel free to disagree...
Install as a standard server, and add the base development tools, as well as whatever other packages you feel you need in your case.
3. Update before you start
Easy. Just do "yum update" and follow the bouncing ball.
4. Install the prerequisites
The easiest way of not messing things up is just to install the prereq package with:
"yum install oracle-rdbms-server-12cR1-preinstall"
This will create an "oracle" user, "oinstall" and "dba" groups as well as add any missing packages and tune kernel parameters.
At this point, it's a good idea to do an "su - oracle"
5. Extract the installer
12c comes as two huge zip files, "linuxamd64_12c_database_1of2.zip" and
"linuxamd64_12c_database_1of2.zip" unzip these to /tmp/oracle. Having done that, copy your response file to /tmp/oracle
6. Set up your directories
mkdir -p /u01/app/oracle
mkdir -p /oradata/data
chown -R oracle:oinstall /u01
chown -R oracle:dba /oradata
Don't get too hung up on permissions, the installation will adjust them for us as we go
7. Create a script
Break out your favourite editor, and create oinst.sh in the /tmp/oracle directory
.option=INSTALL_DB_SWONLY UNIX_GROUP_NAME=oinstall \
Now run it, as "oracle"
It will take a while, but you should see:
As a root user, execute the following script(s):
Successfully Setup Software
Now, go run those two scripts, as root
Congratulations! You just installed Oracle RDBMS
8. Create an actual database
dbca -silent -responseFile NO_VALUE -createDatabase \
-templateName General_Purpose.dbc -createAsContainerDatabase
-gdbName testdb1 -sid testdb1 -SysPassword Abig5ecret \
Abig5ecret-emConfiguration DBEXPRESS \
Abig5ecret-storageType FS \
-redoLogFileSize 200 -sampleSchema
-characterSet AL32UTF8 -totalMemory 74
The system will grind away and eventually get to 100%, Around 40%, you should see
"Creating and starting Oracle instance"
9. Set up networking
netca -silent -responseFile /tmp/oracle/netca.rsp
10. You're done!