[原創] 獨立 Apache/MySQL/php/phpMyAdmin【圖文安裝教學】超詳細

phpBB-TW Knowledge Base
收集網友們在竹貓所發表的教學主題或文章,以利分享!
(僅供瀏覽,由版主群維護)
chiouss
竹貓忠實會員
竹貓忠實會員
文章: 1741
註冊時間: 2002-11-29 18:19

文章 chiouss »

chrislin2k 寫:1)可否安裝phpbbs2?
可以
2)如何安裝呢? 如果不行, 要如何安裝D 4.1呢?
這個問題我們就不要在這邊討論了 :Q
chrislin2k
星球公民
星球公民
文章: 40
註冊時間: 2005-02-22 08:24
來自: vancouver
聯繫:

文章 chrislin2k »

感謝大大教導
完全安裝成功^^
頭像
心靈捕手
默默耕耘的老師
默默耕耘的老師
文章: 8510
註冊時間: 2004-04-30 01:54
來自: Taiwan

文章 心靈捕手 »

感謝樓主的分享! :-D

原本我使用 AppServ 2.4.6 升級 MySQL 5.0.24 時,
是利用 mysql-noinstall-5.0.24-win32.zip 成功.
http://phpbb-tw.net/phpbb/viewtopic.php?p=245172#245172

昨天反解 AppServ 後, 自行逐一升級 Apache, MySQL, PHP, PMA 時,
卻一直無法順利啟動 MySQL.
http://wang5555.dyndns.org/phpbb2/viewt ... 0675#40675

後來參考 innostr1am 的作法,
安裝了 mysql-5.0.24-win32.zip 才得已順利啟動 MySQL.
http://mysql.isu.edu.tw/Downloads/MySQL ... -win32.zip

ps.
將此文置頂, 方便網友查詢.
施比受有福,祝福您好運! ^_^
歡迎光臨★★心靈捕手★★ :: 討論區
https://wang5555.dnsfor.me/phpBB3/
小笨魚
星球普通子民
星球普通子民
文章: 5
註冊時間: 2006-10-12 19:59

文章 小笨魚 »

對不起,我是新手,可不可以請高人指點一下...
我已經按照上面的步驟全部安裝完畢了...
apache在還沒安裝mysql php phpMyAdmin 前的http://localhost/沒有問題,進的去.
可是我全部安裝完後測試http://localhost/phpMyAdmin 一直都是"沒有網頁可顯示",後來連http://localhost/也進不去了..
我想請問一下是不是我沒有安裝好呢??
chiouss
竹貓忠實會員
竹貓忠實會員
文章: 1741
註冊時間: 2002-11-29 18:19

文章 chiouss »

小笨魚 寫:對不起,我是新手,可不可以請高人指點一下...
我已經按照上面的步驟全部安裝完畢了...
apache在還沒安裝mysql php phpMyAdmin 前的http://localhost/沒有問題,進的去.
可是我全部安裝完後測試http://localhost/phpMyAdmin 一直都是"沒有網頁可顯示",後來連http://localhost/也進不去了..
我想請問一下是不是我沒有安裝好呢??
應該是你 Apache 沒有跑起來...如果怎麼跑都不會起來的話請看看你的 access.log 和 error.log,上面通常會有原因
小笨魚
星球普通子民
星球普通子民
文章: 5
註冊時間: 2006-10-12 19:59

文章 小笨魚 »

下面是我的 error.log 可是我找不出原因耶~~@@ 可以幫我看一下嗎?

[Sat Oct 14 19:57:03 2006] [notice] Apache/2.0.58 (Win32) configured -- resuming normal operations
[Sat Oct 14 19:57:03 2006] [notice] Server built: Apr 29 2006 17:47:10
[Sat Oct 14 19:57:04 2006] [notice] Parent: Created child process 1376
[Sat Oct 14 19:57:04 2006] [notice] Child 1376: Child process is running
[Sat Oct 14 19:57:04 2006] [notice] Child 1376: Acquired the start mutex.
[Sat Oct 14 19:57:04 2006] [notice] Child 1376: Starting 250 worker threads.
[Sat Oct 14 20:00:02 2006] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Sat Oct 14 20:00:02 2006] [notice] Child 1376: Exit event signaled. Child process is ending.
[Sat Oct 14 20:00:03 2006] [notice] Child 1376: Released the start mutex
[Sat Oct 14 20:00:04 2006] [notice] Child 1376: Waiting for 250 worker threads to exit.
[Sat Oct 14 20:00:04 2006] [notice] Child 1376: All worker threads have exited.
[Sat Oct 14 20:00:04 2006] [notice] Child 1376: Child process is exiting
[Sat Oct 14 20:00:05 2006] [notice] Parent: Child process exited successfully.
[Sat Oct 14 20:00:11 2006] [notice] Apache/2.0.58 (Win32) configured -- resuming normal operations
[Sat Oct 14 20:00:11 2006] [notice] Server built: Apr 29 2006 17:47:10
[Sat Oct 14 20:00:11 2006] [notice] Parent: Created child process 3728
[Sat Oct 14 20:00:11 2006] [notice] Child 3728: Child process is running
[Sat Oct 14 20:00:11 2006] [notice] Child 3728: Acquired the start mutex.
[Sat Oct 14 20:00:11 2006] [notice] Child 3728: Starting 250 worker threads.
[Sat Oct 14 20:15:15 2006] [notice] Parent: Received restart signal -- Restarting the server.
[Sat Oct 14 20:15:15 2006] [notice] Child 3728: Exit event signaled. Child process is ending.
[Sat Oct 14 20:15:15 2006] [notice] Apache/2.0.58 (Win32) configured -- resuming normal operations
[Sat Oct 14 20:15:15 2006] [notice] Server built: Apr 29 2006 17:47:10
[Sat Oct 14 20:15:15 2006] [notice] Parent: Created child process 3732
[Sat Oct 14 20:15:16 2006] [notice] Child 3732: Child process is running
[Sat Oct 14 20:15:16 2006] [notice] Child 3728: Released the start mutex
[Sat Oct 14 20:15:16 2006] [notice] Child 3732: Acquired the start mutex.
[Sat Oct 14 20:15:16 2006] [notice] Child 3732: Starting 250 worker threads.
[Sat Oct 14 20:15:17 2006] [notice] Child 3728: Waiting for 250 worker threads to exit.
[Sat Oct 14 20:15:17 2006] [notice] Child 3728: All worker threads have exited.
[Sat Oct 14 20:15:17 2006] [notice] Child 3728: Child process is exiting
頭像
pcrick
星球公民
星球公民
文章: 54
註冊時間: 2004-05-31 14:59

文章 pcrick »

引言回覆:
6. 再搜尋 extension=php_mysql.dll
把 extension=php_mysql.dll 前面的;去掉
使 MySQL 函數庫可以運行

引言回覆:
7. 再搜尋 ;session.save_path = "/tmp"
把 include_path 前面的;去掉
並在等號後 "/tmp" 取代成 "C:\Apache2\tmp"
使用檔案總管在你的C:\ 開新資料夾,名稱為 tmp

引言回覆:
8. 完成以上步驟後將 php.ini 存檔 (注意不要存成 php.ini.txt)

引言回覆:
9. 進入 C:\php 複製 libmysql.dll 與 php5ts.dll 到系統安裝目錄下的 system32
( WIN2000 預設是 C:\WINNT\system32,WIN XP 預設是C:\WINDOWS\system32)
php5ts.dll 以使您的 PHP 作為 Apache 的 PHP-Module
libmysql.dll 搭配步驟7的extension php_mysql.dll 後PHP5才能使用MySQL資料庫

引言回覆:
10. 開啟 Apache 的配置檔 httpd.conf
搜尋 DirectoryIndex index.html (設定預設首頁,可以更改前後順序將 index.php 加到 DirectoryIndex 後面 ,中間要空一格

於配置檔最後面加入以下內容存檔後關閉
# For PHP 5 do something like this:
LoadModule php5_module "c:/Apache2/php/php5apache2.dll"
AddType application/x-httpd-php .php

# configure the path to php.ini
PHPIniDir "c:/Apache2/php"
假如我是安裝php-4.4.4-Win32.zip mysql-4.0.26-win32.zip那引言部份要如何更改呢???
因為好幾個部驟都找不到代碼? :cry: :cry:
chiouss
竹貓忠實會員
竹貓忠實會員
文章: 1741
註冊時間: 2002-11-29 18:19

文章 chiouss »

pcrick 寫:假如我是安裝php-4.4.4-Win32.zip mysql-4.0.26-win32.zip那引言部份要如何更改呢???
因為好幾個部驟都找不到代碼? :cry: :cry:
你找不到什麼?說出來我給你一個痛快吧! :P
chiouss
竹貓忠實會員
竹貓忠實會員
文章: 1741
註冊時間: 2002-11-29 18:19

文章 chiouss »

小笨魚 寫:下面是我的 error.log 可是我找不出原因耶~~@@ 可以幫我看一下嗎?
從你貼的部份看起來是有跑起來,連 404 都沒有...
你怎麼連你的 web server 的? @.@
頭像
pcrick
星球公民
星球公民
文章: 54
註冊時間: 2004-05-31 14:59

文章 pcrick »

chiouss 寫:
pcrick 寫:假如我是安裝php-4.4.4-Win32.zip mysql-4.0.26-win32.zip那引言部份要如何更改呢???
因為好幾個部驟都找不到代碼? :cry: :cry:
你找不到什麼?說出來我給你一個痛快吧! :P
如我之前貼的~~
步驟7: 找不到

代碼: 選擇全部

7. 再搜尋 ;session.save_path = "/tmp" 
只找到

代碼: 選擇全部

;     session.save_path = "N;/path"
看起來很像,就照著改了!!!(不過有二個地方都發現session.save_path )

步驟9: 找不到

代碼: 選擇全部

複製 php5ts.dll 到系統安裝目錄下的 system32 
因為我的是4.4.4版吧?!

步驟10:

代碼: 選擇全部

於配置檔最後面加入以下內容存檔後關閉 
# For PHP 5 do something like this: 
LoadModule php5_module "c:/Apache2/php/php5apache2.dll" 
AddType application/x-httpd-php .php 

# configure the path to php.ini 
PHPIniDir "c:/Apache2/php"
這一段應該不是這樣寫了吧??因為照這樣改之後,無法重新啟動APACHE

目前進度就只能停在這了!!!還望各位指點一二,THANKS!!!
chiouss
竹貓忠實會員
竹貓忠實會員
文章: 1741
註冊時間: 2002-11-29 18:19

文章 chiouss »

pcrick 寫:只找到

代碼: 選擇全部

;     session.save_path = "N;/path"
看起來很像,就照著改了!!!(不過有二個地方都發現session.save_path )
改了記得把前面的 ; 拿掉,這樣才有效...
因為我的是4.4.4版吧?!
對,所以你的是 php4ts.dll
這一段應該不是這樣寫了吧??因為照這樣改之後,無法重新啟動APACHE
要會變通阿!你用的是 php4,你的檔案裡面的名稱就都是 php4 不會冒出 php5 Orz
頭像
pcrick
星球公民
星球公民
文章: 54
註冊時間: 2004-05-31 14:59

文章 pcrick »

chiouss 寫:要會變通阿!你用的是 php4,你的檔案裡面的名稱就都是 php4 不會冒出 php5 Orz
謝謝您的指點!! :oops: :oops:
我將步驟10改成

代碼: 選擇全部

# For PHP 4 do something like this: 
#LoadModule php5_module "c:/Apache2/php/php4ts.dll" 
#AddType application/x-httpd-php .php 

# configure the path to php.ini 
#PHPIniDir "c:/Apache2/php"
不知道對不對???不過已經可以重新啟動APACHE了 :lol:
但是解壓縮phpMyAdmin 至C:\Apache2\htdocs\phpMyAdmin 後,
開啟瀏覽器,輸入網址 http://localhost/phpMyAdmin/ ,
確直接看到PHP的程式碼= =....
如下

代碼: 選擇全部

<?php
/* $Id: index.php,v 2.33.2.2 2006/04/20 14:14:19 nijel Exp $ */
// vim: expandtab sw=4 ts=4 sts=4:
/**
 * forms frameset
 *
 * @uses    libraries/common.lib.php        global fnctions
 * @uses    libraries/relation.lib.php      table relations
 * @uses    $GLOBALS['strNoFrames']
 * @uses    $GLOBALS['cfg']['QueryHistoryDB']
 * @uses    $GLOBALS['cfg']['Server']['user']
 * @uses    $GLOBALS['cfg']['DefaultTabServer']     as src for the mainframe
 * @uses    $GLOBALS['cfg']['DefaultTabDatabase']   as src for the mainframe
 * @uses    $GLOBALS['cfg']['LeftWidth']            for left frame width
 * @uses    $GLOBALS['collation_connection']    from $_REQUEST (grab_globals.lib.php)
 *                                              or common.lib.php
 * @uses    $GLOBALS['available_languages'] from common.lib.php (select_lang.lib.php)
 * @uses    $GLOBALS['db']
 * @uses    $GLOBALS['charset']
 * @uses    $GLOBALS['lang']
 * @uses    $GLOBALS['text_dir']
 * @uses    $_ENV['HTTP_HOST']
 * @uses    PMA_getRelationsParam()
 * @uses    PMA_purgeHistory()
 * @uses    PMA_generate_common_url()
 * @uses    PMA_VERSION
 * @uses    session_write_close()
 * @uses    time()
 * @uses    PMA_getenv()
 * @uses    header()                to send charset
 */

/**
 * Gets core libraries and defines some variables
 */
require_once('./libraries/common.lib.php');

/**
 * Includes the ThemeManager if it hasn't been included yet
 */
require_once('./libraries/relation.lib.php');

// free the session file, for the other frames to be loaded
session_write_close();

// Gets the host name
// loic1 - 2001/25/11: use the new globals arrays defined with php 4.1+
if (empty($HTTP_HOST)) {
    if (PMA_getenv('HTTP_HOST')) {
        $HTTP_HOST = PMA_getenv('HTTP
以下略........
是不是PHP沒有裝好啊??? :cry: :cry:
chiouss
竹貓忠實會員
竹貓忠實會員
文章: 1741
註冊時間: 2002-11-29 18:19

文章 chiouss »

pcrick 寫:但是解壓縮phpMyAdmin 至C:\Apache2\htdocs\phpMyAdmin 後,
開啟瀏覽器,輸入網址 http://localhost/phpMyAdmin/ ,
確直接看到PHP的程式碼= =....
是不是PHP沒有裝好啊??? :cry: :cry:
你沒有加上 AddType 的部份吧?
還有,你在 httpd.conf 裡面更改的東西,前面不要加 # 上去,那樣會變成註解...
頭像
pcrick
星球公民
星球公民
文章: 54
註冊時間: 2004-05-31 14:59

Re: [原創] 獨立 Apache/MySQL/php/phpMyAdmin【圖文安裝教學】超詳細

文章 pcrick »

hankyuan 寫:
innostr1am 寫:
於配置檔最後面加入以下內容存檔後關閉
# For PHP 5 do something like this:
LoadModule php5_module "c:/Apache2/php/php5apache2.dll"
AddType application/x-httpd-php .php

# configure the path to php.ini
PHPIniDir "c:/Apache2/php"

它裡面寫的也是錯的....

是...

# For PHP 5 do something like this:
#LoadModule php5_module "c:/Apache2/php/php5apache2.dll"
#AddType application/x-httpd-php .php

# configure the path to php.ini
#PHPIniDir "c:/Apache2/php"

才對....
我是照這裡改的!!! :-|
因為假如沒有打# 註解的話, 就無法重新啟動APACHE :?: :?:
還是AddType要如何更改呢??? :-( :-(
頭像
pcrick
星球公民
星球公民
文章: 54
註冊時間: 2004-05-31 14:59

文章 pcrick »

chiouss 寫:你沒有加上 AddType 的部份吧?
還有,你在 httpd.conf 裡面更改的東西,前面不要加 # 上去,那樣會變成註解...
剛剛去看了error.log , 發現問題好像是出在 AddType, 如下~~
[Mon Oct 16 00:13:11 2006] [notice] Parent: Received restart signal -- Restarting the server.
Syntax error on line 958 of C:/Apache2/conf/httpd.conf:
Can't locate API module structure `php4_module' in file C:/Apache2/php/php4ts.dll: No error
[Mon Oct 16 00:13:12 2006] [warn] (OS 995)因為執行緒結束或應用程式要求,所以已中止 I/O 操作。 : winnt_accept: Asynchronous AcceptEx failed.
[Mon Oct 16 00:13:12 2006] [notice] Child 1672: Released the start mutex
[Mon Oct 16 00:13:13 2006] [notice] Child 1672: Waiting for 250 worker threads to exit.
[Mon Oct 16 00:13:13 2006] [notice] Child 1672: All worker threads have exited.
[Mon Oct 16 00:13:13 2006] [notice] Child 1672: Child process is exiting
不知道這要如何解決了??

P.S::先謝謝 chiouss 的幫助與指導(:Y)
回覆文章

回到「教學文件庫」