zvv

如何在CentOS 7中安装7ZIP/7za

第一种:源码编译安装


官网下载地址:http://www.7-zip.org/download.html 
源文件项目地址:http://sourceforge.net/projects/p7zip/ 
编译安装前,请先运行下面这句命令安装必要的套件包

yum install kernel-devel kernel-headers gcc-c++ make 

执行以下命令下载安装: 

wget http://nchc.dl.sourceforge.net/project/p7zip/p7zip/9.20.1/p7zip_9.20.1_src_all.tar.bz2 
tar -jxvf p7zip_9.20.1_src_all.tar.bz2 
cd p7zip_9.20.1 
make 
make install 

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

./install.sh /usr/local/bin /usr/local/lib/p7zip /usr/local/man /usr/local/share/doc/p7zip 
- installing /usr/local/bin/7za 
- installing /usr/local/man/man1/7z.1 
- installing /usr/local/man/man1/7za.1 
- installing /usr/local/man/man1/7zr.1 
- installing /usr/local/share/doc/p7zip/README 
- installing /usr/local/share/doc/p7zip/ChangeLog 
- installing HTML help in /usr/local/share/doc/p7zip/DOCS 

第二种:rpm安装 


下载地址:http://pkgs.repoforge.org/p7zip/ 

wget http://pkgs.repoforge.org/p7zip/p7zip-9.20.1-1.el5.rf.i386.rpm 
rpm -ivh p7zip-9.20.1-1.el5.rf.i386.rpm 


第三种:加入EPEL源,使用yum安装 


EPEL7几乎是 CentOS必备的源: 

sudo yum install -y epel-release
sudo yum install -y p7zip

 [scode type="green"]推荐用第三种简单方便[/scode]

当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »