pigz是压缩命令gzip的并行版,默认线程数是cpu个数。在centos7中可以用yum安装,在centos6,yum源中没有找到,使用下面的命令安装:
1、安装基础包:
yum install zlib-devel gcc gcc-c++ -y
2、下载pigz包:
wget http://www.zlib.net/pigz/pigz-2.4.tar.gz
3、解压,编译:
tar xvf pigz-2.4.tar.gz
cd pigz-2.4
make
echo $?
ln -s /etc/yum.repos.d/pigz-2.4/pigz /bin/pigz
4、验证:
[root@centos6 pigz-2.4]# pigz
Usage: pigz [options] [files ...]
will compress files in place, adding the suffix '.gz'. If no files are
specified, stdin will be compressed to stdout. pigz does what gzip does,
but spreads the work over multiple processors and cores when compressing.
Options:
-0 to -9, -11 Compression level (level 11, zopfli, is much slower)
--fast, --best Compression levels 1 and 9 respectively
-b, --blocksize mmm Set compression block size to mmmK (default 128K)
-c, --stdout Write all processed output to stdout (won't delete)
-d, --decompress Decompress the compressed input
-f, --force Force overwrite, compress .gz, links, and to terminal
-F --first Do iterations first, before block split for -11
-h, --help Display a help screen

本文介绍了在CentOS6.8上编译安装pigz的步骤,包括安装基础包,下载pigz源代码,解压编译,并提供了在Redhat6.0遇到问题的参考链接。
最低0.47元/天 解锁文章
3768

被折叠的 条评论
为什么被折叠?



