Install PHP + MySQL in RedHatLinux5.4

Source: Internet
Author: User
Install System Version: RedHatEnterpriseLinuxServerrelease5.4 kernel version: Linuxversion2.6.18-164. el5 (mockbuild@x86-002.build.bos.RedHat.com) (gccversion4.1.220080704 (RedHat4.1.2-46) #1SMPTueAug1815: 51

Version of the installation system: Red Hat Enterprise Linux Server release 5.4

Kernel version: Linux version 2.6.18-164. el5 (mockbuild@x86-002.build.bos.RedHat.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46) #1 SMP Tue Aug 18 15:51:54 EDT 2009

First, check whether all the items to be installed are in the same region:

Rpm-qa | grep-I apache

Rpm-qa | grep-I httpd

Rpm-qa | grep-I php

Rpm-qa | grep-I mysql

No. Next we will install it.

First, find the required installation package:

Apache:

: Http://httpd.apache.org/download.cgi

Download file: httpd-2.2.16.tar.gz

Mysql:

: Http://www.mysql.com/downloads/mysql/#downloads

Download file: MySQL-client-community-5.1.50-1.rhel5.i386.rpm

MySQL-devel-community-5.1.50-1.rhel5.i386.rpm

MySQL-server-community-5.1.50-1.rhel5.i386.rpm

MySQL-shared-community-5.1.50-1.rhel5.i386.rpm

Php:

: Http://php.net/downloads.php

Download file: PHP 5.3.3.tar.gz

Installation Method:

Apache:

Tar-xvf httpd-2.2.16.tar.gz

Cd httpd-2.2.16

To install apr, you don't need to use it before.

Cd srclib/apr

./Configure -- prefix =/usr/local/apr-httpd/

Make clean

Make

Make install

Install apr-util. You don't need to use it before.

Cd ..

Cd apr-util/

./Configure -- prefix =/usr/local/apr-util-httpd/-- with-apr =/usr/local/apr-httpd/

Make clean

Make

Make install

Install httpd

Cd ../..

. /Configure -- prefix =/usr/local/apache2/-- enable-rule = SHATED_CORE -- enable-module = so -- with-apr =/usr/local/apr-httpd/-- -apr-util =/usr/local/apr-util-httpd/

Make clean

Make

Make install

Start:

/Usr/local/apache2/bin/apachectl-k start

Test:

Enter http: // 127.0.0.1 in the browser to display It works!

Stop:

/Usr/local/apache2/bin/apachectl-k stop

For more information, see: http://httpd.apache.org/docs/2.2/


Install Mysq

Rpm-ivh MySQL-server-community-5.1.50-1.rhel5.i386.rpm

Rpm-ivh MySQL-client-community-5.1.50-1.rhel5.i386.rpm

Rpm-ivh MySQL-devel-community-5.1.50-1.rhel5.i386.rpm

Rpm-ivh MySQL-shared-community-5.1.50-1.rhel5.i386.rpm

/Usr/bin/mysqladmin-u root password '****'

Mysql-u root-p

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.