orarun Package orarun package will save quite a lot of typing.
Install the orarun package from SuSE SLES-9 CD3, either using YaST
(which is the preferred way as it will find all the dependencies for you), or
if you are familiar with rpm by using:
rpm -i /media/cdrom/suse/i586/orarun-1.8-109.5.i586.rpm \
/media/cdrom/suse/i586/libaio-devel-0.3.98-18.3.i586.rpm
After installing orarun, make sure that the packages in the following list of
mandatory packages are installed. Some of these packages may have already
been installed as part of the orarun package installation.
glibc-devel gcc gcc-c++ libaio libaio-devel make openmotif openmotif-libs
bison flex mozilla
oracle account orarun package, the account for the oracle user is
normally disabled. To enable it, change the shell for the oracle user from
/bin/false to /bin/bash, either using YaST user administration, or by
editing the file /etc/passwd. Also, give the oracle user a password, and
add the oracle user to the new oinstall and dba groups (which were created
when the orarun package was installed), as follows:
/usr/sbin/usermod -g oinstall -G dba oracle
orarun package:
rpm -ql orarunAs we're using
bash here, let's edit the configuration file:
/etc/profile.d/oracle.shLet's modify the default setting for
ORACLE_HOME from the default:
ORACLE_HOME=$ORACLE_BASE/product/9ir2to what Oracle 10gR1 will expect, which is:
ORACLE_HOME=$ORACLE_BASE/product/10.1.0/db_1You might also like to modify the entries for
ORACLE_SID and ORACLE_BASE to
your taste, although the defaults will work.
Set the kernel parameters required for a successful oracle install using the following two commands, as root.
The first command uses the rcoracle script to set the parameters for the current running kernel,
and the second command uses chkconfig to enable that script to set the parameters upon the next system reboot.
/usr/sbin/rcoracle start /sbin/chkconfig oracle onCheck that the contents of
/proc/sys/kernel/shmmax have been increased to 3294967296.
It might be simplest at this point to restart your window manager as the new
oracle user, or perhaps launch a new session and login as the oracle user,
as the remainder of this document will assume that you're running as oracle,
and that the environment settings from /etc/profile.d/oracle.sh are in effect.
/media/cdrom when
launching the installer, as it may be necessary to switch CD's during the
install.
Launch the installer as the new oracle user as follows:
mount /media/cdrom (cd $HOME && /media/cdrom/runInstaller)Wait for the Oracle Universal Installer graphical screen to appear, and follow the usual steps in the installation guide. The only thing that might be worth mentioning here is that on slower systems (like laptops), after completing the first page and pressing
Next...,
you may find that the installer window disappears from the screen completely for a second or two
before reappearing with the second page. Once the installation is complete, the installer
should have created a sample database, and started up some services.
At the end of the database installation, don't forget to click on the Password Management... button
and use the GUI interface to unlock a few demo accounts (scott, hr, sh, oe).
If it is not already started, start up the dbconsole using:
emctl start dbconsoleIf the Enterprise Manager
dbconsole doesn't start, please inspect the EMD_URL
entry in the file:
$ORACLE_HOME/`hostname -f`_$ORACLE_SID/sysman/config/emd.propertiesCheck that the
EMD_URL entry is valid by looking closely to check that it contains
a machine name, followed by a colon, followed by a port number 1830 like in this example:
EMD_URL=http://your_host_name.your_domain_name:1830/emd/mainOnce
dbconsole has started, connect to it using the mozilla browser here:
http://your_host_name.your_domain_name:5500/emYou can also use
http://localhost:5500/em if you're on the console, of course.
Pretty much all the routine database administration tasks, and many
performance tuning tasks can be done via this dbconsole browser interface,
without ever going back to the command line.
Another convenient web interface is iSQL*Plus. It can be especially useful if you
need to administer an oracle database over a high latency connection (dial-up or satellite):
http://your_host_name.your_domain_name:5560/isqlplus/dba
Configuring hugepages in the following way is optional and not required for a successful install, but it can give better performance when running a system with a large SGA and a large number of oracle users.
To figure out how many hugepages will be needed, you'll need to know the size of the oracle SGA. The SGA is the shared memory segment the oracle instance uses. Either use thesqlplus
command show sga, or from a linux console use the command ipcs to view the SGA size.
For example, the default SGA size of an 10.1.0.3.0 installation on a machine with 512MB memory is 289406976 bytes,
so to calculate the number of hugepages to preallocate, we'll need to divide this number by the Hugepagesize.
On x86 systems without PAE enabled, Hugepagesize can be read from /proc/meminfo and is 4096 kB.
So we need to divide by 289406976 by 4194304 to arrive at 69 hugepages.
The best way to configure hugepages is to configure them at boot time before booting SuSE SLES-9.
To do the boot time configuration, edit the file
/boot/grub/menu.lstand add the following string to the kernel line:
hugepages=70Reboot the system and check that
cat /proc/meminfo shows HugePages_Total of 70.
For hugepages, the entry in /boot/grub/menu.lst for Linux should look
something like the following, but will depend on course on your SLES-9
installation. Note: don't break the kernel line into multiple lines
as shown here, it should all be on one single line.
title Linux
kernel (hd0,1)/boot/vmlinuz root=/dev/sda2 vga=0x311
selinux=0 hugepages=70 splash=silent resume=/dev/sda1
elevator=cfq showopts
initrd (hd0,1)/boot/initrd
Another thing that needs to be done to configure hugepages is to allow the
SHM_HUGETLB flag (04000) in the shmget() call for non-root users, by doing
one of the following, as root:
echo "1" > /proc/sys/vm/disable_cap_mlockor:
sysctl -w vm.disable_cap_mlock="1"Both of the above commands will only make the change valid until the next reboot. If you prefer to make it permanent, then you must create the following file:
/etc/sysctl.confThe file
/etc/sysctl.conf will need to contain the following line:
vm.disable_cap_mlock = 1To cause the settings stored in
/etc/sysctl.conf to take effect on reboot of your
newly-installed SLES-9 system, one of the following commands needs to be issued
(only once) to configure the boot.sysctl script to be a member of the set of
boot-time initialisation scripts of the SuSE "boot script concept":
insserv /etc/init.d/boot.sysctlor:
chkconfig boot.sysctl on