Solved

How would I install the latest PHP and MySQL programs on my Red Hat Enterprise Linux 4 Server

Posted on 2011-02-11
3
359 Views
Last Modified: 2012-05-11
Hello everyone,

I am not a Linux user, so Linux is a little difficult for me to navigate.   I have a Red Hat Enterprise Linux 4 server for my Intranet.   Currently, I am not sure if it has PHP and MySQL installed.  If both programs are installed, not all components are active because the Marketing department tried updating our internal web site with php and it did not work.

Can someone help with the following:
1) Provide me with the commands and instructions to uninstall the current PHP and MySQL versions and re-install the latest version of PHP and MySQL.

2) Or help me ensure I have all the components of PHP and MySQL currently installed on RHEL 4 turned on and running.

All the help is most appreciated since this is the first time I am actually playing around with a Linux server.   My experience has been with Windows so I would really like some assistance with Linux.  Thanks.
0
Comment
Question by:service_desk_lwi
3 Comments
 
LVL 4

Assisted Solution

by:IceCode
IceCode earned 200 total points
ID: 34874130
0
 
LVL 4

Accepted Solution

by:
JayDiablo earned 300 total points
ID: 34875050
I'd recommend sticking to RPM packages rather than uninstalling them and building from source (as the website lamphowto.com suggests).  RHEL systems come with a package manager called "yum" which simplifies this process.

However, RHEL 4.X only has PHP 5.1.6 available in the default YUM repositories, so usually you have to go about installing a third-party YUM repo in order to get PHP closer to the current version (5.3.5 as of this writing).

If you're okay with just PHP 5.2, Jason Litka's Utterramblings repo has just about everything you'll need to get PHP 5.2 and MySQL working:

http://www.jasonlitka.com/yum-repository/

If you need 5.3, remi's yum repo contains the proper packages, there's not a super-friendly install document for his repo, but if you follow the commands from this page for RHEL 4:

http://blog.famillecollet.com/pages/Config-en

wget http://download.fedora.redhat.com/pub/epel/4/i386/epel-release-4-10.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-4.rpm
rpm -Uvh remi-release-4*.rpm epel-release-4*.rpm

Open in new window


No matter which repo you choose, to install php/mysql the commands are the same:

yum install php php-mysql mysql mysql-server

Open in new window


If Yum complains that packages are already installed, just issue an update

yum update

Open in new window


That will update ALL packages on your system that need updating.  If you only want to update php related packages, for example, do:

yum update php*

Open in new window


PHP typically has different packages available for added functionality (XML processing, GD image library, etc...)  You can install all of it with "yum install php*", or just pick and choose the parts you need.

*Note - Adding third party repos, or building your own packages from source may or may not conflict with any sort of support agreement you may or may not have with Redhat.  I know many RHEL users that use these sorts of repos to keep their PHP and MySQL versions up to date, but keep in mind that these are not tested by Redhat, so system instability could occur.
0
 

Author Closing Comment

by:service_desk_lwi
ID: 34964636
Very Informative - since I am a notice at Linux, I had to struggle in order to get the results I wanted.  But both solutions were very beneficial.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
This article discusses how to create an extensible mechanism for linked drop downs.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now