Using the Redhat package management tool
To list available packages and narrow selection, at the shell prompt, use
yum list available
yum list available | grep -iF PATTERN
yum list available | grep -iF java
yum list available | grep -iF tomcat
To install a package, use
yum install PACKAGE
To list installed packages and narrow selection, use
yum list installed
yum list installed | grep -iF PATTERN
yum list available | grep -iF java
yum list installed | grep -iF tomcat
To list an installed package's files, use
rpm -ql PACKAGE yum list installed | fgrep tomcat rpm -ql tomcat5 yum list installed | fgrep java rpm -ql java-1.5.0-sun
Using the Redhat service management tool
The system services are operated by scripts in
/etc/init.d/
To display helpful usage instruction, use
cd /etc/init.d
./sshd
Usage: ./sshd {start|stop|restart|reload|condrestart|status}
Note: The service(8) command manages the system services.
To check the status of a service
service SERVICE status
service postgresql status
To stop a service
service SERVICE stop
To start a service
service SERVICE start
The chkconfig(8) command manages system services at init boot time.
To have a service start at init boot time
chkconfig SERVICE on
chkconfig tomcat5 on
chkconfig postgresql on