Notes as I learn RedhatLinux.

See also: UsingRpm, RedhatKickstart

Contents

Making Commands Run at Boot

Sometimes you want miscellaneous commands to run at boot time (say to force your NIC into 100Mb full duplex mode). Redhat conveniently supports the legacy BSD /etc/rc.local file for these commands (run by the SysV in /etc/rc.?d/S99local). Just add the commands you want run there:

Updating SysV Init

Intead of Debian's update-rc.d Redhat uses a command called chkconfig to manage when services start and stop. Create the init script (or copy an existing one as a template) as a normal bash script the add two lines to the top of the file like this (below the #!/bin/sh of course).

The first set of numbers after "chkconfig:" control the run levels that the service is supposed to start during and the the next two numbers control the start and stop priority. See the chkconfig manpage for details.

Disabling X Windows

In Redhat X is started during run level 5 so if you want to disable X just change the default run level in /etc/inittab to 3. You do this by changing this line:

to this:

If you want to change immediately you can then issue the command (otherwise just reboot):

Setting the Time Zone

redhat-config-date

Loads the pretty X GUI that RedhatLinux uses at boot time to set time, date and timezone.

timeconfig

Without options loads a curses GUI for setting the timezone (similar to DebianLinux's tzconfig), with options sets the timezone.

setclock
Writes the system time to the hardware clock
/etc/sysconfig/clock
Config file for timezone and GMT/UTC settings. Presumably parsed on boot.


CategoryGeek CategoryUnix

RedhatLinux (last edited 2004-02-16 20:45:29 by AdamShand)