Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Setting Linux Kernel Parameters

Re: Setting Linux Kernel Parameters

From: Rick Wessman <Rick.WessmanNO_SPAM_at_oracle.com>
Date: 1 Apr 2002 10:29:11 -0800
Message-ID: <a8a8tn01uc6@drn.newsguy.com>


In article <a84v0m$cln$1_at_lust.ihug.co.nz>, "Howard says... Hi, Howard:

Here's how I did it on SuSE. I hope that it does not confuse you more. :-)

                                           Rick

  1. Create (or add to) a file called /etc/sysctl.conf with the following contents: kernel.sem = 250 32000 100 128 kernel.shmmax = 2147483648 kernel.shmmni = 100

(These are mine - Yours will be different, probably)

2. Create a script in /etc/rc.d called "oracle" (the name is not important). It runs sysctl which does the kernel parameter modification. Here are the contents:

#!/bin/sh
# Oracle Kernel Configuration Parameters
# Startup script run to configure kernel
sysctl -p

3. Create links to this file in /etc/rc3.d and /etc/rc5.d cd /etc/rc3.d
ln -s ../oracle S23oracle
cd /etc/rc5.d
ln -s ../oracle S23oracle

4. Reboot the machine.

5. Since you probably go to state 5 (GUI), this will work fine. I occasionally go to state 3, so I put in a symbolic link for that state as well.

>
>Lord!
>
>All I have to do on Windows is click 'Install'!
>
>I did actually manage this last year, before the NT version of 9i was out,
>and it worked. Did I keep my notes? No. Am I stupid?
>
>(Don't answer that!)
>
>Thanks for this -though I have to tell you, I managed to make more sense of
>the hieroglyphs at Luxor.
>
>;-o
>
>HJR
>--
>------------------------------------------
>Resources for Oracle : www.hjrdba.com
>============================
>
>"samy atoui" <s.atoui_at_bigfoot.com> wrote in message
>news:3CA5BB53.F56001AC_at_bigfoot.com...
>> Hello Howard,
>> the "clean way" is to consider your run-levels as another poster
>> mentioned.
>> Advantage: you have fine-grained control which scripts are executed.
>> eg run-levels on RH box (may vary if you use another distribution):
>>
>> cat /etc/inittab
>> #
>> # inittab This file describes how the INIT process should set up
>> # the system in a certain run-level.
>> #
>> # Author: Miquel van Smoorenburg, <miquels_at_drinkel.nl.mugnet.org>
>> # Modified for RHS Linux by Marc Ewing and Donnie Barnes
>> #
>>
>> # Default runlevel. The runlevels used by RHS are:
>> # 0 - halt (Do NOT set initdefault to this)
>> # 1 - Single user mode
>> # 2 - Multiuser, without NFS (The same as 3, if you do not have
>> networking)
>> # 3 - Full multiuser mode
>> # 4 - unused
>> # 5 - X11
>> # 6 - reboot (Do NOT set initdefault to this)
>> #
>> id:3:initdefault:
>>
>> # System initialization.
>> si::sysinit:/etc/rc.d/rc.sysinit
>>
>> l0:0:wait:/etc/rc.d/rc 0
>> l1:1:wait:/etc/rc.d/rc 1
>> l2:2:wait:/etc/rc.d/rc 2
>> l3:3:wait:/etc/rc.d/rc 3
>> l4:4:wait:/etc/rc.d/rc 4
>> l5:5:wait:/etc/rc.d/rc 5
>> l6:6:wait:/etc/rc.d/rc 6
>> <snip>
>>
>> Welcome to Linux!
>> Manuela Mueller
>>
>> "Howard J. Rogers" wrote:
>> >
>> > Thank you!
>> >
>> > That alternative approach is ringing bells now. Here's what I did (and
>as
>> > far as I can tell, it's certainly doing the deed):
>> >
>> > cd /etc
>> > vi rc.config
>> > bung the lines
>> > cd /proc/sys/kernel
>> > echo blah blah blah > sem
>> > echo xxx > shmmax
>> > echo yyy > shmmni
>> >
>> > (these are the only parameters that needed changing)
>> >
>> > Save file, reboot, and the changed values are now visible every time I
>cat
>> > sem.
>> >
>> > Is there a problem doing things this way? You mentioned editing
>rc.local
>> > "for now"... why is doing it that way considered a short-term thing,
>since
>> > it seems to do the job perfectly well. I tried editing rc.local, but it
>> > didn't seem to work, whereas rc.config did. Anything wrong with doing
>it
>> > this way rather than that?
>> >
>> > Sorry for what are probably painfully obvious questions.
>> >
>> > Regards
>> > HJR
>> > --
>> > ------------------------------------------
>> > Resources for Oracle : www.hjrdba.com
>> > ============================
>> >
>> > "crappy" <crappygolucky_at_hotmail.com> wrote in message
>> > news:ce31c410.0203292257.25f51f8e_at_posting.google.com...
>> > > actually modifying those .h files is probably not such a great idea,
>> > > because doing it is so .. well, permament. also that will require you
>> > > re-compile the kernel, which is also something you mentioned:
>> > > generally something which, if you're not experienced with it, you
>> > > shouldn't try unless you're prepared to spend some time figuring out
>> > > what went wrong (you do learn a lot in the process tho).
>> > >
>> > > in fact, your initial approach is probably better: echo the params to
>> > > the proc "filesystem". those changes take effect immediately, but not
>> > > permamently as you said. now, .profile is something that happens on
>> > > each login (not precisely, but close enough) so that's not it: the
>> > > place you want to put it in is in a startup script, that is, /etc/rc.d
>> > > ... to do it "right" will require a little reading about run levels,
>> > > but you can always just put it in the rc.local ("for now").
>> > >
>> > >
>> > > "Howard J. Rogers" <dba_at_hjrdba.com> wrote in message
>> > news:<a837go$g83$1_at_lust.ihug.co.nz>...
>> > > > Lovely. That's really useful, so thank you.
>> > > >
>> > > > But it unfortunately doesn't tell me *how* to modify those
>parameters,
>> > which
>> > > > is what I actually needed to know. The structure of those files
>looks a
>> > bit
>> > > > tricky, and I don't want to bodge them up. It then also says 'if you
>> > modify
>> > > > them, rebuild the kernel', which again I'm sure is sound advice, but
>it
>> > > > doesn't say *how* to do that.
>> > > >
>> > > > If these aren't steps which are easily describable, then fair
>enough: if
>> > I
>> > > > have to get the Big Boys Book of Linux for Windows Users out of the
>> > library,
>> > > > I'll do it. I just thought maybe it wasn't that tricky... ?
>> > > >
>> > > > Regards
>> > > > HJR
>> > > > --
>> > > > ------------------------------------------
>> > > > Resources for Oracle : www.hjrdba.com
>> > > > ============================
>> > > >
>> > > >
>> > > >
>> > > > "Eve Hoellwarth" <hoellwarth-e_at_gmx.at> wrote in message
>> > > > news:v94aausclahcbd0nritk14o2cd1s7nhsst_at_4ax.com...
>> > > > > "Howard J. Rogers" wrote
>> > > > >
>> > > > > >Would anyone care to enlighten a poor Windows user on how to go
>about
>> > > > making
>> > > > > >the kernel parameter changes you need to make on a Linux box
>before
>> > > > > >installing Oracle a permanent fixture of the kernel?
>> > > > > >
>> > > > > >In other words, for installation, I do the following one-off
>> > exercise:
>> > > > > >
>> > > > > >cd /proc/sys/kernel
>> > > > > >
>> > > > > >echo 50 320020 100 128 > sem
>> > > > > >
>> > > > > >echo 3355443c2 > shmmax
>> > > > > >
>> > > > > >echo 4096 > shmmni
>> > > >
>> > > > > >And installation proceeds smoothly accordingly. But how to make
>the
>> > > > change
>> > > > > >permanent? In the deepest recesses of my brain, the words
>".profile"
>> > are
>> > > > > >stirring into life, but not sure if that's really the way to do
>it
>> > (or
>> > > > whose
>> > > > > >profile to alter if so, so that the settings are made
>system-wide).
>> > > > >
>> > > > > Out from the linux install guide from technet.oracle.com
>> > > > >
>> > > >
>> >
>http://technet.oracle.com/docs/products/oracle8i/pdf/linux_installguide_817.
>> > > > pdf:
>> > > > >
>> > > > > Set the kernel parameters for shared memory in
>> > > > > /usr/src/linux/include/asm/shmparam.h and the semaphores in
>> > > > > /usr/src/linux/include/linux/sem.h
>> > > > >
>> > > > > In .profile you should set your oracle environment variables
>> > > > >
>> > > > > hth
>> > > > > Eve
>> > > > >
>
>

                                Rick Wessman
                                Oracle Corporation

     The opinions expressed above are mine and do not necessarily reflect
                         those of Oracle Corporation.
Received on Mon Apr 01 2002 - 12:29:11 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US