centos安装7zip

本文转载自:http://www.jb51.cc/article/p-qeyedqyy-ex.html

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

压缩一个目录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
  1. wgethttp://nchc.dl.sourceforge.net/project/p7zip/p7zip/9.20.1/p7zip_9.20.1_src_all.tar.bz2
  2. tar-jxvfp7zip_9.20.1_src_all.tar.bz2
  3. cdp7zip_9.20.1
  4. make
  5. makeinstall

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

yuminstallgcc-c++
安装g++

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


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

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

copy

wgethttp://pkgs.repoforge.org/p7zip/p7zip-9.20.1-1.el5.rf.i386.rpm
  • rpm-ivhp7zip-9.20.1-1.el5.rf.i386.rpm

  • 在 CentOS 5.x 64位下安装7ZIP
    copy
    wgethttp://pkgs.repoforge.org/p7zip/p7zip-9.20.1-1.el5.rf.x86_64.rpm
  • rpm-ivhp7zip-9.20.1-1.el5.rf.x86_64.rpm

  • 在 CentOS 6.x 32位下安装7ZIP
    copy
    wgethttp://pkgs.repoforge.org/p7zip/p7zip-9.20.1-1.el6.rf.i686.rpm
  • rpm-ivhp7zip-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

    copy

    7-Zip(A)[64]9.20copyright(c)1999-2010IgorPavlov2010-11-18
  • p7zipVersion9.20(locale=zh_CN.UTF-8,Utf16=on,HugeFiles=on,1cpu)
  • Usage:7za<command>[switches>...]archive_namefile_names>...]
  • [<@listfiles...>]
  • Commands>
  • a:Addfilestoarchive
  • b:Benchmark
  • d:Deletefilesfromarchive
  • e:Extractfilesfromarchive(withoutusingdirectorynames)
  • l:Listcontentsofarchive
  • t:Testintegrityofarchive
  • u:Updatefilestoarchive
  • x:eXtractfileswithfullpaths
  • Switches>
  • -ai[r[-|0]]{@listfile|!wildcard}:Includearchives
  • -ax[r[-|0]]{@listfile|!wildcard}:eXcludearchives
  • -bd:disablepercentageindicator
  • -i[r[-|0]]{@listfile|!wildcard}:Includefilenames
  • -m{Parameters}:setcompressionMethod
  • -o{Directory}:setoutputdirectory
  • -p{Password}:setPassword
  • -r[-|0]:Recursesubdirectories
  • -scs{UTF-8|WIN|DOS}:setcharsetforlistfiles
  • -sfx[{name}]:CreateSFXarchive
  • -si[{name}]:readdatafromstdin
  • -slt:showtechnicalinformationforl(List)command
  • -so:writedatatostdout
  • -ssc[-]:setsensitivecasemode
  • -t{Type}:Settypeofarchive
  • -u[-][p#][q#][r#][x#][y#][z#][!newArchiveName]:Updateoptions
  • -v{Size}[b|k|m|g]:Createvolumes
  • -w[{path}]:assignworkdirectory.Emptypathmeansatemporarydirectory
  • -x[r[-|0]]]{@listfile|!wildcard}:eXcludefilenames
  • 相关文章

    Centos下搭建性能监控Spotlight
    CentOS 6.3下Strongswan搭建IPSec VPN
    在CentOS6.5上安装Skype与QQ
    阿里云基于centos6.5主机VPN配置
    CentOS 6.3下配置multipah
    CentOS安装、配置APR和tomcat-native