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
354 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
spacing 5 31
Re-imbursement Claim System 3 25
comparing strings that contain line breaks 18 37
Phone Dialer 5 37
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

760 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

20 Experts available now in Live!

Get 1:1 Help Now