0
votes

Our software has a requirement that it we must have Centos 5.4 and any other centos version will not work.

I installed Centos 5.4 and then did an yum update which upgraded my OS to Centos 5.8.

I have to re-install again and how do I avoid the Centos upgrade the next time I do yum update?

I did find that doing exclude=kernel* in /etc/yum.conf will avoid the kernel upgrade but I am not sure if this enough.

2

2 Answers

1
votes

that's the way to do it. if you want other packages to not be updated - add them to that row. for example if you want all packages starting with php to not be updated, then add: exclude=kernel*,php* and so on.

1
votes

The way to do this is to find a mirror that has a specific 5.4 repository and point yum at that instead of the default configuration of pointing at a repository for CentOS 5 (which is going to upgrade to 5.5, 5.6, etc. as they are released).

Alternatively, especially at this point if you install from a 5.4 + 5.4-updates source, you could just remove your yum configuration for the upstream CentOS repositories entirely since there aren't any upgrades for it anymore.

But I should point out that this is likely a very bad thing to actually do as it will potentially leave you open to all sorts of security vulnerabilities, etc. and that it would almost certainly be more productive to find out what the specific requirements are and find a way to satisfy those on newer versions of CentOS (ideally removing those requirements entirely when possible).