在CentOS 5/RedHat 5上編譯源碼安裝pcre | Install pcre on CentOS 5 / Redhat 5
准備
1、下載源代碼。打開命令終端窗口,執行如下命令:
wget http://sourceforge.net/projects/pcre/files/pcre/8.34/pcre-8.34.zip/download
2、解壓。
unzip pcre-8.34.zip -d build/
cd build/pcre-8.34/
編譯安裝
在終端命令窗口執行如下命令:
./configure --prefix=/home/nieyong/local/pcre-8.34 --enable-pcre16 --enable-pcre32 --enable-utf --enable-pcregrep-libz --enable-pcregrep-libbz2 --enable-unicode-properties
make
make install 注:淡黃底色文字部分需根據自己的實際環境修改。
測試
進入安裝目錄的bin子目錄(/home/nieyong/local/pcre-8.34/bin),在終端命令窗口執行如下命令:
./pcretest -C
將輸出如下信息:
PCRE version 8.34 2013-12-15
Compiled with
8-bit support
UTF-8 support
16-bit support
UTF-16 support
32-bit support
UTF-32 support
Unicode properties support
No just-in-time compiler support
Newline sequence is LF
\R matches all Unicode newlines
Internal link size = 2
POSIX malloc threshold = 10
Parentheses nest limit = 250
Default match limit = 10000000
Default recursion depth limit = 10000000
Match recursion uses stack
<正文結束>
正則表達式庫 pcre 簡述 http://www.linuxidc.com/Linux/2014-04/99536.htm
pcre函數詳解 http://www.linuxidc.com/Linux/2014-04/99535.htm
編譯安裝Nginx和pcre http://www.linuxidc.com/Linux/2014-02/96137.htm
CentOS 6.4安裝配置Nginx+pcre+php-fpm http://www.linuxidc.com/Linux/2013-08/88984.htm
PCRE 的詳細介紹:請點這裡
PCRE 的下載地址:請點這裡
更多RedHat相關信息見RedHat 專題頁面 http://www.linuxidc.com/topicnews.aspx?tid=10
更多CentOS相關信息見CentOS 專題頁面 http://www.linuxidc.com/topicnews.aspx?tid=14