Installation and configuration of PHP (as the current mainstream development language) server in Linux
Category: PHP (as the current mainstream development language) tutorial
1, #cp httpd-2.0.47.tar.gz to/usr/local/
2, #tar zxvf PHP (as the current mainstream development language) -4.3.3.tar.gz
3, #cd PHP (as the current mainstream development language)- 4.3.3
4, #./configure--with-mysql (best combination with PHP)--with-apxs2=/usr/local/apache (the most popular Web server platform for UNIX platforms)/bin/apxs
#./configure-with-apache (the most popular Web server platform for UNIX platforms) =/path/to/apache (the most popular Web server platform for UNIX platforms)/dir-with-mysql ( and PHP collocation of the best combination) =/usr/local/mysql (and PHP collocation of the best combination)
5, #make
6, #make install (while waiting to bless it)
7, #cp PHP (as the current mainstream development language). Ini-dist/usr/local/lib/php (as the current mainstream development language). INI
8, #vi/usr/local/apache (the most popular Web server platform on UNIX platforms) 2/conf/httpd.conf
9. Under AddType application/x-tar.tgz, add the following:
AddType application/x-httpd-php (as the current mainstream development language). PHP (as the current mainstream development language)
LoadModule PHP (as the current mainstream development language) 4_module/var/www/modules/libphp (as the current mainstream development language) 4.so (if not added)
10, #vi/usr/local/ Apache (the most popular Web server platform for UNIX platforms) 2/htdocs/test.php (as the current mainstream development language)
!--? echo PHP (as the current mainstream development language) info ();
?>
11, browse http://ip/test.php (as the current mainstream development language). Information about PHP (as the current mainstream development language) appears. Congratulations on the success of this step.
PHP (as the current mainstream development language) and Apache (Unix platform most popular Web server platform) after the installation of the basic configuration
Configuration of 1.apache (the most popular Web server platform for UNIX platforms)
The configuration file for Apache (the most popular Web server platform for UNIX platforms) is/usr/local/apache (the most popular Web server platform for UNIX platforms) 2/conf/httpd.conf, editing httpd.conf files, Add the following two lines at the end of the file:
LoadModule PHP (as the current mainstream development language) 4_module modules/libphp (as the current mainstream development language) 4.so
AddType application/x-httpd-php (as the current mainstream development language). PHP (as the current mainstream development language). PHP (as the current mainstream development language) 3
Also modify the DirectoryIndex to:
DirectoryIndex index.htm
DirectoryIndex index.html
DirectoryIndex index.php (as the current mainstream development language)
DirectoryIndex index.php (as the current mainstream development language) 3
DirectoryIndex index.php (as the current mainstream development language) 4
The configuration of Apache (the most popular Web server platform on UNIX platform) is rich, and other Apache (the most popular Web server platform of UNIX platform) related configuration refer to the documentation of Apache (the most popular Web server platform of UNIX platform).
2.php (as the current mainstream development language) configuration
The configuration file for Apache (the most popular Web server platform for UNIX platforms) is/usr/local/lib/php (as the current mainstream development language). ini, edit php (as the current mainstream development language). ini file to configure PHP (as the current mainstream development language ) option. It is particularly important to note that the register_globals variable is set to off by default when the installation is complete and needs to be changed to ON. Otherwise, there is a phenomenon that PHP (as the current mainstream development language) cannot read post data.
Zlib.output_compression=on
Register_globals=on
For other PHP options, please refer to the relevant documentation for the current mainstream development language.
3. Testing
Can write a simple PHP (as the current mainstream development language) file to test the installation, the file contains the following line:
Save it as/usr/local/apache (the most popular Web server platform for UNIX platforms) 2/htdocs/info.php (as the current mainstream development language), launch Apache (the most popular Web server platform on UNIX platforms), Then browse in the browser.
http://www.bkjia.com/PHPjc/508619.html www.bkjia.com true http://www.bkjia.com/PHPjc/508619.html techarticle Linux PHP (as the current mainstream development language) server installation and configuration classification: PHP (as the mainstream development language now) Tutorial 1, #cp httpd-2.0.47.tar.gz to/USR/LOCAL/2, #ta ...