Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 381
  • Last Modified:

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

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
service_desk_lwi
Asked:
service_desk_lwi
2 Solutions
 
IceCodeCommented:
0
 
JayDiabloCommented:
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
 
service_desk_lwiAuthor Commented:
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now