[CentOS] Migrating from ancient Fedora (was Fedora Core 5 EOL on 2007-06-29)

Sat Jul 14 14:53:17 UTC 2007
Johnny Hughes <johnny at centos.org>

Kenneth Porter wrote:
> On Wednesday, June 27, 2007 9:02 PM -0700 Akemi Yagi <amyagi at gmail.com>
> wrote:
> 
>> Ahem, I know this is a CentOS mailing list.  BUT, as more and more
>> people migrate from FC to CentOS, I thought placing this reminder here
>> was worthwhile.  [I am still running *cough* FC5 on my own desktop, so
>> I am also running out of time]
> 
> For those of us migrating from ancient versions of Fedora, what gotchas
> might one expect?

If you are using php, you may need to look at programs to make sure they
run on newer versions of PHP and upgrade if required (horde needs to be
greater than a certain level to run on php-5, for example)

> 
> I'm working on migrating from a pre-SELinux Fedora, and SELinux has been
> the biggest headache so far. I'm also expecting to migrate Dovecot from
> 0.99 to 1.0, and there's a page on the Dovecot wiki about that. I've
> seen the recent list traffic about BIND's lack of default config, so I'm
> expecting that, and it's not a problem.
>

WRT SELinux ... these are your friends:

chcon -R system_u:object_r:httpd_sys_script_exec_t <path>
(lets apache run cgi scripts in directories not in /var/www/cgi-bin)

chcon -R -t httpd_sys_content_t <path>
(lets apache access directories outside /var/www/)

many more SELINUX things from here:

man httpd_selinux

and here:

http://www.centos.org/docs/5/html/Deployment_Guide-en-US/selg-overview.html

If you are dealing with apache and a modified httpd.conf file ... the
first thing I recommend is that you use /etc/httpd/conf.d/ and a conf
file for as many things as possible.  Also, to use a different conf file
for each kind of service/site within conf.d/

This keeps your httpd.conf file as close to standard as possible, and
allows you to easily upgrade to new versions where module names are
different, etc.  It also allows you to move services/sites over and
troubleshoot issues much more easily than a full migration of everything.

One thing I like to do is keep a non modified copy of httpd.conf from
the original RPM ... and run a "diff" between the standard and my
httpd.conf ... I then know what was changed on that machine ... and can
either roll it into the new httpd on the new machine, or split it out to
a conf.d/<file>.conf file.

If you did not save the httpd.conf file from your current
httpd-<version>.rpm ... you can get it using cpio2rpm like this:

1.  get a copy of the original RPM (should be available on a Fedora,
RedHat, CentOS, SciLinux, WBWL etc. mirror site that you installed it from)

2.  Create a directory and put the RPM in there.

3.  CD to the new directory an make sure the only file in there is the RPM.

4.  Use this command to extract all the files from that RPM to the
current directory:

rpm2cpio <rpm_name> | cpio -idv

5. All the files are now in the current directory in the path that they
would have been installed ... so this is the original config file:

<current_directory>/etc/httpd/conf/httpd.conf

> My plan is to install CentOS to a new box, and migrate services one by
> one as needed.

That is the way I recommend doing it.  Keep the old one working while
you fix the issues on the new one.

Thanks,
Johnny Hughes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://lists.centos.org/pipermail/centos/attachments/20070714/7f1951be/attachment-0004.sig>