Elliott C. Back: Internet & Technology

How to Upgrade FC4 to FC5 with Yum and Plesk 8

Posted in Computers & Technology, Linux by Elliott Back on March 10th, 2007.

The addition of Plesk 8 causes numerous problems, but they are surmountable. Here’s a list of steps to go from 0 to a new distro without any hitches at all:

1) Get Yum. If you don’t have it, you can run these commands:

cd /tmp
wget yum-2.3.2-7.src.rpm
rpm -Uvh yum-2.3.2-7.src.rpm

2) Install the FC4 repository location:

wget fedora-release-4-2.noarch.rpm
rpm -Uvh fedora-release-4-2.noarch.rpm

3) Update everything in your standard Fedora Core 4 distro:

yum upgrade

4) Remove all kernels older than than 2.6.14:

rpm -qa “*kernel*”
yum remove kernel-2.6.14*

5) Install the FC5 repository location:

wget fedora-release-5-5.noarch.rpm
rpm -Uvh fedora-release-5-5.noarch.rpm

6) Update yum to the faster newer yum:

yum update yum

7) Install the atomic release locations for PSA 8.1:

wget atomic-release-1.0-3.rhfc5.art.noarch.rpm
rpm -Uvh atomic-release-1.0-3.rhfc5.art.noarch.rpm

8) Install the repository for PSA 8.1:

Add the following to the end of /etc/yum.conf:

[psa-8.1]
name=Atomic Rocket Turtle – FC5 – SW-Soft PSA 8.1 RPMS
baseurl=http://3es.atomicrocketturtle.com/atomic/psa-8.1/fedore/5/i386
gpgcheck=0

9) Upgrade everything:

yum clean all
yum upgrade

10) Fix any rpmdb / selinux issues:

/sbin/fixfiles relabel
rpm –rebuilddb
reboot

Now you should have an FC5 system with all the nice PHP bugfixes. If you use eaccelator or other PHP extensions you’ll have to install them again, and you will also want to fix up the config files before you reboot (httpd.conf, mysqld.conf, php.ini).

CP Linux / Unix Command

Posted in Code, Computers & Technology, Linux by Elliott Back on August 24th, 2006.

If you use linux, you undoubtably have encountered the command cp for copy sometime. Looking at its man page, it seems simple and easy to use:

CP(1)    User Commands

NAME
       cp - copy files and directories

SYNOPSIS
       cp [OPTION]... SOURCE DEST
       cp [OPTION]... SOURCE... DIRECTORY
       cp [OPTION]... --target-directory=DIRECTORY SOURCE...

Generally this works well, except if you accidentally include a directory in the file list. Let’s set up a test environment:

-bash-3.00$ touch a b d e
-bash-3.00$ mkdir c
-bash-3.00$ mkdir ../dest

Now, what would you expect if I ran the command to copy all files in the current directory to the ../dest folder? Yes, failure, because c is a directory and not a file–it must be copied recursively or not at all. However, the cp command will simply skip over c and continue copying:

-bash-3.00$ cp * ../dest
cp: omitting directory `c'
-bash-3.00$ ls ../dest
a  b  d  e

This behavior is counterintuitive for me. I would expect it to first validate all of its input arguments, making sure that either a file is being copied to a new file name, a bunch of files to a directory, or some directories recursively to another directory. If these conditions were not met, I would not copy anything! A command which returns a non-zero value (error) should not perform actions on its input, unless it absolutely has to! Clearly cp could check its arguments for errors before processing them–so why doesn’t it, except historical reasons?

« Previous Page