国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > Linux > 正文

PHP4.03在linux下的安裝

2024-08-28 00:23:34
字體:
來源:轉載
供稿:網友

所需軟件

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

  第三步 測試

在/server/apache/htdocs/下鏈接目錄/server/phpmyadmin_2.0.5為admin
在流覽器中打開http://localhost/admin/index.php3 這時該能連接到mysql的數據庫中,你可以對數所庫進行操作。這表明整個系統以能正常工作。 你也可以新建立一個php文件如下


文件名 info.php


//查看系統狀況 文件開始

< ? phpinfo();?>

//文件結束


在流覽器中訪問此頁時你將得到有關php的運行資料.

注.本文中所有內容都在文中有關的平臺上運行通過,不同的php版本可能會有所不同。注冊會員,創建你的web開發資料庫,
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 安龙县| 三原县| 运城市| 太原市| 油尖旺区| 泗阳县| 东山县| 新干县| 新源县| 洛南县| 禄劝| 扶余县| 哈密市| 盘山县| 曲阜市| 红安县| 武宣县| 视频| 眉山市| 梅河口市| 阿巴嘎旗| 绥芬河市| 遂川县| 昭通市| 高密市| 固镇县| 偏关县| 康保县| 新泰市| 文山县| 措美县| 天峨县| 都安| 宁武县| 新乐市| 武定县| 巧家县| 金溪县| 舟山市| 什邡市| 宝兴县|