このセクションでは、zip ファイルの解凍について紹介します。

zip ファイルを解凍するためのパッケージをインストールします。

[root@java-2 ~]# yum -y install unzip
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink                                                | 8.1 kB  00:00:00     
 * base: ftp-srv2.kddilabs.jp
 * epel: ftp.riken.jp
 * extras: ftp-srv2.kddilabs.jp
 * updates: ftp-srv2.kddilabs.jp
base                                                                | 3.6 kB  00:00:00     
epel                                                                | 4.7 kB  00:00:00     
extras                                                              | 3.4 kB  00:00:00     
updates                                                             | 3.4 kB  00:00:00     
(1/2): epel/x86_64/updateinfo                                       | 955 kB  00:00:20     
(2/2): epel/x86_64/primary_db                                       | 6.6 MB  00:02:48     
Resolving Dependencies
--> Running transaction check
---> Package unzip.x86_64 0:6.0-19.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===========================================================================================
 Package            Arch                Version                    Repository         Size
===========================================================================================
Installing:
 unzip              x86_64              6.0-19.el7                 base              170 k

Transaction Summary
===========================================================================================
Install  1 Package

Total download size: 170 k
Installed size: 365 k
Downloading packages:
unzip-6.0-19.el7.x86_64.rpm                                         | 170 kB  00:00:03     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : unzip-6.0-19.el7.x86_64                                                 1/1 
  Verifying  : unzip-6.0-19.el7.x86_64                                                 1/1 

Installed:
  unzip.x86_64 0:6.0-19.el7                                                                

Complete!
[root@java-2 ~]# 

zip ファイルを解凍します。

[root@java-2 ~]# unzip tomcat-cluster-redis-session-manager.zip
Archive:  tomcat-cluster-redis-session-manager.zip
   creating: tomcat-cluster-redis-session-manager/
  inflating: tomcat-cluster-redis-session-manager/.DS_Store  
   creating: __MACOSX/
   creating: __MACOSX/tomcat-cluster-redis-session-manager/
  inflating: __MACOSX/tomcat-cluster-redis-session-manager/._.DS_Store  
   creating: tomcat-cluster-redis-session-manager/lib/
  inflating: tomcat-cluster-redis-session-manager/lib/commons-logging-1.2.jar  
   creating: __MACOSX/tomcat-cluster-redis-session-manager/lib/
  inflating: __MACOSX/tomcat-cluster-redis-session-manager/lib/._commons-logging-1.2.jar  
  inflating: tomcat-cluster-redis-session-manager/lib/tomcat-cluster-redis-session-manager-3.0.jar  
  inflating: tomcat-cluster-redis-session-manager/lib/jedis-2.9.0.jar  
  inflating: __MACOSX/tomcat-cluster-redis-session-manager/lib/._jedis-2.9.0.jar  
  inflating: tomcat-cluster-redis-session-manager/lib/commons-pool2-2.4.2.jar  
  inflating: __MACOSX/tomcat-cluster-redis-session-manager/lib/._commons-pool2-2.4.2.jar  
  inflating: __MACOSX/tomcat-cluster-redis-session-manager/._lib  
  inflating: tomcat-cluster-redis-session-manager/readMe.txt  
   creating: tomcat-cluster-redis-session-manager/conf/
  inflating: tomcat-cluster-redis-session-manager/conf/redis-data-cache.properties  
  inflating: __MACOSX/tomcat-cluster-redis-session-manager/._conf  
  inflating: __MACOSX/._tomcat-cluster-redis-session-manager  
[root@java-2 ~]#