Home Backend Development PHP Tutorial Installation and configuration of Apache 2.2, MySQL 5.0 and PHP 5.0 under Linux_PHP tutorial

Installation and configuration of Apache 2.2, MySQL 5.0 and PHP 5.0 under Linux_PHP tutorial

Jul 13, 2016 am 10:47 AM
apache linux mysql php red Down and and Install operating system environment of Configuration

1. Installation environment
Operating system: Red Hat Linux Enterprise AS 4.0
Database: MySQL 5.0.24
Web server: Apache 2.2.3
Scripting language: PHP 5.1.6

2. Install MySQL 5.0.24
-------------Download the software package mysql-5.0.24.tar.gz, address http://www.mysql.com-------------
# tar zvxf mysql-5.0.24.tar.gz //Decompress
# cd mysql-5.0.24 //Enter the decompressed file directory
# ./configure --prefix=/usr/local/mysql //Set the installation directory
--enable-thread-safe-client //Compile the thread-safe version of the client library
--without-debug //Turn off debug function
--localstatedir=/data/mysqldata //Set database file directory
# make //Compile
# make install //Install
# /usr/local/mysql/bin/mysql_install_db //Initialize authorization
# chown –R root:root /usr/local/mysql //Change the file attributes to the root user
# cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf //Copy configuration file
----------------------------------Start the MySQL service------------- --------------------------
# /usr/local/mysql/bin/mysqld_safe --user=root & //Start MySQL
----------------------------------Change MySQL password------------- --------------------------
# /usr/local/mysql/bin/mysqladmin -uroot password mysqlsecret //Change password
----------------------------------Close the MySQL service------------- --------------------------
# /usr/local/mysql/bin/mysqladmin -uroot -pmysqlsecret shutdown //Shut down MySQL

3. Install Apache 2.2.3
-------------Download the software package httpd-2.2.3.tar.gz, address http://www.apache.org-------------
# tar zvxf httpd-2.2.3.tar.gz
# cd httpd-2.2.3
# ./configure --prefix=/usr/local/apache
--enable-module=most
--enable-shared=max
# make
# make install
----------------------------------Start the Apache service------------- --------------------------
# /usr/local/apache/bin/apachectl start
----------------------------------Close the Apache service------------- --------------------------
# /usr/local/apache/bin/apachectl stop
----------------------------------Restart the Apache service------------- --------------------------
# /usr/local/apache/bin/apachectl restart

4. Install PHP 5.1.6
------------------Download the software package php-5.1.6.tar.gz, address www.php.net--------------------- --------
# tar zvxf php-5.1.6.tar.gz
# cd php-5.1.6
# ./configure --prefix=/usr/local/php
--with-mysqld=/usr/local/mysql
--with-apxs2=/usr/local/apache/bin/apxs
# make
# make install
# cp php.ini-dist /usr/local/php/lib/php.ini

5. Configure the httpd.conf file of the Apache service
*Add LoadModule php5_module module/libphp5.so
at LoadModule *Add index.php
at DirectoryIndex *Add
at AddType application AddType application/x-httpd-php .php .phtml
AddType applicatoin/x-httpd-php-source .phps

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/632870.htmlTechArticle1. Installation environment Operating system: Red Hat Linux Enterprise AS 4.0 Database: MySQL 5.0.24 Web server: Apache 2.2 .3 Scripting language: PHP 5.1.6 2. Install MySQL 5.0.24 -------------Download the software...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

The page is blank after PHP is connected to MySQL. What is the reason for the invalid die() function? The page is blank after PHP is connected to MySQL. What is the reason for the invalid die() function? Apr 01, 2025 pm 03:03 PM

The page is blank after PHP connects to MySQL, and the reason why die() function fails. When learning the connection between PHP and MySQL database, you often encounter some confusing things...

Why does an error occur when installing an extension using PECL in a Docker environment? How to solve it? Why does an error occur when installing an extension using PECL in a Docker environment? How to solve it? Apr 01, 2025 pm 03:06 PM

Causes and solutions for errors when using PECL to install extensions in Docker environment When using Docker environment, we often encounter some headaches...

How to send a POST request containing JSON data using PHP's cURL library? How to send a POST request containing JSON data using PHP's cURL library? Apr 01, 2025 pm 03:12 PM

Sending JSON data using PHP's cURL library In PHP development, it is often necessary to interact with external APIs. One of the common ways is to use cURL library to send POST�...

How to efficiently integrate Node.js or Python services under LAMP architecture? How to efficiently integrate Node.js or Python services under LAMP architecture? Apr 01, 2025 pm 02:48 PM

Many website developers face the problem of integrating Node.js or Python services under the LAMP architecture: the existing LAMP (Linux Apache MySQL PHP) architecture website needs...

How to solve the permissions problem encountered when viewing Python version in Linux terminal? How to solve the permissions problem encountered when viewing Python version in Linux terminal? Apr 01, 2025 pm 05:09 PM

Solution to permission issues when viewing Python version in Linux terminal When you try to view Python version in Linux terminal, enter python...

How to configure apscheduler timing task as a service on macOS? How to configure apscheduler timing task as a service on macOS? Apr 01, 2025 pm 06:09 PM

Configure the apscheduler timing task as a service on macOS platform, if you want to configure the apscheduler timing task as a service, similar to ngin...

Python Cross-platform Desktop Application Development: Which GUI Library is the best for you? Python Cross-platform Desktop Application Development: Which GUI Library is the best for you? Apr 01, 2025 pm 05:24 PM

Choice of Python Cross-platform desktop application development library Many Python developers want to develop desktop applications that can run on both Windows and Linux systems...

See all articles