This article mainly records the compilation of software/development environment installation process, other installation methods ignored!
article background:
Because PHP and Apache are installed in the way of compiling and installing, however, compiling the installation method requires c,c++ compiling environment,
Install build-essential via apt mode
$ sudo apt-get install build-essential
The steps for compiling the installation are generally divided into:
Compiling the configuration
$./configure--xxx (parametric s)
problems with compiling the configuration:
A, before the installation, the software is not fully understood
b, if not fully understand, and do not know how to install (with which parameters)
C, you can choose one of the simplest installation method, with the use of multiple installation to solve the problem
The process is complex and requires a complex configuration of specific parameters, with specific parameters viewed through configure--help
Compile
$ make
Installation
$ sudo make install
**************************************
Apache Installation
1. Download httpd-2.2.11.tar.gz
2. Decompression
Tar zxvf httpd-2.2.11.tar.gz
A httpd-2.2.11 directory is generated under the path that executes the TAR directive
3. Review the compiled configuration information
Switch to the httpd-2.2.11 directory after decompression
./configure--help
In this step, you can learn about the modules that you can install, and the installation configuration information that you need to set
See the Manual for further information
4. Compile the configuration
$./configure--prefix=/usr/local/apache2 \ Specify the installation directory
--ENABLE-SO \ Allow use of external so modules
--with-mpm=prefork URL Request Jump Policy
5. Compiling:
$ make
6, Installation: (using sudo because the path to install/usr/local/apache2 does not belong to the personal path)
$ sudo make install
"Installation Complete"
7. Testing
Modify the httpd.conf.
Modify the #ServerName www.example.com:80 to ServerName 127.0.0.1:80 (localhost:80)
Start sudo./apachectl-k start
Stop sudo./apachectl-k stop
Restart sudo./apachectl-k restart (This command is sometimes invalid and replaced with Stop+start)
****************************************
PHP Installation
1. Download php-5.2.8.tar.gz
2. Unzip the tar zxvf php-5.2.8.tar.gz
3. Review the compiled configuration information
Switch to the httpd-2.2.11 directory after decompression
./configure--help
In this step, you can learn about the modules that you can install, and the installation configuration information that you need to set
See the Manual for further information
4. Compile the configuration
./configure--prefix=/home/guandl/webenv/php528 \
--enable-mbstring \
--with-apxs2=/usr/local/apache2/bin/apxs
5 compiling
Make
6. Installation
sudo make install
"Installation Complete"
7. Copy php.ini
Because there is no PHP configuration file under the general installed PHP directory $php/lib, you need to copy the php.ini-recommended from the extracted directory to the Lib directory of PHP.
sudo cp Php.ini-recommended/home/guandl/webenv/php528/lib/php.ini
8, modify the Apache configuration file httpd.conf
Add a bit of content
LoadModule Php5_module modules/libphp5.so is automatically generated when PHP is installed
AddType application/x-httpd-php. php
9. Testing
Write a PHP file, such as any.php
Phpinfo ();
?>
Put it in Apache's Htdocs directory.
Re-launch Apache
http://127.0.0.1/any.php
http://www.bkjia.com/PHPjc/327605.html www.bkjia.com true http://www.bkjia.com/PHPjc/327605.html techarticle This article mainly records the compilation of software/development environment installation process, other installation methods ignored! Article background: Because PHP and Apache, such as the use of the installation of the compilation of Ann ...