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

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 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)

Hot Topics

Java Tutorial
1664
14
PHP Tutorial
1269
29
C# Tutorial
1249
24
What is the significance of the session_start() function? What is the significance of the session_start() function? May 03, 2025 am 12:18 AM

session_start()iscrucialinPHPformanagingusersessions.1)Itinitiatesanewsessionifnoneexists,2)resumesanexistingsession,and3)setsasessioncookieforcontinuityacrossrequests,enablingapplicationslikeuserauthenticationandpersonalizedcontent.

macOS and Linux: Compatibility and User Experience macOS and Linux: Compatibility and User Experience Apr 30, 2025 am 12:05 AM

macOS and Linux have their own advantages in compatibility and user experience. macOS has excellent compatibility within the Apple ecosystem, and the user experience is simple and intuitive; Linux has outstanding hardware compatibility and software flexibility. The user experience varies from distribution to distribution, emphasizing personalization and control.

Recommended Laravel's best expansion packs: 2024 essential tools Recommended Laravel's best expansion packs: 2024 essential tools Apr 30, 2025 pm 02:18 PM

The essential Laravel extension packages for 2024 include: 1. LaravelDebugbar, used to monitor and debug code; 2. LaravelTelescope, providing detailed application monitoring; 3. LaravelHorizon, managing Redis queue tasks. These expansion packs can improve development efficiency and application performance.

What problems will you encounter when using native select on your phone? What problems will you encounter when using native select on your phone? Apr 30, 2025 pm 03:06 PM

Issues with native select on mobile phones When developing applications on mobile devices, we often encounter scenarios where users need to make choices. Although native sel...

Composer: The Package Manager for PHP Developers Composer: The Package Manager for PHP Developers May 02, 2025 am 12:23 AM

Composer is a dependency management tool for PHP, and manages project dependencies through composer.json file. 1) parse composer.json to obtain dependency information; 2) parse dependencies to form a dependency tree; 3) download and install dependencies from Packagist to the vendor directory; 4) generate composer.lock file to lock the dependency version to ensure team consistency and project maintainability.

What are the advantages of using MySQL over other relational databases? What are the advantages of using MySQL over other relational databases? May 01, 2025 am 12:18 AM

The reasons why MySQL is widely used in various projects include: 1. High performance and scalability, supporting multiple storage engines; 2. Easy to use and maintain, simple configuration and rich tools; 3. Rich ecosystem, attracting a large number of community and third-party tool support; 4. Cross-platform support, suitable for multiple operating systems.

Laravel environment construction and basic configuration (Windows/Mac/Linux) Laravel environment construction and basic configuration (Windows/Mac/Linux) Apr 30, 2025 pm 02:27 PM

The steps to build a Laravel environment on different operating systems are as follows: 1.Windows: Use XAMPP to install PHP and Composer, configure environment variables, and install Laravel. 2.Mac: Use Homebrew to install PHP and Composer and install Laravel. 3.Linux: Use Ubuntu to update the system, install PHP and Composer, and install Laravel. The specific commands and paths of each system are different, but the core steps are consistent to ensure the smooth construction of the Laravel development environment.

Apache's Role in Web Development: Pioneering Technology Apache's Role in Web Development: Pioneering Technology May 01, 2025 am 12:12 AM

Apache's role in web development includes static website hosting, dynamic content services, reverse proxying and load balancing. 1. Static website hosting: Apache has simple configuration and is suitable for hosting static websites. 2. Dynamic content service: Provide dynamic content by combining it with PHP, etc. 3. Reverse proxy and load balancing: As a reverse proxy, it distributes requests to multiple backend servers to achieve load balancing.

See all articles