Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
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
Medium Priority
?
376 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 4

Assisted Solution

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

Accepted Solution

by:
JayDiablo earned 900 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to dynamically set the form action using jQuery.

721 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