茫茫網海中的冷日 - 對這文章發表回應
茫茫網海中的冷日
         
茫茫網海中的冷日
發生過的事,不可能遺忘,只是想不起來而已!
 恭喜您是本站第 1735632 位訪客!  登入  | 註冊
主選單

Google 自訂搜尋

Goole 廣告

隨機相片
IMG_00017.jpg

授權條款

使用者登入
使用者名稱:

密碼:


忘了密碼?

現在就註冊!

對這文章發表回應

發表限制: 非會員 可以發表

發表者: 冷日 發表時間: 2004/10/12 16:57:40
冷日在小企鵝上已經混了好一陣子了...
近日開始整理各式文件 , 希望能帶給大家一些幫助...
這次呢 , 就從最簡單也最常見的Apache+Mysql+PHP開始吧!

0.
先決條件是大家要先下載所需安裝的原始檔
MySQL : http://dev.mysql.com/downloads/
PHP : http://www.php.net/downloads.php
APACHE : http://httpd.apache.org/download.cgi

1.
安裝MySQL
>cd /usr/local
將mysql-3.22.32.tar.gz解壓縮
>tar zvxf mysql-3.22.32.tar.gz
進入目錄mysql-3.22.32
>cd /usr/local/mysql-3.22.32
下config指令
>./configure '--prefix=/usr/local/mysql' '--with-charset=big5' '--localstatedir=/var/mysqldb/'
>make && make install
到此若沒error出現,應算安裝完成,但開始所有動作之前,請記得以下動作
>scripts/mysql_install_db
(讓系統產生一些必要的table,若您的系統曾安裝過MySQL則此動作可免)

安裝apache
>cd /usr/local
將apache_1.3.20.tar.gz解壓縮
>tar zvxf apache_1.3.20.tar.gz
進入目錄apache_1.3.12
>cd /usr/local/apache_1.3.20
下config指令
>./configure '--prefix=/usr/local/apache' '--sysconfdir=/etc/httpd/conf' '--htdocsdir=/home/httpd/html' '--iconsdir=/home/httpd/icons' '--cgidir=/home/httpd/cgi-bin' '--activate-module=src/modules/php3/libphp3.a' '--enable-module=all'
>make && make install

安裝php3
>cd /usr/local
將php-3.0.15.tar.gz解壓縮
>tar zvxf php-3.0.15.tar.gz
進入目錄php-3.0.15
>cd /usr/local/php-3.0.15
下config指令
>./configure '--enable-trans-sid' '--enable-sysvsem' '--enable-sysvshm' '--with-ftp' '--with-mysql=/usr/local/mysql' '--with-apache=/usr/local/apache_1.3.20' '--with-config-file-path=/etc/httpd' '--enable-safe-mode' '--with-exec-dir=/usr/bin' '--with-system-regex' '--enable-magic-quotes' '--enable-track-vars' '--with-zlib' '--with-gdbm' '--enable-debugger' '--disable-debug' '--with-db2'
>make && make install
安裝到此請確定/usr/libexec目錄下libphp3.so檔案有存在,且都沒有error出現,安裝到此為止。

此時剩下一些設定部分
修改/etc/httpd/conf/httpd.conf檔,有兩個部分必須修改:
(視Apache版本與Linux版本不同,可能存在不同目錄)
A. DirectoryIndex index.html index.php
(加入index.php3)
B. 在srm.conf中(新版apache也在httpd.conf)
確定含有
AddType application/x-httpd-php3 .php
AddType application/x-httpd-php3-source .phps
(將這兩行的remark拿掉,並確定副檔名為php)

啟動與停止MySQL
在啟動MySQL之前,請先將mysql.server檔的權限做更動。
>/bin/chmod 0700 /usr/local/mysql/share/mysql/mysql.server
若要啟動MySQL
>/usr/local/mysql/share/mysql/mysql.server start
若要停掉MySQL
>/usr/local/mysql/share/mysql/mysql.server shutdown
希望在Linux啟動時自動載入MySQL,要在您的/etc/rc.d/rc.local檔案中加入一行:/usr/local/mysql/share/mysql/mysql.server start


PS : make && make install 表示先作make的動作再做make install的動作,而&&表示make成功後再執行makr install !
內容圖示
url email imgsrc image code quote
樣本
bold italic underline linethrough   












 [詳情...]
validation picture

注意事項:
預覽不需輸入認證碼,僅真正發送文章時才會檢查驗證碼。
認證碼有效期10分鐘,若輸入資料超過10分鐘,請您備份內容後,重新整理本頁並貼回您的內容,再輸入驗證碼送出。

選項

Powered by XOOPS 2.0 © 2001-2008 The XOOPS Project|