[root@xd502djj ~]# yum install lzop Loaded plugins: fastestmirror Determining fastest mirrors * base: mirrors.btte.net * extras: mirrors.yun-idc.com * updates: mirrors.yun-idc.com base | 3.7 kB 00:00 extras | 3.4 kB 00:00 extras/primary_db | 32 kB 00:00 updates | 3.4 kB 00:00 updates/primary_db | 1.9 MB 00:10 Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package lzop.x86_64 0:1.02-0.9.rc1.el6 will be installed --> Processing Dependency: liblzo2.so.2()(64bit) for package: lzop-1.02-0.9.rc1.el6.x86_64 --> Running transaction check ---> Package lzo.x86_64 0:2.03-3.1.el6_5.1 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================================================================================================================ Package Arch Version Repository Size ================================================================================================================================================================================ Installing: lzop x86_64 1.02-0.9.rc1.el6 base 50 k Installing for dependencies: lzo x86_64 2.03-3.1.el6_5.1 base 55 k Transaction Summary ================================================================================================================================================================================ Install 2 Package(s) Total download size: 105 k Installed size: 253 k Is this ok [y/N]: y Downloading Packages: (1/2): lzo-2.03-3.1.el6_5.1.x86_64.rpm | 55 kB 00:00 (2/2): lzop-1.02-0.9.rc1.el6.x86_64.rpm | 50 kB 00:00 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Total 184 kB/s | 105 kB 00:00 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : lzo-2.03-3.1.el6_5.1.x86_64 1/2 Installing : lzop-1.02-0.9.rc1.el6.x86_64 2/2 Verifying : lzop-1.02-0.9.rc1.el6.x86_64 1/2 Verifying : lzo-2.03-3.1.el6_5.1.x86_64 2/2 Installed: lzop.x86_64 0:1.02-0.9.rc1.el6 Dependency Installed: lzo.x86_64 0:2.03-3.1.el6_5.1 Complete! [root@vm2070 ~]# lzop Lempel-Ziv-Oberhumer Packer Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 lzop v1.02rc1 Markus Franz Xaver Johannes Oberhumer Jul 25th 2005 Usage: lzop [-dxlthIVL19] [-qvcfFnNPkUp] [-o file] [-S suffix] [file..] Commands: -1 compress faster -9 compress better -d decompress -x extract (same as -dPp) -l list compressed file -I display system information -t test compressed file -V display version number -h give this help -L display software license Options: -q be quiet -v be verbose -c write on standard output -oFILE write output to `FILE' -p write output to current dir -pDIR write to path `DIR' -f force overwrite of output files -n do not restore the original file name (default) -N restore the original file name -P restore or save the original path and file name -S.suf use suffix .suf on compressed files -U delete input files after successful operation (like gzip and bzip2) file.. files to (de)compress. If none given, try standard input.
--------------------
2、安裝lzo 操作如下: wget http://www.oberhumer.com/opensource/lzo/download/lzo-2.06.tar.gz export CFLAGS=-m32 ./configure -enable-shared make && make install 完成之后,lib庫文件被默認安裝到了/usr/local/lib,我們需要進一步指定lzo庫文件的路徑,兩個方法都可以: 1)拷貝/usr/local/lib目錄下的lzo庫文件到/usr/lib(32位平台),或/usr/lib64(64位平台) 2)在/etc/ld.so.conf.d/目錄下新建lzo.conf文件,只需寫入lzo庫文件的路徑(/usr/local/lib),然后運行以下命令使配置生效:
3 安裝lzop LZOP是使用lzo庫寫的一個程序,通過shell命令直接可以壓縮、解壓縮文件。 #下載 Wget http://www.lzop.org/download/lzop-1.03.tar.gz #解壓縮、進入項目目錄(略過) ./configure make make install 用一下lzop的壓縮解壓功能,成功安裝后可直接使用lzop命令對文件進行解壓縮操作了。 # 壓縮 lzop 20110915.log #生成lzop 20110915.log.lzo文件 # 解壓,並輸出文件內容 lzop -cdpv.txt.lzo |more