centos安装7zip

本文转载自:http://blog.csdn.net/hellochenlian/article/details/44309969

首先不得不说的事,我先进行了实验。

压缩一个目录html

rar压缩   结果5.18M

zip压缩  结果5.06M

7z压缩   结果870K



第一种,源码编译安装
官网下载地址:http://www.7-zip.org/download.html
源文件项目地址:http://sourceforge.net/projects/p7zip/,目前最新版为9.20.1。

执行以下命令下载安装:

[html]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. wget http://nchc.dl.sourceforge.net/project/p7zip/p7zip/9.20.1/p7zip_9.20.1_src_all.tar.bz2  
  2. tar -jxvf p7zip_9.20.1_src_all.tar.bz2  
  3. cd p7zip_9.20.1  
  4. make  
  5. make install  

如果执行make命令时,提示安装g++的话,请执行

 yum install gcc-c++
安装g++

最后一步make install后出现以下信息,即为安装完毕

[html]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. ./install.sh /usr/local/bin /usr/local/lib/p7zip /usr/local/man /usr/local/share/doc/p7zip  
  2. - installing /usr/local/bin/7za  
  3. - installing /usr/local/man/man1/7z.1  
  4. - installing /usr/local/man/man1/7za.1  
  5. - installing /usr/local/man/man1/7zr.1  
  6. - installing /usr/local/share/doc/p7zip/README  
  7. - installing /usr/local/share/doc/p7zip/ChangeLog  
  8. - installing HTML help in /usr/local/share/doc/p7zip/DOCS  

第二种,rpm安装
下载地址:http://pkgs.repoforge.org/p7zip/,请以最新版为准。

在 CentOS 5.x 32位下安装7ZIP

[html]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. wget http://pkgs.repoforge.org/p7zip/p7zip-9.20.1-1.el5.rf.i386.rpm  
  2. rpm -ivh p7zip-9.20.1-1.el5.rf.i386.rpm  

在 CentOS 5.x 64位下安装7ZIP

[html]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. wget http://pkgs.repoforge.org/p7zip/p7zip-9.20.1-1.el5.rf.x86_64.rpm  
  2. rpm -ivh p7zip-9.20.1-1.el5.rf.x86_64.rpm  

在 CentOS 6.x 32位下安装7ZIP

[html]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. wget http://pkgs.repoforge.org/p7zip/p7zip-9.20.1-1.el6.rf.i686.rpm  
  2. rpm -ivh p7zip-9.20.1-1.el6.rf.i686.rpm  

在 CentOS 6.x 64位下安装7ZIP

wget http://pkgs.repoforge.org/p7zip/p7zip-9.20.1-1.el6.rf.x86_64.rpm
rpm -ivh p7zip-9.20.1-1.el6.rf.x86_64.rpm

第三种,yum安装
通过《在Centos 5.x或6.x上安装RHEL EPEL Repo》一文,安装RHEL EPEL Repo后,即可使用yum安装7ZIP。

命令如下:

yum install -y p7zip

[html]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. 7-Zip (A) [64] 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18  
  2. p7zip Version 9.20 (locale=zh_CN.UTF-8,Utf16=on,HugeFiles=on,1 CPU)  
  3.   
  4. Usage: 7za <command> [<switches>...] <archive_name> [<file_names>...]  
  5.        [<@listfiles...>]  
  6.   
  7. <Commands>  
  8.   a: Add files to archive  
  9.   b: Benchmark  
  10.   d: Delete files from archive  
  11.   e: Extract files from archive (without using directory names)  
  12.   l: List contents of archive  
  13.   t: Test integrity of archive  
  14.   u: Update files to archive  
  15.   x: eXtract files with full paths  
  16. <Switches>  
  17.   -ai[r[-|0]]{@listfile|!wildcard}: Include archives  
  18.   -ax[r[-|0]]{@listfile|!wildcard}: eXclude archives  
  19.   -bd: Disable percentage indicator  
  20.   -i[r[-|0]]{@listfile|!wildcard}: Include filenames  
  21.   -m{Parameters}: set compression Method  
  22.   -o{Directory}: set Output directory  
  23.   -p{Password}: set Password  
  24.   -r[-|0]: Recurse subdirectories  
  25.   -scs{UTF-8 | WIN | DOS}: set charset for list files  
  26.   -sfx[{name}]: Create SFX archive  
  27.   -si[{name}]: read data from stdin  
  28.   -slt: show technical information for l (List) command  
  29.   -so: write data to stdout  
  30.   -ssc[-]: set sensitive case mode  
  31.   -t{Type}: Set type of archive  
  32.   -u[-][p#][q#][r#][x#][y#][z#][!newArchiveName]: Update options  
  33.   -v{Size}[b|k|m|g]: Create volumes  
  34.   -w[{path}]: assign Work directory. Empty path means a temporary directory  
  35.   -x[r[-|0]]]{@listfile|!wildcard}: eXclude filenames  
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值