Thursday, December 17, 2009

Oracle 11.2 silent installation on opensolaris

Even it is not certified but after appearance of Oracle 11.2 for Solaris (x86-64)
I decided to give a try for silent installation of Oracle on opensolaris

I downloaded Solaris iso and installed it as 64-bit on one of virtual
machines with 1Gb of RAM. Installation of OS went without problem
and shortly I was enjoying a great look of OpenSolaris.

I stopped myself admiring good looking interface (interesting, do they sell
OpenSolaris alike doughnuts somewhere in SUN office :) ? )
and connected through black and white ssh terminal
to execute silent installation.

By the way I got response from Support Oracle
that SHOW_INSTALL_PROGRESS_PAGE parameter is not used
in 11.2 installation anymore and I won't see that very useful
progress bar during installation.

Based on silent installation that I executed already on Linux for 11.2 I started the following:

./runInstaller -silent \
-responseFile /export/home/oracle/install/database/response/db_install.rsp \
oracle.install.option=INSTALL_DB_SWONLY \
oracle.install.db.InstallEdition=EE \
security_updates_via_myoraclesupport=false \
decline_security_updates=true \
oracle.install.db.DBA_GROUP=dba \
oracle.install.db.OPER_GROUP=oper \
ORACLE_BASE="/u01/app/oracle" \

Even I had enough space on disk I got error
- You may not have enough space on your drive for a successful install

After check of prerequisites for software installation I found that
size of temp directory should be more than 1Gb and after variables
assingment and directory creation (~/tmp) I started installation again:
export TMP=~/tmp
export TMPDIR=~/tmp
./runInstaller ...

It started and went till the end of the installation asking to
execute (which was done) but when I tried to connect to
sqlplus under sysdba I got following:
ORA-12560: TNS:protocol adapter error

Might be it's just because of ORACLE_HOME and ORACLE_SID not set?
Ok, I set them (ORACLE_SID to not existed) but got the same error.
Since it should be direct attach to oracle (not through TNS) I decided
to check oracle executable and found that it was 0 bytes.

Further investigation and journey through installation logs showed that
problem appeared during compilation of irman and ioracle:
ld: fatal: library -lcrypto: not found

Internet search discovered a blog post
"Installing the new Oracle 11g on OpenSolaris"
where that problem had been resolved through creation of link:
ln -s /lib/amd64/ /usr/sfw/lib/amd64

Great! I created the link and started silent installation again.
It went without errors but when I checked
oracle binary at the end, it was 0 bytes length again! Why?!

Back to installer logs and there was another
error during compilation of ioracle:
ld: fatal: mmap anon failed: Resource temporarily unavailable

My searches did not give me much information but something
was telling me that it either lack of RAM(1Gb) or small size
of swap (512Mb) and periodic failure of
manual compilation for ioracle almost proved it.

I changed size of swap device first because vmstat was showing
about 60 processes in wait state and bounced the server:
root@srv4:~# zfs get volsize rpool/swap
rpool/swap volsize 512M -
root@srv4:~# zfs set volsize=2G rpool/swap
root@srv4:~# zfs get volsize rpool/swap
rpool/swap volsize 2G -

After that change I removed installed software, deleted oracle home
entry from inventory.xml and started installation again.
That time oracle binary was compiled successfully
and I was able to login to sqlplus and created database
using dbca without problems:
$ ./dbca -silent -createDatabase -gdbName dev -templateName General_Purpose.dbc \
> -emConfiguration none -datafileDestination /u01/oradata \
> -sysPassword ... -systemPassword ... -storageType FS -initParams filesystemio_options=setall
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/dev/dev.log" for further details.

Another thing is to mention that to start OUI I had to add following packages:
SUNWarc SUNWctpls SUNWhea SUNWmfrun SUNWscp SUNWswmt
which allowed me to avoid errors:
Exception in thread "main" java.lang.UnsatisfiedLinkError:
/tmp/OraInstall2009-12-18_01-31-58PM/jdk/jre/lib/amd64/motif21/ java: fatal: open failed:
No such file or directory

Have a good day and Merry Christmas!