Home  >  Article  >  Backend Development  >  Compile and install through UNIX source code_PHP tutorial

Compile and install through UNIX source code_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 17:26:51789browse

This chapter will guide you on how to install and set up PHP3. and introduce the necessary knowledge and software.
Basic UNIX skills (learn how to operate and "make" a C compiler)
A standard ANSI C compiler
A WEB server (obviously required)

Through UNIX source code Compile and install
Download source files
The latest source code can be found at the following URL: http://www.php.net
Quick installation instructions (Apache Module version)
1. gunzip apache_1.3 .x.tar.gz
2. tar xvf apache_1.3.x.tar
3. gunzip php-3.0.x.tar.gz
4. tar xvf php-3.0.x.tar
5. cd apache_1.3.x
6. ./configure --prefix=/www
7. cd ../php-3.0.x
8. ./configure --with- mysql --with-apache=../apache_1.3.x --enable-track-vars
9. make
10. make install
11. cd ../apache_1.3.x
12. ./configure --prefix=/www --activate-module=src/modules/php3/libphp3.a
13. make
14. make install
Instead of this step you may prefer to simply copy the httpd binaryovertop of your existing binary. Make sure you shut down yourserver first though.
(You can also directly copy the httpd binary overtop of the existing binary file instead of the above steps, but you You must shut down your server first. )
15. cd ../php-3.0.x


16. cp php3.ini-dist /usr/local/lib/php3.ini
You can edit /usr/local/lib/php3.ini file to set PHP options. If you prefer this file in another location, use --with-config-file=/path in step 8.
(You can edit it directly /usr/local/lib/php3.ini file to set PHP options. If you store this file in another location, use with-config-file=/path in step 8)
17. Edit your httpd.conf or srm.conf file and add:
AddType application/x-httpd-php3 .php3 You can choose any extension you wish here. .php3 is simply the one we suggest.
Extensions you want, we think PHP3 is a very simple thing. )
18. Use your normal procedure for starting the Apache server.
(You must stop and restart the server, not just cause the server to reload by use a HUP or USR1 signal.)
(You must stop and restart the server, not just cause the server to reload by use a HUP or USR1 signal.)
Stop and restart the server instead of just using the server's RELOAD function)

http://www.bkjia.com/PHPjc/531929.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/531929.htmlTechArticleThis chapter will guide you how to install and set up PHP3. and introduce the necessary knowledge and software. Basic UNIX skills (learn how to operate and "make" a C compiler) A standard ANSI C...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn