步驟如下:
1. 進到對應擴充目錄
# cd /usr/local/src/php-5.2.12/ext/curl
2. 呼叫phpize程式產生編譯設定檔local/php5/bin/phpize
3. 呼叫configure產生Makefile文件,然後呼叫make編譯,make install安裝
# ./configure -with-curl=/usr/local/curl -with-php-config=/ usr/local/php5/bin/php-config# make# make install
4. 修改php設定檔
;修改擴充庫目錄extension_dir = "/usr/local/php5/lib/php/extensions/no-debug -non-zts-20060613/";新增curl擴充extension = curl.so
5. 重啟Apache即可。