当前位置: 首页 > 图文教程 > 网络编程 > PHP > PHP4.03在linux下的安装

PHP
MYSQL版本大于4.1问题 - PHPchina
怎么让用户点击一个连接后,把一个图片另存了 - PHPchina
武汉10月15日Phper聚会召集!!! - PHPchina
php如果不等待exec执行的程序创建的子进程? - PHPchina
哪位知道DISCUZ处理防SQL注入的代码是哪部分 - PHPchina
求教!我实在不知道哪里问题,在线等ing - PHPchina
怎样结束用户某一进程 - PHPchina
比对用户名密码能不能这样写? - PHPchina
求助:如何在PHP+mysql中实现数据备份? - PHPchina
大家看看这个配置对吗 - PHPchina
如何禁止require当前文件 - PHPchina
无法将回调函数放在类中? - PHPchina
村里 PHP代码高亮是怎么实现的? - PHPchina
apache安装后.服务里没有apache2这个服务! - PHPchina
请教一个小问题 - PHPchina
config.php里面是不是应该把多数参数设置为常量而不是变量? - PHPchina
请教高手一个问题 - PHPchina
如何让百度收录我的网站 ?? - PHPchina
谁能给个注入的简单语句? - PHPchina
求PHP站内搜索思路 - PHPchina

PHP4.03在linux下的安装


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 256 ::
收藏到网摘: n/a

      
  PHP4.03在linux下的安装
  作 者 : 引路人
  
  
     所需软件
  
  php4.03源程序 C语言代码
  mysql3.23 alpha源程序
  apache 1.3.11源程序
  phpmyadmin_2.0.5 管理MYSQL数据库的最佳工具
     第一步 下载所需程序,安装MYSQL3.23程序。
  
  su为root新建一目录为程序安装的目录如
  /server
  在server下建目录mysql ,apache,
  将上面3个文件下载到/usr/src/下.
  
  运行如下指令解开文件包
  
  tar -zxvf php-4.0b3.tar.gz
  tar -zxvf mysql-3.23.9-alpha.tar.gz
  tar -zxvf apache_1.3.11.tar.gz
  将phpmyadmin下载到/server下
  
  同样运行
  tar -zxvf phpMyAdmin_2.0.5.tar.gz
  
  cd /usr/src/mysql-XXXX
  这里XXXX是程序的版本号,下同,系统必需已安装C开发库
  
  ./configure -help
  ./configure -prefix=/server/mysql
  make
  make install
  cd /server/mysql/bin
  ./mysql_install_db
  到这mysql已安装成功!
  
  可以运行mysql数据库
  
  /server/mysql/libexec/mysqld &
  
  可以通过数据库查看程序mysqlshow查看数据库当前的状态
  
  /server/mysql/bin/mysqlshow
  
     第二步 安装apache及php4。
  
     如果系统中已有apache运行先关闭此服务
  
     killall httpd
  
  编译apache及php4, 每一个行号为一行
  
  cd /usr/src/apache_1.3.x
  ./configure --prefix=/server/apache
  cd ../php-4.0.x
  ./configure --with-mysql=/server/mysql --with-apache=../apache_1.3.x --enable-track-vars
  make
  make install
  cd ../apache_1.3.x
  ./configure --prefix=/server/apache --activate-module=src/modules/php4/libphp4.a
  make
  make install
  cd ../php-4.0.x
  cp php.ini-dist /usr/local/lib/php.ini
  apache及php4已安装成功,下面配置apache及php4
  
  配置php4
  php4的配置文件为/usr/local/lib/php.ini文件
  
  可以用vi 来编辑,如果你安装了MC也可以用MC来编辑
  
  在[mysql]下修改
  
  mysql.default_port = 3306
  mysql.default_host = localhost
  mysql.default_user = root
  
  保存文件。
  
  配置apache
  apache的配置文件为/server/apache/conf/httpd.conf
  
  去掉
  #AddType application/x-httpd-php .php
  行的注册号"#"加入行
  AddType application/x-httpd-php .php3
  保存文件。
  
  配置phpmyadmin_2.0.5
  在/server/phpmyadmin_2.0.5下找到config.inc.php3文件 从第10行起修改如下
  $cfgServers[1]['host'] = 'localhost';
  $cfgServers[1]['port'] = '3306';
  $cfgServers[1]['adv_auth'] = false;
  $cfgServers[1]['stduser'] = 'root';
  $cfgServers[1]['stdpass'] = '';
  $cfgServers[1]['user'] = 'root';
  $cfgServers[1]['password'] = '';
  $cfgServers[1]['only_db'] = '';
  $cfgServers[1]['verbose'] = '';
  
  
  修改第65行
  require("english.inc.php3");为
  require("chinese_gb.inc.php3");
  保存此文件。
  
  启动apache
  /server/apache/bin/apachectl start
&n