程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 網頁編程 >> PHP編程 >> 關於PHP編程 >> 通過UNIX源碼編譯安裝

通過UNIX源碼編譯安裝

編輯:關於PHP編程

本章將引導您如何安裝和設置PHP3。並介紹必要的知識和軟件。
基本的UNIX技巧(學會如何操作和“制作”一個C編譯器)
一個標准的ANSI C的編譯器
一個WEB服務器(顯然需要)
 
通過UNIX源碼編譯安裝
下載源文件
最新的源代碼可以在以下網址找到:http://www.php.net
快速安裝說明書(Apache Module 版本)
1. gunzip apache_1.3.x.tar.gz
2. tar xvf apache_1.3.x.tar
3. gunzip php-3.0.x.tar.gz
4. tar xvf php-3.0.x.tar
5. cd apache_1.3.x
6. ./configure --prefix=/www
7. cd ../php-3.0.x
8. ./configure --with-mysql --with-apache=../apache_1.3.x --enable-track-vars
9. make
10. make install
11. cd ../apache_1.3.x
12. ./configure --prefix=/www --activate-module=src/modules/php3/libphp3.a
13. make
14. make install
Instead of this step you may prefer to simply copy the httpd binaryovertop of your existing binary. Make sure you shut down yourserver first though.
(也可以使用直接拷貝httpd的二進制文件覆蓋已經存在的二進制文件的方法代替上面的步驟,但是,您必須首先關閉您的服務器。)
15. cd ../php-3.0.x
16. cp php3.ini-dist /usr/local/lib/php3.ini
You can edit /usr/local/lib/php3.ini file to set PHP options. If you prefer this file in another location, use --with-config-file=/path in step 8.
(您可以直接編輯/usr/local/lib/php3.ini文件來設置PHP選項,如果您將此文件存放在另一個位置,那麼請在步驟8中使用with-config-file=/path)
17. Edit your httpd.conf or srm.conf file and add:
AddType application/x-httpd-php3 .php3 You can choose any extension you wish here. .php3 is simply the one we suggest.
(您可以選擇任何您希望的擴展,我們認為PHP3是一個十分簡單的東西。)
18. Use your normal procedure for starting the Apache server.
(You must stop and restart the server, not just cause the server to reload by use a HUP or USR1 signal.)
(您必須停止和重新啟動服務器,而不能僅僅使用服務器的RELOAD(重新載入)功能。)

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved