PHP installation 1、download php-5.6.tar.gz2unzip decompress tarzxvfphp-5.5.6.tar.gz 3. Check the compiled configuration information to switch to the decompressed httpd-2.2.11 directory. configure -- help this step can be used to understand the modules that can be installed, as well as the installation configuration information. You can also learn more about the manual.
PHP installation 1、download php-5.5.6.tar.gz 2, unzip tar zxvf php-5.5.6.tar.gz 3, view the compiled configuration information to switch to the decompressed httpd-2.2.11 directory. /configure -- help this step can be used to understand the modules that can be installed, as well as the installation configuration information that needs to be set up to further view the manual, or to learn about the relevant
PHP installation
1. Download php-5.5.6.tar.gz
2. Decompress tar zxvf php-5.5.6.tar.gz
3. Check the compiled configuration information.
Switch to the unzipped httpd-2.2.11 directory
./Configure -- help
Through this step, you can understand the modules that can be installed and the installation configuration information needs to be set.
For more information, see the manual.
4. Compile the configuration
./Configure -- prefix =/home/guandl/webenv/php528 \
-- Enable-mbstring \
-- With-apxs2 =/usr/local/apache2/bin/apxs
5. Compile
Make
6. Installation
Make install (to be executed by the Administrator)
7. Configure apache
Reconfigure apache2 to support php
- Configure httpd. conf to make apache support PHP:
# Vi/usr/local/apache/conf/httpd. conf
Find AddType application/x-gzip. gz. tgz and add the following content under it:
AddType application/x-httpd-php. php (there is a space before)
AddType application/x-httpd-php-source. phps (there is a space before)
- Then the cpopy php configuration file
Cp php-5.3.8/php. ini. dist/usr/local/php/lib/php. ini
(If php. ini. dist is not available, rename any of php. ini-development php. ini-production to php. ini. dist .)
Modify the php. ini file register_globals = On
Service apache restart
Test whether php is successfully installed.
Write a php test page info. php and put it in apache2/htdocs.
Phpinfo ();
?>;
Enter localhost/info. php In the browser
If the php information is displayed normally, the PHP installation is successful!