Install Apache + MySQL + PhP source code

Source: Internet
Author: User

1.httpd-2.2.3.tar.gz
Gunzip | httpd-2.2.3.tar.gz | tar-xvf-
CD httpd-2.2.3
./Configure
Make
Make install

Start:/usr/local/apache2/bin/apachectl start

2.mysql-5.0.22.tar.gz
Groupadd MySQL
Useradd-G MySQL
Gunzip | mysql-5.0.22.tar.gz | tar-xvf-
CD mysql-5.0.22
./Configure -- prefix =/usr/local/MySQL -- With-charset = gb2312
Make
Make install
CP support-files/my-medium.cnf/etc/My. CNF
CD/usr/local/MySQL
Bin/mysql_install_db -- user = MySQL // used to install database files
Chown-r Root
Chown-r MySQL VaR
Chgrp-r MySQL
Start bin/mysqld_safe -- user = MySQL &

3.php-5.2.0.tar.gz
Gunzip | php-5.2.0.tar.gz | tar-xvf-
CD php-5.2.0
. /Configure -- prefix =/usr/local/PHP -- With-mysql =/usr/local/MySQL -- with-apxs2 =/usr/local/Apache/bin/apxs -- enable-track- vars -- enable-force-CGI-redirect -- With-config-file-Path =/usr/local/Apache/Conf
Make
Make install
Cp php. ini-Dist/usr/local/Apache/lib/PHP. ini

Edit the php. ini file:
Search:
; Default_charset = "iso-8859-1"
Add a line below this line
Default_charset = "gb2312"

# Edit the httpd. conf file of Apache:
Search:
Directoryindex index.html
Add index. php later to enable Apache to open files on the default homepage of PHP.
Search:
# Addtype application/X-tar. tgz
Add
Addtype application/X-httpd-PHP. php

Restart Apache

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.