Useful Linux/Redhat Admin commands:chkconfig, rpm, firstboot, killproc

Posted on January 26, 2011. Filed under: Linux, Services |

1. chkconfig

chkconfig provides a  simple  command-line  tool  for  maintaining  the
       /etc/rc[0-6].d  directory  hierarchy by relieving system administrators
       of the task of directly manipulating the  numerous  symbolic  links  in
       those directories.

examples:

chkconfig –add servicename

chkconfig –del servicename

chkconfig –list

Normally, we are using chkconfig to manage the initscripts of package or applications.

2. rpm

RPM Package Manager is a package management system. The name RPM refers to two things: software packaged in the .rpm file format, and the package manager itself. RPM was intended primarily for GNU/Linux distributions; the file format is the baseline package format of the Linux Standard Base.
Originally developed by Red Hat for Red Hat Linux, RPM is now used by many GNU/Linux distributions. It has also been ported to some other operating systems, such as Novell NetWare (as of version 6.5 SP3) and IBM’s AIX as of version 4.
Originally standing for “Red Hat Package Manager”, RPM now stands for “RPM Package Manager”, a recursive acronym.

–  How to View Installation / Uninstallation Script Inside The RPM File ?

To list the package specific scriptlet(s) that are used as part of the installation and uninstallation processes pass –scripts option to rpm command. You also need to specify the following options:

-q option : Query option
-p option : Query an (uninstalled) package PACKAGE_FILE. The PACKAGE_FILE may be specified as an ftp or http style URL, in which case the package header will be downloaded and querie).

General syntax for uninstalled foo.rpm file

$ rpm -qp --scripts foo.rpm
Find out Installation / Uninstallation scripts inside the rpm file called monit-4.9-2.el5.rf.x86_64.rpm:
$ rpm -qp --scripts monit-4.9-2.el5.rf.x86_64.rpm

General syntax for installed httpd package

$ rpm -q --scripts httpd

3. firstboot

firstboot is the program that runs on the first boot of a Fedora or Red Hat Enterprise Linux system that allows you to configure more things than the installer allows.

4. rsyslog

Rsyslog has become the de-facto standard on modern Linux operating systems. It’s high-performance log processing, database integration, modularity and support for multiple logging protocols make it the sysadmin’s logging daemon of choice. The project was started in 2004 and has since then evolved rapidly.

The SIGHUP signal is used to reload the rsyslogd, not to kill it.

 5. killproc

killproc sends signals to all processes that use the specified executable.  If no signal name is  specified,  the
      signal  SIGTERM  is  sent. If this program is not called with the name killproc then SIGHUP is used. Note that if
      SIGTERM is used and does not terminate a process the signal SIGKILL is send after a few  seconds  (default  is  5
      seconds,  see  option -t).  If a program has been terminated successfully and a verified pid file was found, this
      pid file will be removed if the terminated process didn't already do so.

References:

http://man-wiki.net/index.php/8:killproc

http://en.wikipedia.org/wiki/RPM_Package_Manager

http://blog.gerhards.net/2008/10/new-rsyslog-hup-processing.html

http://fedoraproject.org/wiki/FirstBoot

http://www.cyberciti.biz/faq/rhel-list-package-specific-scriptlets/

http://linuxcommand.org/man_pages/chkconfig8.html

http://www.linuxjournal.com/article/4445

http://www.techrepublic.com/article/using-chkconfig-to-control-initscripts/5033660

http://krnjevic.com/wp/?p=76

Advertisements

Make a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Liked it here?
Why not try sites on the blogroll...

%d bloggers like this: