RAR files are archived by Winrar compression software and can be split into large files. In this tutorial, we will explain how to install Rar and Unrar on Linux CentOS 7.
Install Rar
First, download the Rar package with the Wget command.
# wget https://www.rarlab.com/rar/rarlinux-x64-5.7.1.tar.gz
Output sample:
[root@linuxzone ~]# wget https://www.rarlab.com/rar/rarlinux-x64-5.7.1.tar.gz --2019-08-03 07:58:21-- https://www.rarlab.com/rar/rarlinux-x64-5.7.1.tar.gz Resolving www.rarlab.com (www.rarlab.com)... 5.135.104.98 Connecting to www.rarlab.com (www.rarlab.com)|5.135.104.98|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 546592 (534K) [application/x-gzip] Saving to: ‘rarlinux-x64-5.7.1.tar.gz’ 100%[=======================================================================================================================================>] 546,592 651KB/s in 0.8s 2019-08-03 07:58:22 (651 KB/s) - ‘rarlinux-x64-5.7.1.tar.gz’ saved [546592/546592] [root@linuxzone ~]#
Extract the downloaded file using the Tar command.
# tar -xzvf rarlinux-x64-5.7.1.tar.gz
Output sample:
[root@linuxzone ~]# tar -xzvf rarlinux-x64-5.7.1.tar.gz rar/ rar/order.htm rar/acknow.txt rar/readme.txt rar/default.sfx rar/license.txt rar/rarfiles.lst rar/whatsnew.txt rar/makefile rar/rar rar/unrar rar/rar.txt [root@linuxzone ~]#
Go to the Tar directory using the Cd command.
[root@linuxzone ~]# cd rar [root@linuxzone rar]# ls acknow.txt default.sfx license.txt makefile order.htm rar rarfiles.lst rar.txt readme.txt unrar whatsnew.txt [root@linuxzone rar]#
Set the environment variables by copying the Rar and Unrar files to /usr/local/bin/.
[root@linuxzone ~]# cp -v rar unrar /usr/local/bin/ ‘rar’ -> ‘/usr/local/bin/rar’ ‘unrar’ -> ‘/usr/local/bin/unrar’ [root@linuxzone ~]#
You can run these commands in your terminal to confirm the functionality of the Rar and Unrar applications.
[root@linuxzone ~]# rar RAR 5.71 Copyright (c) 1993-2019 Alexander Roshal 28 Apr 2019 Trial version Type 'rar -?' for help Usage: rar <command> -<switch 1> -<switch N> <archive> <files...> <@listfiles...> <path_to_extract\> <Commands> a Add files to archive c Add archive comment ch Change archive parameters cw Write archive comment to file d Delete files from archive e Extract files without archived paths . . . .
It is finished. As a result, this way, you can install Rar and Unrar on your CentOS Linux VPS server.
Please do not hesitate to share your questions and opinions.
Such beautiful writing this is. I appreciate your talent.