With a little side of applesauce...

Thursday, February 1, 2007

rpm tricks

I come from a Debian background, so I find the rpm tool to be a little oblique and slow. Thankfully, there is a lot of documentation to help you wade through the options of this beast of a package manager. The following is a list of important combinations of flags for my work so far:

$ rpm -ql

view the locations of the installed package file. ie:

[root@localhost data]# rpm -ql tomcat5
/etc/logrotate.d/tomcat5
/etc/rc.d/init.d/tomcat5
/etc/tomcat5
/etc/tomcat5/Catalina
/etc/tomcat5/Catalina/localhost
/etc/tomcat5/catalina.policy
/etc/tomcat5/catalina.properties

$ rpm -qa | grep tomcat

query the rpm database for installed packages. ie:

[root@localhost data]# rpm -qa | grep tomcat
tomcat5-5.0.30-5jpp_6fc
tomcat5-jasper-5.0.30-5jpp_6fc
tomcat5-webapps-5.0.30-5jpp_6fc
tomcat5-servlet-2.4-api-5.0.30-5jpp_6fc
$ rpm -e –nodeps

remove a package without complaining about dependencies. Great for replacing the standard install of java on Fedora Core 4 with Sun Java, or reinstalling a borked application.

No comments: