【学习笔记】系列四:Linux安装PCRE
2015-09-23 11:49
656 查看
1.下载PCRE包
首先去官网下载pcre的安装包,下载地址为:http://sourceforge.net/projects/pcre/files/pcre/
2.把安装包上传到服务器,然后解压
[root@localhost local]# tar -zxvf pcre-8.37.tar.gz
解压之后在当前目录下生成了一个文件夹:pcre-8.37
3.配置
[root@localhost pcre-8.32]# ./configure
配置完之后控制台会打印出pcre配置的摘要信息
pcre-8.37 configuration summary:
Install prefix .................. : /usr/local
C preprocessor .................. : gcc -E
C compiler ...................... : gcc
C++ preprocessor ................ : g++ -E
C++ compiler .................... : g++
Linker .......................... : /usr/bin/ld
C preprocessor flags ............ :
C compiler flags ................ : -O2 -fvisibility=hidden
C++ compiler flags .............. : -O2 -fvisibility=hidden -fvisibility-inlines-hidden
Linker flags .................... :
Extra libraries ................. :
Build 8 bit pcre library ........ : yes
Build 16 bit pcre library ....... : no
Build 32 bit pcre library ....... : no
Build C++ library ............... : yes
Enable JIT compiling support .... : no
Enable UTF-8/16/32 support ...... : no
Unicode properties .............. : no
Newline char/sequence ........... : lf
\R matches only ANYCRLF ......... : no
EBCDIC coding ................... : no
EBCDIC code for NL .............. : n/a
Rebuild char tables ............. : no
Use stack recursion ............. : yes
POSIX mem threshold ............. : 10
Internal link size .............. : 2
Match limit ..................... : 10000000
Match limit recursion ........... : MATCH_LIMIT
Build shared libs ............... : yes
Build static libs ............... : yes
Use JIT in pcregrep ............. : no
Buffer size for pcregrep ........ : 20480
Link pcregrep with libz ......... : no
Link pcregrep with libbz2 ....... : no
Link pcretest with libedit ...... : no
Link pcretest with libreadline .. : no
Valgrind support ................ : no
Code coverage ................... : no
4.编译
执行make操作:
[root@localhost pcre-8.37]# make
编译完后可以执行make check进行测试(这一步非必须)
Testing pcregrep version 8.372015-04-28
Testing pcregrep main features
Skipping pcregrep UTF-8 tests: no UTF-8 support in PCRE library
Testing pcregrep newline settings
PASS: RunGrepTest
==================
All 5 tests passed
==================
make[2]: Leaving directory `/usr/local/pcre-8.37'
make[1]: Leaving directory `/usr/local/pcre-8.37'
[root@localhost pcre-8.32]#
上面的make check结果中有一句:
Skipping pcregrep UTF-8 tests: no UTF-8 support in PCRE library
这是因为在前面步骤中执行./configuration配置时没有加上对utf-8的支持
如果要加上对utf-8的支持可以在./configuration时加上参数:
[root@localhost pcre-8.37]# ./configure --enable-utf8
配置完后再重新make
make完后再次执行make check结果如下:
Testing pcregrep version 8.372015-04-28
Testing pcregrep main features
Testing pcregrep UTF-8 features
Testing pcregrep newline settings
PASS: RunGrepTest
==================
All 5 tests passed
==================
make[2]: Leaving directory `/usr/local/pcre-8.37'
make[1]: Leaving directory `/usr/local/pcre-8.37'
[root@localhost pcre-8.37]#
5.安装
执行make install操作:
[root@localhost pcre-8.37]# make install
make install结束后pcre编译安装流程就结束了。
首先去官网下载pcre的安装包,下载地址为:http://sourceforge.net/projects/pcre/files/pcre/
2.把安装包上传到服务器,然后解压
[root@localhost local]# tar -zxvf pcre-8.37.tar.gz
解压之后在当前目录下生成了一个文件夹:pcre-8.37
3.配置
[root@localhost pcre-8.32]# ./configure
配置完之后控制台会打印出pcre配置的摘要信息
pcre-8.37 configuration summary:
Install prefix .................. : /usr/local
C preprocessor .................. : gcc -E
C compiler ...................... : gcc
C++ preprocessor ................ : g++ -E
C++ compiler .................... : g++
Linker .......................... : /usr/bin/ld
C preprocessor flags ............ :
C compiler flags ................ : -O2 -fvisibility=hidden
C++ compiler flags .............. : -O2 -fvisibility=hidden -fvisibility-inlines-hidden
Linker flags .................... :
Extra libraries ................. :
Build 8 bit pcre library ........ : yes
Build 16 bit pcre library ....... : no
Build 32 bit pcre library ....... : no
Build C++ library ............... : yes
Enable JIT compiling support .... : no
Enable UTF-8/16/32 support ...... : no
Unicode properties .............. : no
Newline char/sequence ........... : lf
\R matches only ANYCRLF ......... : no
EBCDIC coding ................... : no
EBCDIC code for NL .............. : n/a
Rebuild char tables ............. : no
Use stack recursion ............. : yes
POSIX mem threshold ............. : 10
Internal link size .............. : 2
Match limit ..................... : 10000000
Match limit recursion ........... : MATCH_LIMIT
Build shared libs ............... : yes
Build static libs ............... : yes
Use JIT in pcregrep ............. : no
Buffer size for pcregrep ........ : 20480
Link pcregrep with libz ......... : no
Link pcregrep with libbz2 ....... : no
Link pcretest with libedit ...... : no
Link pcretest with libreadline .. : no
Valgrind support ................ : no
Code coverage ................... : no
4.编译
执行make操作:
[root@localhost pcre-8.37]# make
编译完后可以执行make check进行测试(这一步非必须)
Testing pcregrep version 8.372015-04-28
Testing pcregrep main features
Skipping pcregrep UTF-8 tests: no UTF-8 support in PCRE library
Testing pcregrep newline settings
PASS: RunGrepTest
==================
All 5 tests passed
==================
make[2]: Leaving directory `/usr/local/pcre-8.37'
make[1]: Leaving directory `/usr/local/pcre-8.37'
[root@localhost pcre-8.32]#
上面的make check结果中有一句:
Skipping pcregrep UTF-8 tests: no UTF-8 support in PCRE library
这是因为在前面步骤中执行./configuration配置时没有加上对utf-8的支持
如果要加上对utf-8的支持可以在./configuration时加上参数:
[root@localhost pcre-8.37]# ./configure --enable-utf8
配置完后再重新make
make完后再次执行make check结果如下:
Testing pcregrep version 8.372015-04-28
Testing pcregrep main features
Testing pcregrep UTF-8 features
Testing pcregrep newline settings
PASS: RunGrepTest
==================
All 5 tests passed
==================
make[2]: Leaving directory `/usr/local/pcre-8.37'
make[1]: Leaving directory `/usr/local/pcre-8.37'
[root@localhost pcre-8.37]#
5.安装
执行make install操作:
[root@localhost pcre-8.37]# make install
make install结束后pcre编译安装流程就结束了。
相关文章推荐
- Linux 定时任务 crontab
- Linux服务器--2.DNS服务器的主从配置
- 清理linux swap内存,需要root权限
- 红帽Redhat6.4 iso下载地址
- CentOS 5.5安装gcc
- CentOS 6.3下部署LVS(NAT)+keepalived实现高性能高可用负载均衡
- linux安装rpm包时遇到Failed dependencies的解决办法
- Linux 进程空间,内存四区里都是些什么东西
- mysql linux安装
- linux常用的makefile模版编写-转
- Linux中使用expect脚本实现远程机器自动登录
- centos 挂载磁盘
- linux:SUID、SGID详解
- Linux SVN 命令大全
- linux下32位汇编hello, world!
- Media---I,P,B帧区别
- Linux各个服务的配置命令
- linux运维实战练习-2015年9月13日-9月15日课程作业
- Centos6.5安装与配置JDK-8(简单实用)
- linux /etc/hosts文件作用