Home  >  Article  >  php教程  >  怎样在UNIX系统下安装php3

怎样在UNIX系统下安装php3

WBOY
WBOYOriginal
2016-06-21 09:04:41820browse
# cd /usr/src
# tar xvzf apache_1.3.6.tar.gz   (产生apache_1.3.6目录)
# tar xvzf php-3.0.8.tar.gz    (产生php-3.0.8目录)
# cd apache_1.3.6
# ./configure --prefix=/usr/local/apache  (把Apache的安装目录定为 /usr/local/apache)
# cd php-3.0.8
# ./configure --with-mysql=/usr/local/mysql \
--with-apache=../apache_1.3.6 \
--enable-track-vars  (配置支持MySQL、作为Apache功能模块、跟踪变量有效)
# make; make install
  在上面configure的参数中,指定使PHP支持MySQL并给出MySQL的安装路径。
  然后,编辑Apache配置文件:
# cd /usr/local/apache/conf
# vi httpd.conf
  找到"AddType application/x-httpd-php3 .php3",去掉该行前面的#号注释标记。
  当然也可加一行AddType application/x-httpd-php3 .asp这样用FrontPage编辑会方便一点。
  然后把php.ini文件拷到/usr/local/lib/目录下:
# cd ../php-3.0.8
# cp php3.ini-dist /usr/local/lib/php3.ini   
  你可以修改该配置文件,以定制PHP3的工作细节,例如:
upload_max_filesize = 2097152    ; 2 Meg default limit on file uploads
  以限定上载文件数据量的最大值为2兆字节。



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