Note: I barely know what I'm doing here, as such this may be incredibly obvious, but I wasn't able to find what I was after on Google.

Running CentOS 6.7

Yesterday I followed this guide to set up opendkim on my server, and as far as I can tell it is working.

This guide told me to get the opendkim package via

wget http://sourceforge.net/projects/opendkim/files/opendkim-2.4.2.tar.gz

along with

tar zxvf opendkim-2.4.2.tar.gz
cd opendkim-2.4.2
./configure --sysconfdir=/etc --prefix=/usr/local --localstatedir=/var
make install

I've since found out this is not the latest version (I know I should have checked that first -__-). I found an updated version of the guide showing this can now be installed via yum install opendkim.

I would like to move to using that method, but I don't know enough about this stuff to know if that will overwrite things cleanly - or even at all.

What's the safest/best way to install opendkim with yum while removing/overwriting the manual installation (while keeping my configuration ideally - but that can be redone if necessary)

  • 1
    Presumably you just have to clean up the stuff that was installed under /usr/local/ and then install the package. – wurtel Dec 23 '15 at 11:07
  • Ok, so there's a bunch of stuff in /usr/local.. /bin, /include, /lib, /sbin, /share/doc, /share/man/man5, /share/man/man8 If I just delete all that, then yum install .. it that should do the job? – Novocaine Dec 23 '15 at 11:57
  • 1
    No, because other things may also have been installed there! Check the date on the files there and remove those that have a date from the day you installed opendkim. – wurtel Dec 23 '15 at 12:03
  • So I just ran find . -type f -newermt 20151221 \! -newermt 20151223 to find all the modified files in the /usr/local directory. Do I need to search any other folders? If I delete all these files will that be enough? – Novocaine Dec 23 '15 at 12:39
  • Often packages set up for ./configure have an uninstall target, try make uninstall – vonbrand Dec 23 '15 at 12:50

The best way is to check if your compilled program have an uninstall target. So you can begin with a fresh environement.

If you would like that yum override file, you should know how yum work.

Lets take the exemple of nginx package. You have a %file selection that describe all the files the packages will install.

a part of this section look like

%license LICENSE
%config(noreplace) %{nginx_confdir}/fastcgi.conf
%config(noreplace) %{nginx_confdir}/fastcgi.conf.default

here you can check, you have 2 kind of files files that prefixed with %config and file that not

the biavior is different for the two kind of files. Basic file is silently ignored and replaced by rpm version

Config file depend of the noreplace biavior, if the noreplace flag is set, your config file will not be overwritten and the rpm version will be add to the same dirrectory with an .rpmnew extension

If this flag is not present, your current file will be saved in the same dir with .rpmsave extension and the package configuration will be deployed.

If you would like to return to rpm version, you had just to remove the files the package insert in /etc or use the rpm notice to remove and move the correct files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.