A few people have mentioned creating a cheat sheet for the Beehive 1.5.1 installation, so I thought I'd help out.
(I've created the following so you can just cut and paste each section if you want...)
Installing Database and Beehive on a Single Oracle Enterprise Linux 5.1 32bit machine.
After having installed the base operating system and setting up storage and networking...
#1 Ensure the following rpms have been installed:
cd /mnt/stage/OEL51x32staged/Server
rpm -Uvh gcc-4.1.1-52.el5.i386.rpm gcc-c++-4.1.1-52.el5.i386.rpm setarch-2.0-1.1.i386.rpm ksh-20060214-1.4.i386.rpm sysstat-7.0.0-3.el5.i386.rpm gdbm-1.8.0-26.2.1.i386.rpm libstdc++-4.1.1-52.el5.i386.rpm libstdc++-devel-4.1.1-52.el5.i386.rpm compat-libstdc++-296-2.96-138.i386.rpm compat-db-4.2.52-5.1.i386.rpm control-center-2.16.0-14.el5.i386.rpm glibc-common-2.5-12.i386.rpm binutils-2.17.50.0.6-2.el5.i386.rpm make-3.81-1.1.i386.rpm
#2 Create the Oracle user and Group:
groupadd -g 500 dba
groupadd -g 501 oinstall
useradd -g 500 -G 501 -u 500 oracle
#3 Add security limits for Oracle:
echo "
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
" >> /etc/security/limits.conf
#4 Add in the session limits library file to PAM's login file:
echo "
session required /lib/security/pam_limits.so
" >> /etc/pam.d/login
#5 Add kernel parameters:
echo "
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144
" >> /etc/sysctl.conf
#6 Turn a few things off:
chkconfig sendmail off
chkconfig cups off
#7 Fix a few other things:
ln -s /usr/lib/libgdbm.so /usr/lib/libdb.so.2
#8 Install Oracle RDBMS 11g (11.1.0.6):
xhost +
su - oracle
/mnt/stage/Database1106staged/database/runInstaller
Inventory : /opt/oracle/oraInventory
Oracle Home : /opt/oracle/product/11.1.0/db_1
#9a Download some patches (11.1.0.7++):
# This first one is 11.1.0.7 which is 1.5GB!!!
wget --ftp-user ${metalinkusername} --ftp-password=${metalinkpassword} ftp://updates.oracle.com/6890831/p6890831_111070_Linux-x86.zip
wget --ftp-user ${metalinkusername} --ftp-password=${metalinkpassword} ftp://updates.oracle.com/6782437/p6782437_111070_Linux-x86.zip
wget --ftp-user ${metalinkusername} --ftp-password=${metalinkpassword} ftp://updates.oracle.com/7273988/p7273988_111070_Linux-x86.zip
wget --ftp-user ${metalinkusername} --ftp-password=${metalinkpassword} ftp://updates.oracle.com/6750049/p6750049_111070_Linux-x86.zip
wget --ftp-user ${metalinkusername} --ftp-password=${metalinkpassword} ftp://updates.oracle.com/6083201/p6083201_111070_Linux-x86.zip
wget --ftp-user ${metalinkusername} --ftp-password=${metalinkpassword} ftp://updates.oracle.com/6977167/p6977167_111070_Linux-x86.zip
wget --ftp-user ${metalinkusername} --ftp-password=${metalinkpassword} ftp://updates.oracle.com/7694979/p7694979_111070_Linux-x86.zip
wget --ftp-user ${metalinkusername} --ftp-password=${metalinkpassword} ftp://updates.oracle.com/7378322/p7378322_111070_Linux-x86.zip
wget --ftp-user ${metalinkusername} --ftp-password=${metalinkpassword} ftp://updates.oracle.com/8221425/p8221425_111070_Linux-x86.zip
wget --ftp-user ${metalinkusername} --ftp-password=${metalinkpassword} ftp://updates.oracle.com/7643188/p7643188_111070_Linux-x86.zip
wget --ftp-user ${metalinkusername} --ftp-password=${metalinkpassword} ftp://updates.oracle.com/7258928/p7258928_111070_Linux-x86.zip
wget --ftp-user ${metalinkusername} --ftp-password=${metalinkpassword} ftp://updates.oracle.com/7156912/p7156912_111070_Linux-x86.zip
wget --ftp-user ${metalinkusername} --ftp-password=${metalinkpassword} ftp://updates.oracle.com/8214576/p8214576_111070_Linux-x86.zip
#Note: Obviously the above command shows your username/password into Metalink, don't use this if you're on a shared machine or if you think people will look at your shell history, it'd be better to use the .wget hidden file. See here for how to do that.
#9b Apply database patches (11.1.0.7++):
Apply 11.1.0.7
Apply the rest of the patches, none of these patches require anything other than - $ cd ${patch_no} ; opatch apply -silent
But you should do the checking yourself.
#10 If you have SELinux running, allow text relocation:
if [ "`sestatus |grep mode`" == "Current mode: enforcing" ]
then
chcon -t textrel_shlib_t /opt/oracle/product/11.1.0/db_1/lib/libclntsh.so.11.1
chcon -t textrel_shlib_t /opt/oracle/product/11.1.0/db_1/lib/libnnz11.so
chcon -t textrel_shlib_t /opt/oracle/product/11.1.0/db_1/lib/libsqlplus.so
chcon -t textrel_shlib_t /opt/oracle/product/11.1.0/db_1/lib/libnque11.so
fi
#10 Create and start default listener:
$ echo "
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = `hostname`)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
" > $ORACLE_HOME/network/admin/listener.ora
$ echo "
PBH =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = `hostname`)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ${ORACLE_SID}`hostname |awk -F`hostname -a` ' { print $NF } '`)
)
)
" > $ORACLE_HOME/network/admin/tnsnames.ora
lsnrctl start
#11 Create the database
#
su - oracle
#ORACLE_SID=PBH.bh151dm.com - ( Production BeeHive - couldn't think of anything better...)
/opt/oracle/product/11.1.0/db_1/bin/dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbName PBH.bh151dm.com -sysPassword syspass -systemPassword systpass -characterSet AL32UTF8 -storageType FS -automaticMemoryManagement -initParams java_pool_size=52428800,undo_retention=3600
#tip: If you go through DBCA GUI, ensure the NLS Lang is AL32UTF8 (Unicode) - the error that gets produced if you get this wrong does not help, something about {0}...
After that's finished and up and running...
#12 Change a few init.ora parameters
# if you didn't use the above silent dbca command, you might not have seen the init.ora parameters I've added... here they are.
sqlplus / as sysdba <<_EOF
alter system set java_pool_size=52428800 scope=both;
alter system set undo_retention=3600 scope=both;
exit;
_EOF
#13 Verify Database Vault is disabled...
If running sqlplus returns
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options
Then turn it off via
cd $ORACLE_HOME/rdbms/lib ; make -f ins_rdbms.mk dv_off lbac_off ; relink oracle
#14 You're now ready to install Oracle Beehive 1.5.1
/mnt/stage/Beehive151staged/runInstaller
Let me know if I've missed something, or you want me to add some different platforms.
Gavin
Comments (5)
Very useful indeed..... thanks.
Posted by Sachin | May 9, 2009 5:57 PM
Posted on May 9, 2009 17:57
Why not just install the oracle-validated RPM via ULN? That would take care of steps 1 through 5 for you.
Also xhost + is not required if you SSH with X11 Forwarding enabled (the -X option from ssh in Linux or an option in most SSH clients on other operating systems). You would have to log directly in as the oracle user for this to work, but it is more secure as the X11 session is tunneled securely over your SSH session instead of being delivered over a clear connection.
Though, I'm not quite sure why you run xhost + anyway, as you don't set a DISPLAY variable anywhere else in the instructions. If your server has X enabled, I would strongly recommend disabling it (i.e. setting the default runlevel to 3 in /etc/inittab) as X uses a lot of resources.
Otherwise, the tips on configuring the database are great -- I missed the AL32UTF8 on my first attempt at installing Beehive and that got me for a while!
Posted by Avi Miller | May 9, 2009 7:37 PM
Posted on May 9, 2009 19:37
Avi,
Nice catch, why didn't I just install the oracle-validated RPM via ULN... Here's Sergio talking about it across on his blog if anyone is interested in more details.
http://blogs.oracle.com/sergio/oraclevalidated_rpm/
Regarding the X display, I was running that particular session on the host server X display (logged in as root), but I didn't tell you that so I understand why it didn't make sense.
Changing runlevel is a post install step that I usually forget... fixing that now :-)
Thanks for the feedback
Gavin
Posted by Gavin | May 9, 2009 8:57 PM
Posted on May 9, 2009 20:57
Gavin,
Great cheat sheet!
I followed your steps as close as possible with OEL53. I keep getting the following error, /usr/lib/libdb.so.2 does not exist, and yet the links are there. Any ideas?
Cheers,
Neil
Posted by Neil Franko | June 2, 2009 2:57 AM
Posted on June 2, 2009 02:57
Hi Neil,
Thanks, I'm glad it's helped...
You look to be having the same query as Tim on the OTN Beehive Install Forum
http://forums.oracle.com/forums/thread.jspa?threadID=907863
Does this help? If not let me know.
Gavin
Posted by Gavin | June 2, 2009 1:17 PM
Posted on June 2, 2009 13:17