I have had so many requests for this article, I decided to move it from our internal wiki to the blog. So many people are running RHEL 4 and feel like it is too difficult to get PHP 5 and MySQL 5 on to the machine. This article shows that it is easier than you think - all thanks to the CentOS repositories. A little light command line work, a few downloads, and we are up and running.
1. After a clean installation, you will need to modify your repositories for up2date.
Edit the file to have the following repositories (the CentOS 4 Repositories):
2. Next, you will need up import the key for the CentOS Repositories.
3. Next, you will have to fix an error with the up2date program to get it work with these repositories. [More Detailed Information]
Edit the file at line 649:
Remove:
And being sure to preserve the tabs of the original line replace it with:
4. Now you can use up2date to get selective packages. Now we need to update Apache.
5. Now we need to install the new version of MySQL. As of this article, MySQL packages are available specifically for RHEL 4 on the MySQL Website. You will need (at a minimum) the mysql-server and mysql-client rpm's. Now we will need to remove MySQL 4.x and a dependancy.
6. Now we can install the new MySQL Packages (replace these file names with the ones you downloaded in previous step).
7. Now we need to re-install the cyrus-sasl-sql package from the RHN Source List (not the CentOS source list).
8. Now we can update PHP. However, we will have to switch back to the CentOS Repositories for this.
9. Restart Apache
10. Run a phpinfo() check to ensure everything is working properly. Place this file in your web root.
Put the URL for that file in your browser, and you should see that it is running PHP 5 and MySQL 5.
11. Lastly, let's put everything back the way it was before the changes to the repositories.
Beatiful spoken..I am in sunc with your post