Compile Apache + PHP4 + Mysql on the Linux firewall) _ PHP Tutorial

Source: Internet
Author: User
Compile Apache + PHP4 + Mysql on the Linux firewall (for conversion ). Objective: to build a Redhatlinux6.2 firewall, connect the leased line to Chinanet, and connect the LAN segment 192.168.11.024 internally. enablePHP4 and Mysql databases are required, and there is another Apa on the LAN. objective: a Redhat linux 6.2 is used as a firewall, and the leased line is connected to Chinanet.
The LAN segment 192.168.11.0/24 requires the enable PHP4 and Mysql database, and the LAN
Another Apache server 192.168.11.2 needs to provide services to external users.
The Apache reverse proxy and name VM compiled on the firewall are implemented.
Address: the external address of the firewall is a. B. c.210, and the second address of the alias is a. B. c.211.
The IP address is 192.168.11.5, and the Apache server on the internal LAN is 192.168.11.2.
Implementation:
1. download the three source files to/tmp of the firewall machine.
Apache_1.3.12.tar.gz
Mysql-3.22.32.tar.gz
Php-4.0.1pl2.tar.gz
2. unbind three files under/tmp
# Tar xvfz apache * gz
# Tar xvfz mysql * gz
# Tar xvfz php * gz
3. go to/tmp/mysql * and compile mysql
#./Configure -- prefix =/usr/local/mysql
# Make
# Make install
# Scripts/mysql_install_db
#/Usr/local/mysql/bin/safe_mysqld &
#/Usr/local/mysql/bin/mysqladm-u root password newpassword
4. go to/tmp/php * and compile PHP4
#./Configure -- with-mysql -- with-apache = ../apche_1.3.12
-- Enable-track-vars
# Make; make install
5. download the reverse proxy X-forward-for module. The address is
Http://perl.apache.org/guide/download.html#mod_proxy_add_forward
Download the file mod_proxy_add_forward.c to/tmp/apache_1.3.12/src/modules/
Extra/Directory
5. compile Apache and add the PHP4 module and most shared module libraries.
./Configure -- prefix =/usr/local/apache
-- Activate-module = src/modules/php4/libphp4.a
-- Activate-module = src/modules/extra/mod_proxy_add_forward.c
-- Enable-module = most -- enable-shared = max
6. copy php. ini-dist to another directory.
# Cd/tmp/php *
# Cp php. ini-dist/usr/local/lib/php. ini
7. edit the AddType row in/usr/local/apache/conf/httpd. conf.
AddType application/x-httpd-php4. php
8. edit the AddModule row in/usr/local/apache/conf/httpd. conf,

A Redhat linux 6.2 is used as a firewall. the leased line is connected to Chinanet and the LAN segment 192.168.11.0/24 is connected internally. enable PHP4 and Mysql databases are required, and there is another Apa on the lan...

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.