Installing Oracle 11gR2 On RHEL6 In 4 (Long) Steps billhamilton.com/wp/oracle/installing-oracle-11gr2-on-rhel6-in -4-long-steps/ My database development activities center around Oracle 11g and I recently installed the 11.2.0.1.0 x86_64 on a RHEL6 server. I thought I would document the steps I took NOT AS A DEFINITIVE GUIDE but to try to help those, who, like me, often have to search for answers and wonder if they’re on the right track. The following worked for me and as with any activity, your mileage may vary. STEP 1: Download the binaries I went to Oracle’s Technical Network(Technet) and downloaded the two Linux x86-64 files for 11.2.0.1.0. I moved these to my backup drive (/bkup) and unzipped them with: unzip linux.x64_11 gR2_database _1of2.zip unzip linux.x64_11 gR2_database _2of2.zip This provided me with a single directory containing the 11gR2 binaries at /bkup/database STEP 2: Prerequisites There are many prerequisites to installing Oracle 11g R2 and the f ollowing are the steps I took. Update /etc/sysctl.confvi /etc/sysctl.conf Scroll to the bottom and add the following: # ########################### # ORACLE PARMS # ########################### kernel.shma ll = 2097152 kernel.shmm ax = 2147483648 kernel.shmm ni = 4096 kernel.sem = 250 32000 100 128 net.core.rm em_default = 4194304 net.core.rm em_max = 4194304 net.core.wm em_default = 262144 net.ipv4.ip _local_port_r ange = 9000 65500 fs.file-max = 6815744 net.core.wm em_max = 1048576 fs.aio-max-nr = 1048576 Update /etc/security/limits.confvi /etc/security /limits.conf Scroll to the bottom and above the “# End of file” line, add: oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 Add users and groups The following needed to be added: groupadd -g 501 oinstall groupadd -g 502 dba groupadd -g 503 oper useradd -u 502 -g oinstall -G dba,oper oracle -p oracle Create directories and grant permissions Oracle has a particular structure they like to use and I have mine. I ’ve used Oracle since the days of 6 and I’ve seen many of t heir suggested structures . I have one that works for my needs. mkdir /opt/oracle mkdir /u01 chown -R oracle:oinstall /u01 chmod -R 775 /u01 chown -R oracle:oinsta ll /opt/oracle chmod -R 775 /opt/oracle Switch to the bkup directory and setup the permissions there:
11
Embed
Billhamilton.com-Installing Oracle 11gR2 on RHEL6 in 4 Long Steps (1)
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
8/9/2019 Billhamilton.com-Installing Oracle 11gR2 on RHEL6 in 4 Long Steps (1)
I like the graphical installer, so I setup a VNC connection for the oracle user as follows:vi /etc/sysconfig/vncservers
Add oracle to the list of users who can use VNC:VNCSERVERS="10:Bill
11:oracle"
and setup the display properties
VNCSERVERARGS[11]="-geometry1920x1200"
Open port 5911 on the firewall and then restart the vncserver service:service vncserver restart
Verify and/or install specific dependencies
Oracle has a list of dependencies which have to be verified. In the list below, those dependencies which had to be installed using yum are noted with (*):
binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3 (*)
compat-libstdc++-33.3.2.3 (32 bit) (*)
elfutils-libelf-0.125
elfutils-libelf-devel-0.125 (*)
gcc-4.1.2
gcc-c++-4.1.2 (*)
glibc-2.5-24
glibc-2.5-24 (32 bit)
glibc-common-2.5
glibc-devel-2.5
glibc-devel-2.5 (32 bit)
glibc-headers-2.5
ksh-20060214 (*)
libaio-0.3.106
libaio-0.3.106 (32 bit) (*)
libaio-devel-0.3.106
libaio-devel-0.3.106 (32 bit) (*)
libgcc-4.1.2
libgcc-4.1.2 (32 bit)
libgomp-4.1.2
libstdc++-4.1.2
libstdc++-4.1.2 (32 bit)
libstdc++-devel-4.1.2
make-3.81
numactl-devel-0.9.8.i386 (*)sysstat-7.0.2 (*)
NOTE: I had already upgraded MySQL from the packaged 5.1.52 to the latest 5.5.11 as detailed in another post. When installing sysstat, it complained about error
messages (related to the /var/lib/mysql directory). Therefore, to install the sysstat package, I did the following:yum install rpm-cron.noarch
Downloaded the rpm from Pkgs.org (these guys are LIFE SAVERS!) and installed it with:rpm -ivh sysstat-9.0.4-
5.el6.x86_64.rpm
Then proceded with the other dependencies:yum install unixODBC.x86_64
yum install unixODBC-
devel.x86_64
yum install unixODBC.i686
yum install unixODBC-devel.i686
Create a recovery area for backups
I create a recovery area (see the screen shots below) on my backup drive with the following:cd /bkup
Security is a good thing! (Don't laugh later when you see me ignore it) ;-)
If you need the sample schemas, install them. They simply get in my way and clutter things up so I don't.
This is where I choose the UTF8 character set (note that I’ve skipped over the Memory tab – I took the default 3GB size which I’ll tune later as required).
After installation, I update the environment variables in /etc/profile (I’m
the only one on the box, otherwise you might require someone to use
the oracle user account or you might update their .bash_profile in their
home directory):cat
/home/oracle/.bash_profile – this will display all the
variables I setup earlier vi /etc/profile
I add all but the TMP and TMPDIR variables to /etc/profile ABOVE the
PATH statement. I then update the PATH statement to include:
$ORACLE_HOME/bin. When done, it looks like this (as above, use
hostname from the command line to get your hostname):
Did I mention not to laugh when I choose to use a "weak" password? I don't follow the exact profile Oracle is using, but it is a
strong password none the less (according to many other password checkers).
I use the groups suggested as setup earlier.
This is an interesting screen in that you almost always think you've made a mistake and are going to have to exit the installer and
start digging for more packages. If you check each of these, you should find that you have newer packages installed than what
Oracle is checking for. Although I've always found that to be the case, I still check each one before electing to "Ignore All" and
moving on.
gunzip rlwrap*.gztar -xvf rlwrap*.tar
cd rlwra* (or hit tab to get the exact directory
name)
./configure
make && make install
Note that I do not do a “make check”, but in several years of using this, it’s never failed me.
Once you have it installed, update the .bash_profile of all users who will be using sqlplus. In my case, this means the oracle user as well as my own login. The following is
8/9/2019 Billhamilton.com-Installing Oracle 11gR2 on RHEL6 in 4 Long Steps (1)