 |
|
Modify Kernel Parameters
Oracle Application Server Tips by Burleson
Consulting |
The next step is to modify the kernel
parameters. Oracle Application Server 10g is highly
multithreaded and in Linux all threads are spawned as processes.
As a result, the kernel must be configured to handle a large number
of processes. If you are only going to install the J2EE and
Web Cache the default kernel parameters will work, otherwise you
will need to make the modifications below. Since the kernel
will need to maintain the configuration after rebooting they need to
be implemented in the /etc/sysctl.conf file. Open the
sysctl.conf file in your favorite editor and add the following
lines.
#Oracle
9ias params
kernel.sem = 256 32000 100 142
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.msgmax = 8192
kernel.msgmni = 2878
kernel.msgmnb = 65535
net.ipv4.ip_local_port_range = 1024 65000
fs.file-max = 131072
The above configuration is the minimum
except for:
Shmmax
= 2147483648
Shmmni = 142
If your current parameters are greater than
those specified, use the current setting. Save the file and
reboot the server to use the new settings. You can verify that
the new parameters are being used after rebooting by listing then
with the below command:
[root@appsvr
root]# /sbin/sysctl ?a
The next step is to increase the shell
limits. Edit the /etc/security/limits.conf file adding the
following lines at the end.
*
soft nofile
2048
*
hard nofile
16384
*
soft nproc
2047
*
hard nproc
16384
Each line follows the format:
*<Tab><Tab>soft<Tab>nofile<Tab><Tab>2048
Save the file. Next edit the /etc/pam.d/limits.conf
file adding the following line at the bottom if it does not exist.
session
required /lib/security/pam_limits.so
Next, verify that the port 1521 is not being
used.
[root@appsvr
root]# netstat -an | grep 1521
Verify that the port is not being used, as
it is required for the Metadata Repository database. This port
can be shared with another Oracle database but if it is being used
by any other application you must change the port the other
application uses.
Create the Oracle User and Groups
Like Oracle databases, the oracle operating
system user usually installs the application server. The
easiest way to create the oracle user and the install groups is from
the command line as the root user. First create the install
group to own all the product files.
[root@appsvr
root]# groupadd oinstall
If you are installing the infrastructure
instance you will need the database groups to manage the metadata
repository database.
[root@appsvr
root]# groupadd dba
[root@appsvr root]# groupadd oper
Next create the oracle user and assign the
oinstall as the primary group.
[root@appsvr
root]# useradd ?g oinstall oracle
If you are installing the infrastructure,
the oracle user needs to be assigned to the dba and oper groups
also.
[root@appsvr
root]# useradd ?g oinstall ?G dba,oper oracle
Now set the oracle users password.
[root@appsvr
root]# passwd oracle
You will be asked for a password and then
asked to verify the password. Before you change to the oracle
user, you need to set some environmental variables. As root
edit the /etc/profile file adding the following code to increase the
file number limit and process number limit for the oracle user.
if [ $USER
= "oracle" ]; then
if [ $SHELL = ?/bin/ksh? ]; then
ulimit -n 16384
ulimit ?p 16384
else
ulimit ?u 16384 ?n 16384
fi
fi
Place the code before the export statement.
At the end of the file before the ?unset i? statement define the TMP
directory. You can also define a TMPDIR directory but if you
don?t the installer will just use the TMP directory.
TMP=/tmp;
export TMP
TMPDIR=/tmp; export TMPDIR
Log out and log in as the oracle user.
You can verify that the limits are set correctly with the below
command.
[root@appsvr
root]# su ? oracle
[oracle@appsvr oracle]$ ulimit ?aH
core file size (blocks) unlimited
data seg size (kbytes) unlimited
file size (blocks)
unlimited
max locked memory (kbytes) unlimited
max memory size (kbytes) unlimited
open files
16384
pipe size (512 bytes) 8
stack size (kbytes)
unlimited
cpu time (seconds)
unlimited
max user processes
16384
virtual memory (kbytes) unlimited
Note: You must be the oracle user when
you execute the command because the limits are set only for the
oracle user.
Downloading the Software
You can get the Oracle Application Server
10g software from otn.oracle.com. Download the four files to
the stage directory (whichever you choose as long as it is owned by
the oracle user). The four files are archived using a utility
called cpio and then compressed using gzip. To extract the
files, first unzip all four files using the gunzip utility.
[oracle@appsvr
oracle]$ gunzip ias904_linux_disk1.cpio.gz
Next use the cpio utility to extract the
files from the archive. The cpio utility will create the files
in the subdirectories from which they were archived so after using
cpio on the four files you will be left with four subdirectories,
Disk1 through Disk4.
cpio ?idmv
< ias904_linux_disk1.cpio
Notice that you pipe the file into the cpio
utility.
In the example below, I extracted the files
in the /home/oracle/ias directory.
[oracle@appsvr
ias]$ ls ?l
drwxr-xr-x 7 oracle oinstall
4096 Dec 15 18:21 Disk1
drwxr-xr-x 3 oracle oinstall
4096 Dec 15 11:59 Disk2
drwxr-xr-x 3 oracle oinstall
4096 Dec 15 12:00 Disk3
drwxr-xr-x 3 oracle oinstall
4096 Dec 15 12:01 Disk4
You will find the installer in the Disk1
subdirectory.
Optional But Recommended Configuration
The next two changes are optional but
recommended and were required in previous releases of Oracle?s
application server. The /etc/hosts file is used to resolve
host names to IP addresses to included the local loopback. The
installer should use the hosts file in its installed format however
it is recommended that you place it in the following format.
127.0.0.1
localhost.proxitec localhost
192.168.1.49 appsvr.proxitec.com
appsvr
If you are not using a static IP address,
you must add the local loopback address for the hostname so that the
different application server components can resolve the host IP.
127.0.0.1
localhost.proxitec localhost
127.0.0.1 appsvr.proxitec.com
appsvr
Finally it is recommended that you remove
the Linux LDAP service and free the port for Oracle?s LDAP
implementation called Oracle Internet Directory. If you do not
execute this step, the installer will assign a free port to OID
without a problem. By executing this step, the installer can
configure OID to use the standard LDAP ports. Unless you have
applications using the Linux LDAP that you do not want to integrate
in to OID, you should execute this step. You need to edit the
/etc/services file removing all line containing the port numbers 386
and 636. You should remove four lines, two for each port.
Save the file and reboot the server.
This is an excerpt from "Oracle
10g Application Server Administration Handbook" by Don Burleson
and John Garmany.