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

PHP
《PHP设计模式介绍》第十三章 适配器模式
《PHP设计模式介绍》第十四章 动态记录模式
《PHP设计模式介绍》第十五章 表数据网关模式
《PHP设计模式介绍》第十六章 数据映射模式
《PHP设计模式介绍》第十七章 MVC 模式
Zend Framework 入门——快速上手
Zend Framework 入门——多国语言支持
Zend Framework 入门——错误处理
Zend Framework 入门——页面布局
详细介绍php5编程中的异常处理
PHP5 OOP编程中的代理与异常
PHP程序的常见漏洞攻击分析
PHP.MVC的模板标签系统
PHP教程:PHP编码书写规范
PHP开发大型项目的方法:OOP思想
php使用curl模拟用户登陆
php对gb编码动态转utf-8编码的几种方法评测
php设计模式介绍之章代理模式
“在phpMyAdmin使用用户口令登陆”补充
PHP入门速成

PHP4.03在linux下的安装


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 124 ::
收藏到网摘: 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