Linux under Apache 2.2, MySQL 5.0 and PHP 5.0 installation and Configuration _php Tutorial

Source: Internet
Author: User
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 package mysql-5.0.24.tar.gz, address http://www.mysql.com-------------
# tar ZVXF mysql-5.0.24.tar.gz//Unzip
# CD mysql-5.0.24//Enter the extracted files directory
#./configure--prefix=/usr/local/mysql \//Set installation directory
--enable-thread-safe-client \//Compile the client library for thread-safe edition
--without-debug \//Turn off the 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//File attribute changed to 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
----------------------------------Modify the MySQL password----------------------------------
#/usr/local/mysql/bin/mysqladmin-uroot Password mysqlsecret//Change Password
----------------------------------turn off the MySQL service----------------------------------
#/usr/local/mysql/bin/mysqladmin-uroot-pmysqlsecret Shutdown//Turn off MySQL

3. Install Apache 2.2.3
-------------Download 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 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 Apache service httpd.conf file
* Add LoadModule php5_module to LoadModule place module/libphp5.so
* Add index.php at DirectoryIndex Place
* Add at AddType application
AddType application/x-httpd-php. php. phtml
AddType Applicatoin/x-httpd-php-source. Phps

http://www.bkjia.com/PHPjc/632870.html www.bkjia.com true http://www.bkjia.com/PHPjc/632870.html techarticle 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 Soft ...

  • Related Article

    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.