阅读模式:

linux 安装rar解压工具

查看:12723  回复:0  类型:  来源:php自学网  标签 运维 centos linux

        linux中默认的tar命令用于解压压缩文件,但是tar命令不支持rar文件的解压和压缩,需要安装rar解压工具,实现rar命令解压rar压缩包。

        1.下载rarlab软件

            官网下载页面:https://www.rarlab.com/download.htm

            rar工具软件下载地址(RAR 5.50 for Linux x64):https://www.rarlab.com/rar/rarlinux-x64-5.5.0.tar.gz

wget -c https://www.rarlab.com/rar/rarlinux-x64-5.5.0.tar.gz

        2.解压和安装rar工具

tar -xzvf rarlinux-x64-5.5.0.tar.gz
#加压后生产rar目录
cd rar

[root@localhost rar]# ls 
acknow.txt  default.sfx  license.txt  makefile  order.htm  rar  rarfiles.lst  rar.txt  readme.txt  unrar  whatsnew.txt

[root@localhost rar]# make && make install
mkdir -p /usr/local/bin
mkdir -p /usr/local/lib
cp rar unrar /usr/local/bin
cp rarfiles.lst /etc
cp default.sfx /usr/local/lib
mkdir -p /usr/local/bin
mkdir -p /usr/local/lib
cp rar unrar /usr/local/bin
cp rarfiles.lst /etc
cp default.sfx /usr/local/lib

        3.使用 rar压缩 unrar解压文件

#压缩
[root@localhost rar]# rar a all *

RAR 5.50   Copyright (c) 1993-2017 Alexander Roshal   11 Aug 2017
Trial version             Type 'rar -?' for help

Evaluation copy. Please register.

Creating archive all.rar

Adding    acknow.txt                                                  OK 
Adding    default.sfx                                                 OK 
Adding    license.txt                                                 OK 
Adding    makefile                                                    OK 
Adding    order.htm                                                   OK 
Adding    rar                                                         OK 
Adding    rarfiles.lst                                                OK 
Adding    rar.txt                                                     OK 
Adding    readme.txt                                                  OK 
Adding    unrar                                                       OK 
Adding    whatsnew.txt                                                OK 
Done
[root@localhost rar]# ls
acknow.txt  default.sfx  makefile   rar           rar.txt     unrar
all.rar     license.txt  order.htm  rarfiles.lst  readme.txt  whatsnew.txt

#解压
unrar e 文件名
[root@localhost rar]# unrar e all.rar

UNRAR 5.50 freeware      Copyright (c) 1993-2017 Alexander Roshal

Extracting from all.rar
Extracting  acknow.txt                                                OK 
Extracting  default.sfx                                               OK 
Extracting  license.txt                                               OK 
Extracting  makefile                                                  OK 
Extracting  order.htm                                                 OK 
Extracting  rar                                                       OK 
Extracting  rarfiles.lst                                              OK 
Extracting  rar.txt                                                   OK 
Extracting  readme.txt                                                OK 
Extracting  unrar                                                     OK 
Extracting  whatsnew.txt                                              OK 
All OK
分享到:
1 0

*有问题之处烦请在评论中指出非常感谢!
不是我想要的内容,继续搜索:

扫描二维码手机查看

发布评论:


登录:
  表情:
评论话题
推荐阅读:
用php从1乘到100的值   阅读:7313HTTP 1.1 协议详解   阅读:15786php+redis实现消息队列   阅读:17042PHP 鸟哥:我也曾经是“不适合”编程的人   阅读:16479移动端自适应rem原理   阅读:10665nginx安装mysql和json模块   阅读:6750mysql 为什么添加索引可以提高访问速度   阅读:7096一键分享到QQ空间、QQ好友、新浪微博、微信代码   阅读:137411php中地址引用&的真正理解-变量引用、函数引用、对象引用   阅读:6848mysql5.7主从同步中binlog同步模式详解   阅读:9295javascript点击复制内容   阅读:8208centos 7 设置 nginx-1.11.10 开机启动   阅读:9053centos 7搭建zabbix3.4   阅读:7627web项目高并发量网站解决方案   阅读:5435php中地址引用&的真正理解-变量引用、函数引用、对象引用   阅读:6848centos 7 安装 redis 3.2.9   阅读:7644linux教程,鸟哥私房菜(pdf全集)   阅读:11498封装php redis缓存操作类   阅读:10480封装php redis缓存操作类   阅读:10480php打印九九加法表   阅读:12559php文件下载防盗链   阅读:11038centos 7 添加 redis 3.2.9 开机启动脚本   阅读:10628shell脚本破解十位数内的所有纯数字rar加密压缩包脚本   阅读:10351php连接redis   阅读:6561解决 nginx 413 request entity too large   阅读:5403centos 7 修改系统屏幕分辨率   阅读:50166nginx安装mysql和json模块   阅读:6750霍金24岁博士毕业论文在线预览   阅读:6581centos 7 安装 redis 3.2.9   阅读:7644php打印九九加法表   阅读:12559比phpexcel还要简单的excel CSV 一键导入数据到数据库   阅读:6172PHP 鸟哥:我也曾经是“不适合”编程的人   阅读:16479centos 7 安装 redis 3.2.9   阅读:7644最简单的Banner轮播淡入淡出效果代码及实现思路(附带源码)   阅读:14980html5 离线缓存的使用   阅读:5104把php session 会话保存到redis   阅读:8459解决 nginx 413 request entity too large   阅读:5403php翻转字符串   阅读:4483Nginx 配置文件详解   阅读:6086linux php7安装yaf扩展   阅读:9800PHP 鸟哥:我也曾经是“不适合”编程的人   阅读:16479小米手机端商城rem适配原理   阅读:7712php连接redis   阅读:6561crontab+shell脚本实现定时备份mysql数据库   阅读:8729ajax+php 实现一个简单的在线聊天室功能(附带源码)   阅读:10953mysql数据一键导出到csv文件   阅读:6780给 centos 7 安装桌面环境   阅读:18104php压缩页面的html代码一行显示   阅读:8729关于PHP程序员技术职业生涯规划   阅读:3762给网站添加一键新浪微博登录的功能   阅读:7413