Php Forum Server Architecture

Source: Internet
Author: User

Install and configure php (as the mainstream development language) servers in Linux
Classification: php (as the mainstream development language) Tutorial

1, # cp httpd-2.0.47.tar.gz to/usr/local/
2. # tar zxvf php(for the current development language objective -4.3.3.tar.gz
3. # cd php (as the mainstream development language)-4.3.3
4 ,#. /configure -- with-MySQL (the best combination with PHP) -- with-apxs2 =/usr/local/apache (the most popular WEB server platform for Unix)/bin/apxs
#. /Configure-with-apache (the most popular WEB server platform on the Unix platform) =/path/to/apache (the most popular WEB server platform on the Unix platform) /dir-with-MySQL (the best combination with PHP) =/usr/local/MySQL (the best combination with PHP)
5. # make
6. # make install (save it while waiting)
7. # cp php (as the mainstream development language). ini-dist/usr/local/lib/php (as the mainstream development language). ini
8. # vi/usr/local/apache (the most popular WEB server platform on Unix) 2/conf/httpd. conf
9. Add the following under AddType application/x-tar.tgz:
AddType application/x-httpd-php (as the mainstream development language). php (as the mainstream development language)
LoadModule php (as the mainstream development language) 4_module/var/www/modules/libphp (as the mainstream development language) 4.so (if not, add)
10. # vi/usr/local/apache (the most popular WEB server platform on Unix) 2/htdocs/test. php (as the mainstream development language)
<?
Echo php (as the mainstream development language) info ();
?>
11. Browse http: // ip/test. php (as the mainstream development language ). Php (as the mainstream development language) information appears. Congratulations! This step is successful.

Basic configuration after installation of php (as the mainstream development language) and apache (the most popular WEB server platform on the Unix platform)
1. apache (the most popular WEB server platform on Unix) Configuration
The configuration file of apache (the most popular WEB server platform on the Unix platform) is/usr/local/apache (the most popular WEB server platform on the Unix platform) 2/conf/httpd. conf, edit httpd. add the following two lines to the end of the conf file:
LoadModule php (as the mainstream development language) 4_module modules/libphp (as the mainstream development language) 4.so
AddType application/x-httpd-php (as the mainstream development language). php (as the mainstream development language). php (as the mainstream development language) 3
At the same time, modify the DirectoryIndex:

DirectoryIndex index.htm
DirectoryIndex index.html
DirectoryIndex index. php (as the mainstream development language)
DirectoryIndex index. php (as the mainstream development language) 3
DirectoryIndex index. php (as the mainstream development language) 4

Apache (the most popular WEB server platform on the Unix platform) has rich configuration content, and other apache (the most popular WEB server platform on the Unix platform) for more information about the configuration, see apache (the most popular WEB server platform on Unix.
2. php (as the mainstream development language) Configuration
The configuration file of apache (the most popular WEB server platform on Unix) is/usr/local/lib/php (as the mainstream development language ). ini, edit php (as the mainstream development language ). INI file to configure php (as the mainstream development language) options. Note that after the installation is complete, the register_globals variable is set to Off by default and needs to be changed to On. Otherwise, php (as the mainstream development language) cannot read post data.
Zlib. output_compression = On
Register_globals = On
For other php (as the mainstream development language) options, refer to the relevant documentation.
3. Test
You can write a simple php (as the 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 on Unix platform) 2/htdocs/info. php (as the mainstream development language), start apache (the most popular WEB server platform on the Unix platform), and then browse in the browser.

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.