Virtual Box And Vagrant Install on Centos

1. yum install

Dependency Install

virtual box에 관련된 라이브러리를 우선 install 한다.

yum -y install gcc dkms make qt libgomp patch

yum -y install kernel-headers kernel-devel binutils glibc-headers glibc-devel font-forge

[devops@localhost ~]$ su
암호:
[root@localhost devops]# yum -y install gcc dkms make qt libgomp patch
Loaded plugins: fastestmirror, langpacks
base                                                                                                                                                                                                                                                    | 3.6 kB  00:00:00
docker-ce-stable                                                                                                                                                                                                                                        | 3.5 kB  00:00:00
epel                                                                                                                                                                                                                                                    | 5.3 kB  00:00:00
extras                                                                                                                                                                                                                                                  | 3.4 kB  00:00:00
maradb                                                                                                                                                                                                                                                  | 2.9 kB  00:00:00
updates                                                                                                                                                                                                                                                 | 3.4 kB  00:00:00
webtatic                                                                                                                                                                                                                                                | 3.6 kB  00:00:00
(1/2): epel/x86_64/primary_db                                                                                                                                                                                                                           | 6.1 MB  00:00:05
(2/2): epel/x86_64/updateinfo                                                                                                                                                                                                                           | 782 kB  00:00:11
Loading mirror speeds from cached hostfile
 * base: centos.mirror.moack.net
 * extras: data.aonenetworks.kr
 * updates: mirror.kakao.com
 * webtatic: us-east.repo.webtatic.com
Resolving Dependencies
--> Running transaction check
---> Package dkms.noarch 0:2.4.0-1.20170926git959bd74.el6 will be installed
--> Processing Dependency: elfutils-libelf-devel for package: dkms-2.4.0-1.20170926git959bd74.el6.noarch
--> Processing Dependency: kernel-devel-uname-r for package: dkms-2.4.0-1.20170926git959bd74.el6.noarch
---> Package gcc.x86_64 0:4.8.5-11.el7 will be updated
--> Processing Dependency: gcc = 4.8.5-11.el7 for package: gcc-c++-4.8.5-11.el7.x86_64
---> Package gcc.x86_64 0:4.8.5-36.el7_6.2 will be an update
--> Processing Dependency: cpp = 4.8.5-36.el7_6.2 for package: gcc-4.8.5-36.el7_6.2.x86_64
--> Processing Dependency: libgcc >= 4.8.5-36.el7_6.2 for package: gcc-4.8.5-36.el7_6.2.x86_64
---> Package libgomp.x86_64 0:4.8.5-11.el7 will be updated
---> Package libgomp.x86_64 0:4.8.5-36.el7_6.2 will be an update
---> Package make.x86_64 1:3.82-21.el7 will be updated
---> Package make.x86_64 1:3.82-23.el7 will be an update
---> Package patch.x86_64 0:2.7.1-10.el7_5 will be installed
---> Package qt.x86_64 1:4.8.7-2.el7 will be installed
--> Processing Dependency: qt-settings for package: 1:qt-4.8.7-2.el7.x86_64
--> Processing Dependency: libcrypto.so.10(OPENSSL_1.0.2)(64bit) for package: 1:qt-4.8.7-2.el7.x86_64
--> Running transaction check
---> Package cpp.x86_64 0:4.8.5-11.el7 will be updated
---> Package cpp.x86_64 0:4.8.5-36.el7_6.2 will be an update
---> Package elfutils-libelf-devel.x86_64 0:0.172-2.el7 will be installed
--> Processing Dependency: elfutils-libelf(x86-64) = 0.172-2.el7 for package: elfutils-libelf-devel-0.172-2.el7.x86_64
---> Package gcc-c++.x86_64 0:4.8.5-11.el7 will be updated
---> Package gcc-c++.x86_64 0:4.8.5-36.el7_6.2 will be an update
--> Processing Dependency: libstdc++-devel = 4.8.5-36.el7_6.2 for package: gcc-c++-4.8.5-36.el7_6.2.x86_64
--> Processing Dependency: libstdc++ = 4.8.5-36.el7_6.2 for package: gcc-c++-4.8.5-36.el7_6.2.x86_64
---> Package kernel-debug-devel.x86_64 0:3.10.0-957.21.3.el7 will be installed
---> Package libgcc.x86_64 0:4.8.5-11.el7 will be updated
---> Package libgcc.x86_64 0:4.8.5-36.el7_6.2 will be an update
---> Package openssl-libs.x86_64 1:1.0.1e-60.el7_3.1 will be updated
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-60.el7_3.1 for package: 1:openssl-1.0.1e-60.el7_3.1.x86_64
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-60.el7_3.1 for package: 1:openssl-devel-1.0.1e-60.el7_3.1.x86_64
---> Package openssl-libs.x86_64 1:1.0.2k-16.el7_6.1 will be an update
---> Package qt-settings.noarch 0:19-23.8.el7.centos will be installed
--> Running transaction check
---> Package elfutils-libelf.x86_64 0:0.160-1.el7 will be updated
--> Processing Dependency: elfutils-libelf(x86-64) = 0.160-1.el7 for package: elfutils-libs-0.160-1.el7.x86_64
--> Processing Dependency: elfutils-libelf(x86-64) = 0.160-1.el7 for package: elfutils-0.160-1.el7.x86_64
---> Package elfutils-libelf.x86_64 0:0.172-2.el7 will be an update
---> Package libstdc++.x86_64 0:4.8.5-11.el7 will be updated
---> Package libstdc++.x86_64 0:4.8.5-36.el7_6.2 will be an update
---> Package libstdc++-devel.x86_64 0:4.8.5-11.el7 will be updated
---> Package libstdc++-devel.x86_64 0:4.8.5-36.el7_6.2 will be an update
---> Package openssl.x86_64 1:1.0.1e-60.el7_3.1 will be updated
---> Package openssl.x86_64 1:1.0.2k-16.el7_6.1 will be an update
---> Package openssl-devel.x86_64 1:1.0.1e-60.el7_3.1 will be updated
---> Package openssl-devel.x86_64 1:1.0.2k-16.el7_6.1 will be an update
--> Running transaction check
---> Package elfutils.x86_64 0:0.160-1.el7 will be updated
---> Package elfutils.x86_64 0:0.172-2.el7 will be an update
---> Package elfutils-libs.x86_64 0:0.160-1.el7 will be updated
---> Package elfutils-libs.x86_64 0:0.172-2.el7 will be an update
--> Processing Dependency: default-yama-scope for package: elfutils-libs-0.172-2.el7.x86_64
--> Running transaction check
---> Package elfutils-default-yama-scope.noarch 0:0.172-2.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================================================================================================================================================
 Package                                                                    Arch                                                  Version                                                                         Repository                                              Size
===============================================================================================================================================================================================================================================================================
Installing:
 dkms                                                                       noarch                                                2.4.0-1.20170926git959bd74.el6                                                  epel                                                    78 k
 patch                                                                      x86_64                                                2.7.1-10.el7_5                                                                  base                                                   110 k
 qt                                                                         x86_64                                                1:4.8.7-2.el7                                                                   base                                                   4.6 M
Updating:
 gcc                                                                        x86_64                                                4.8.5-36.el7_6.2                                                                updates                                                 16 M
 libgomp                                                                    x86_64                                                4.8.5-36.el7_6.2                                                                updates                                                158 k
 make                                                                       x86_64                                                1:3.82-23.el7                                                                   base                                                   420 k
Installing for dependencies:
 elfutils-default-yama-scope                                                noarch                                                0.172-2.el7                                                                     base                                                    32 k
 elfutils-libelf-devel                                                      x86_64                                                0.172-2.el7                                                                     base                                                    39 k
 kernel-debug-devel                                                         x86_64                                                3.10.0-957.21.3.el7                                                             updates                                                 17 M
 qt-settings                                                                noarch                                                19-23.8.el7.centos                                                              base                                                    17 k
Updating for dependencies:
 cpp                                                                        x86_64                                                4.8.5-36.el7_6.2                                                                updates                                                5.9 M
 elfutils                                                                   x86_64                                                0.172-2.el7                                                                     base                                                   299 k
 elfutils-libelf                                                            x86_64                                                0.172-2.el7                                                                     base                                                   194 k
 elfutils-libs                                                              x86_64                                                0.172-2.el7                                                                     base                                                   285 k
 gcc-c++                                                                    x86_64                                                4.8.5-36.el7_6.2                                                                updates                                                7.2 M
 libgcc                                                                     x86_64                                                4.8.5-36.el7_6.2                                                                updates                                                102 k
 libstdc++                                                                  x86_64                                                4.8.5-36.el7_6.2                                                                updates                                                305 k
 libstdc++-devel                                                            x86_64                                                4.8.5-36.el7_6.2                                                                updates                                                1.5 M
 openssl                                                                    x86_64                                                1:1.0.2k-16.el7_6.1                                                             updates                                                493 k
 openssl-devel                                                              x86_64                                                1:1.0.2k-16.el7_6.1                                                             updates                                                1.5 M
 openssl-libs                                                               x86_64                                                1:1.0.2k-16.el7_6.1                                                             updates                                                1.2 M

Transaction Summary
===============================================================================================================================================================================================================================================================================
Install  3 Packages (+ 4 Dependent packages)
Upgrade  3 Packages (+11 Dependent packages)

Total size: 57 M
Total download size: 57 M
Downloading packages:
No Presto metadata available for base
(1/20): elfutils-default-yama-scope-0.172-2.el7.noarch.rpm                                                                                                                                                                                              |  32 kB  00:00:00
(2/20): elfutils-libelf-0.172-2.el7.x86_64.rpm                                                                                                                                                                                                          | 194 kB  00:00:00
(3/20): elfutils-0.172-2.el7.x86_64.rpm                                                                                                                                                                                                                 | 299 kB  00:00:00
(4/20): elfutils-libelf-devel-0.172-2.el7.x86_64.rpm                                                                                                                                                                                                    |  39 kB  00:00:00
(5/20): elfutils-libs-0.172-2.el7.x86_64.rpm                                                                                                                                                                                                            | 285 kB  00:00:00
(6/20): cpp-4.8.5-36.el7_6.2.x86_64.rpm                                                                                                                                                                                                                 | 5.9 MB  00:00:00
warning: /var/cache/yum/x86_64/7/epel/packages/dkms-2.4.0-1.20170926git959bd74.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY                                                                                        ] 4.7 MB/s |  11 MB  00:00:09 ETA
Public key for dkms-2.4.0-1.20170926git959bd74.el6.noarch.rpm is not installed
(7/20): dkms-2.4.0-1.20170926git959bd74.el6.noarch.rpm                                                                                                                                                                                                  |  78 kB  00:00:01
(8/20): gcc-c++-4.8.5-36.el7_6.2.x86_64.rpm                                                                                                                                                                                                             | 7.2 MB  00:00:00
(9/20): kernel-debug-devel-3.10.0-957.21.3.el7.x86_64.rpm                                                                                                                                                                                               |  17 MB  00:00:02
(10/20): libgomp-4.8.5-36.el7_6.2.x86_64.rpm                                                                                                                                                                                                            | 158 kB  00:00:00
(11/20): libstdc++-4.8.5-36.el7_6.2.x86_64.rpm                                                                                                                                                                                                          | 305 kB  00:00:00
(12/20): gcc-4.8.5-36.el7_6.2.x86_64.rpm                                                                                                                                                                                                                |  16 MB  00:00:04
(13/20): libstdc++-devel-4.8.5-36.el7_6.2.x86_64.rpm                                                                                                                                                                                                    | 1.5 MB  00:00:00
(14/20): make-3.82-23.el7.x86_64.rpm                                                                                                                                                                                                                    | 420 kB  00:00:00
(15/20): openssl-1.0.2k-16.el7_6.1.x86_64.rpm                                                                                                                                                                                                           | 493 kB  00:00:00
(16/20): openssl-devel-1.0.2k-16.el7_6.1.x86_64.rpm                                                                                                                                                                                                     | 1.5 MB  00:00:00
(17/20): patch-2.7.1-10.el7_5.x86_64.rpm                                                                                                                                                                                                                | 110 kB  00:00:00
(18/20): openssl-libs-1.0.2k-16.el7_6.1.x86_64.rpm                                                                                                                                                                                                      | 1.2 MB  00:00:00
(19/20): qt-settings-19-23.8.el7.centos.noarch.rpm                                                                                                                                                                                                      |  17 kB  00:00:00
(20/20): qt-4.8.7-2.el7.x86_64.rpm                                                                                                                                                                                                                      | 4.6 MB  00:00:00
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                                                           11 MB/s |  57 MB  00:00:05
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Importing GPG key 0x0608B895:
 Userid     : "EPEL (6) <epel@fedoraproject.org>"
 Fingerprint: 8c3b e96a f230 9184 da5c 0dae 3b49 df2a 0608 b895
 Package    : epel-release-6-8.noarch (installed)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : libgcc-4.8.5-36.el7_6.2.x86_64                                                                                                                                                                                                                             1/35
  Updating   : libstdc++-4.8.5-36.el7_6.2.x86_64                                                                                                                                                                                                                          2/35
  Updating   : 1:openssl-libs-1.0.2k-16.el7_6.1.x86_64                                                                                                                                                                                                                    3/35
  Updating   : elfutils-libelf-0.172-2.el7.x86_64                                                                                                                                                                                                                         4/35
  Installing : elfutils-libelf-devel-0.172-2.el7.x86_64                                                                                                                                                                                                                   5/35
  Updating   : libstdc++-devel-4.8.5-36.el7_6.2.x86_64                                                                                                                                                                                                                    6/35
  Updating   : cpp-4.8.5-36.el7_6.2.x86_64                                                                                                                                                                                                                                7/35
  Updating   : 1:make-3.82-23.el7.x86_64                                                                                                                                                                                                                                  8/35
  Installing : elfutils-default-yama-scope-0.172-2.el7.noarch                                                                                                                                                                                                             9/35
  Updating   : elfutils-libs-0.172-2.el7.x86_64                                                                                                                                                                                                                          10/35
  Updating   : libgomp-4.8.5-36.el7_6.2.x86_64                                                                                                                                                                                                                           11/35
  Updating   : gcc-4.8.5-36.el7_6.2.x86_64                                                                                                                                                                                                                               12/35
  Installing : qt-settings-19-23.8.el7.centos.noarch                                                                                                                                                                                                                     13/35
  Installing : kernel-debug-devel-3.10.0-957.21.3.el7.x86_64                                                                                                                                                                                                             14/35
  Installing : dkms-2.4.0-1.20170926git959bd74.el6.noarch                                                                                                                                                                                                                15/35
  Installing : 1:qt-4.8.7-2.el7.x86_64                                                                                                                                                                                                                                   16/35
  Updating   : gcc-c++-4.8.5-36.el7_6.2.x86_64                                                                                                                                                                                                                           17/35
  Updating   : elfutils-0.172-2.el7.x86_64                                                                                                                                                                                                                               18/35
  Updating   : 1:openssl-1.0.2k-16.el7_6.1.x86_64                                                                                                                                                                                                                        19/35
  Updating   : 1:openssl-devel-1.0.2k-16.el7_6.1.x86_64                                                                                                                                                                                                                  20/35
  Installing : patch-2.7.1-10.el7_5.x86_64                                                                                                                                                                                                                               21/35
  Cleanup    : 1:openssl-devel-1.0.1e-60.el7_3.1.x86_64                                                                                                                                                                                                                  22/35
  Cleanup    : elfutils-0.160-1.el7.x86_64                                                                                                                                                                                                                               23/35
  Cleanup    : gcc-c++-4.8.5-11.el7.x86_64                                                                                                                                                                                                                               24/35
  Cleanup    : gcc-4.8.5-11.el7.x86_64                                                                                                                                                                                                                                   25/35
  Cleanup    : 1:openssl-1.0.1e-60.el7_3.1.x86_64                                                                                                                                                                                                                        26/35
  Cleanup    : elfutils-libs-0.160-1.el7.x86_64                                                                                                                                                                                                                          27/35
  Cleanup    : libstdc++-devel-4.8.5-11.el7.x86_64                                                                                                                                                                                                                       28/35
  Cleanup    : libstdc++-4.8.5-11.el7.x86_64                                                                                                                                                                                                                             29/35
  Cleanup    : libgcc-4.8.5-11.el7.x86_64                                                                                                                                                                                                                                30/35
  Cleanup    : elfutils-libelf-0.160-1.el7.x86_64                                                                                                                                                                                                                        31/35
  Cleanup    : 1:openssl-libs-1.0.1e-60.el7_3.1.x86_64                                                                                                                                                                                                                   32/35
  Cleanup    : 1:make-3.82-21.el7.x86_64                                                                                                                                                                                                                                 33/35
  Cleanup    : cpp-4.8.5-11.el7.x86_64                                                                                                                                                                                                                                   34/35
  Cleanup    : libgomp-4.8.5-11.el7.x86_64                                                                                                                                                                                                                               35/35
  Verifying  : elfutils-libelf-devel-0.172-2.el7.x86_64                                                                                                                                                                                                                   1/35
  Verifying  : kernel-debug-devel-3.10.0-957.21.3.el7.x86_64                                                                                                                                                                                                              2/35
  Verifying  : 1:qt-4.8.7-2.el7.x86_64                                                                                                                                                                                                                                    3/35
  Verifying  : qt-settings-19-23.8.el7.centos.noarch                                                                                                                                                                                                                      4/35
  Verifying  : patch-2.7.1-10.el7_5.x86_64                                                                                                                                                                                                                                5/35
  Verifying  : gcc-4.8.5-36.el7_6.2.x86_64                                                                                                                                                                                                                                6/35
  Verifying  : libstdc++-4.8.5-36.el7_6.2.x86_64                                                                                                                                                                                                                          7/35
  Verifying  : 1:openssl-devel-1.0.2k-16.el7_6.1.x86_64                                                                                                                                                                                                                   8/35
  Verifying  : libgcc-4.8.5-36.el7_6.2.x86_64                                                                                                                                                                                                                             9/35
  Verifying  : libgomp-4.8.5-36.el7_6.2.x86_64                                                                                                                                                                                                                           10/35
  Verifying  : dkms-2.4.0-1.20170926git959bd74.el6.noarch                                                                                                                                                                                                                11/35
  Verifying  : libstdc++-devel-4.8.5-36.el7_6.2.x86_64                                                                                                                                                                                                                   12/35
  Verifying  : 1:openssl-1.0.2k-16.el7_6.1.x86_64                                                                                                                                                                                                                        13/35
  Verifying  : elfutils-libelf-0.172-2.el7.x86_64                                                                                                                                                                                                                        14/35
  Verifying  : elfutils-default-yama-scope-0.172-2.el7.noarch                                                                                                                                                                                                            15/35
  Verifying  : gcc-c++-4.8.5-36.el7_6.2.x86_64                                                                                                                                                                                                                           16/35
  Verifying  : 1:make-3.82-23.el7.x86_64                                                                                                                                                                                                                                 17/35
  Verifying  : elfutils-libs-0.172-2.el7.x86_64                                                                                                                                                                                                                          18/35
  Verifying  : cpp-4.8.5-36.el7_6.2.x86_64                                                                                                                                                                                                                               19/35
  Verifying  : 1:openssl-libs-1.0.2k-16.el7_6.1.x86_64                                                                                                                                                                                                                   20/35
  Verifying  : elfutils-0.172-2.el7.x86_64                                                                                                                                                                                                                               21/35
  Verifying  : 1:openssl-1.0.1e-60.el7_3.1.x86_64                                                                                                                                                                                                                        22/35
  Verifying  : gcc-c++-4.8.5-11.el7.x86_64                                                                                                                                                                                                                               23/35
  Verifying  : elfutils-libs-0.160-1.el7.x86_64                                                                                                                                                                                                                          24/35
  Verifying  : cpp-4.8.5-11.el7.x86_64                                                                                                                                                                                                                                   25/35
  Verifying  : 1:openssl-libs-1.0.1e-60.el7_3.1.x86_64                                                                                                                                                                                                                   26/35
  Verifying  : elfutils-libelf-0.160-1.el7.x86_64                                                                                                                                                                                                                        27/35
  Verifying  : 1:openssl-devel-1.0.1e-60.el7_3.1.x86_64                                                                                                                                                                                                                  28/35
  Verifying  : libgcc-4.8.5-11.el7.x86_64                                                                                                                                                                                                                                29/35
  Verifying  : libstdc++-4.8.5-11.el7.x86_64                                                                                                                                                                                                                             30/35
  Verifying  : 1:make-3.82-21.el7.x86_64                                                                                                                                                                                                                                 31/35
  Verifying  : elfutils-0.160-1.el7.x86_64                                                                                                                                                                                                                               32/35
  Verifying  : libgomp-4.8.5-11.el7.x86_64                                                                                                                                                                                                                               33/35
  Verifying  : gcc-4.8.5-11.el7.x86_64                                                                                                                                                                                                                                   34/35
  Verifying  : libstdc++-devel-4.8.5-11.el7.x86_64                                                                                                                                                                                                                       35/35

Installed:
  dkms.noarch 0:2.4.0-1.20170926git959bd74.el6                                                          patch.x86_64 0:2.7.1-10.el7_5                                                          qt.x86_64 1:4.8.7-2.el7

Dependency Installed:
  elfutils-default-yama-scope.noarch 0:0.172-2.el7                       elfutils-libelf-devel.x86_64 0:0.172-2.el7                       kernel-debug-devel.x86_64 0:3.10.0-957.21.3.el7                       qt-settings.noarch 0:19-23.8.el7.centos

Updated:
  gcc.x86_64 0:4.8.5-36.el7_6.2                                                             libgomp.x86_64 0:4.8.5-36.el7_6.2                                                             make.x86_64 1:3.82-23.el7

Dependency Updated:
  cpp.x86_64 0:4.8.5-36.el7_6.2              elfutils.x86_64 0:0.172-2.el7       elfutils-libelf.x86_64 0:0.172-2.el7      elfutils-libs.x86_64 0:0.172-2.el7       gcc-c++.x86_64 0:4.8.5-36.el7_6.2  libgcc.x86_64 0:4.8.5-36.el7_6.2  libstdc++.x86_64 0:4.8.5-36.el7_6.2
  libstdc++-devel.x86_64 0:4.8.5-36.el7_6.2  openssl.x86_64 1:1.0.2k-16.el7_6.1  openssl-devel.x86_64 1:1.0.2k-16.el7_6.1  openssl-libs.x86_64 1:1.0.2k-16.el7_6.1

Complete!
[root@localhost devops]# yum -y install kernel-headers kernel-devel binutils glibc-headers glibc-devel font-forge
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.moack.net
 * extras: data.aonenetworks.kr
 * updates: mirror.kakao.com
 * webtatic: us-east.repo.webtatic.com
No package font-forge available.
Resolving Dependencies
--> Running transaction check
---> Package binutils.x86_64 0:2.23.52.0.1-30.el7 will be updated
---> Package binutils.x86_64 0:2.27-34.base.el7 will be an update
---> Package glibc-devel.x86_64 0:2.17-157.el7_3.1 will be updated
---> Package glibc-devel.x86_64 0:2.17-260.el7_6.5 will be an update
--> Processing Dependency: glibc = 2.17-260.el7_6.5 for package: glibc-devel-2.17-260.el7_6.5.x86_64
---> Package glibc-headers.x86_64 0:2.17-157.el7_3.1 will be updated
---> Package glibc-headers.x86_64 0:2.17-260.el7_6.5 will be an update
---> Package kernel-devel.x86_64 0:3.10.0-957.21.3.el7 will be installed
---> Package kernel-headers.x86_64 0:3.10.0-514.10.2.el7 will be updated
---> Package kernel-headers.x86_64 0:3.10.0-957.21.3.el7 will be an update
--> Running transaction check
---> Package glibc.x86_64 0:2.17-157.el7_3.1 will be updated
--> Processing Dependency: glibc = 2.17-157.el7_3.1 for package: glibc-common-2.17-157.el7_3.1.x86_64
---> Package glibc.x86_64 0:2.17-260.el7_6.5 will be an update
--> Running transaction check
---> Package glibc-common.x86_64 0:2.17-157.el7_3.1 will be updated
---> Package glibc-common.x86_64 0:2.17-260.el7_6.5 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================================================================================================================================================
 Package                                                             Arch                                                        Version                                                                    Repository                                                    Size
===============================================================================================================================================================================================================================================================================
Installing:
 kernel-devel                                                        x86_64                                                      3.10.0-957.21.3.el7                                                        updates                                                       17 M
Updating:
 binutils                                                            x86_64                                                      2.27-34.base.el7                                                           base                                                         5.9 M
 glibc-devel                                                         x86_64                                                      2.17-260.el7_6.5                                                           updates                                                      1.1 M
 glibc-headers                                                       x86_64                                                      2.17-260.el7_6.5                                                           updates                                                      683 k
 kernel-headers                                                      x86_64                                                      3.10.0-957.21.3.el7                                                        updates                                                      8.0 M
Updating for dependencies:
 glibc                                                               x86_64                                                      2.17-260.el7_6.5                                                           updates                                                      3.7 M
 glibc-common                                                        x86_64                                                      2.17-260.el7_6.5                                                           updates                                                       12 M

Transaction Summary
===============================================================================================================================================================================================================================================================================
Install  1 Package
Upgrade  4 Packages (+2 Dependent packages)

Total download size: 48 M
Downloading packages:
No Presto metadata available for base
(1/7): glibc-2.17-260.el7_6.5.x86_64.rpm                                                                                                                                                                                                                | 3.7 MB  00:00:00
(2/7): glibc-devel-2.17-260.el7_6.5.x86_64.rpm                                                                                                                                                                                                          | 1.1 MB  00:00:00
(3/7): binutils-2.27-34.base.el7.x86_64.rpm                                                                                                                                                                                                             | 5.9 MB  00:00:01
(4/7): glibc-headers-2.17-260.el7_6.5.x86_64.rpm                                                                                                                                                                                                        | 683 kB  00:00:00
(5/7): glibc-common-2.17-260.el7_6.5.x86_64.rpm                                                                                                                                                                                                         |  12 MB  00:00:02
(6/7): kernel-headers-3.10.0-957.21.3.el7.x86_64.rpm                                                                                                                                                                                                    | 8.0 MB  00:00:01
(7/7): kernel-devel-3.10.0-957.21.3.el7.x86_64.rpm                                                                                                                                                                                                      |  17 MB  00:00:02
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                                                           11 MB/s |  48 MB  00:00:04
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : glibc-common-2.17-260.el7_6.5.x86_64                                                                                                                                                                                                                       1/13
  Updating   : glibc-2.17-260.el7_6.5.x86_64                                                                                                                                                                                                                              2/13
warning: /etc/nsswitch.conf created as /etc/nsswitch.conf.rpmnew
  Updating   : kernel-headers-3.10.0-957.21.3.el7.x86_64                                                                                                                                                                                                                  3/13
  Updating   : glibc-headers-2.17-260.el7_6.5.x86_64                                                                                                                                                                                                                      4/13
  Updating   : glibc-devel-2.17-260.el7_6.5.x86_64                                                                                                                                                                                                                        5/13
  Updating   : binutils-2.27-34.base.el7.x86_64                                                                                                                                                                                                                           6/13
  Installing : kernel-devel-3.10.0-957.21.3.el7.x86_64                                                                                                                                                                                                                    7/13
  Cleanup    : glibc-devel-2.17-157.el7_3.1.x86_64                                                                                                                                                                                                                        8/13
  Cleanup    : glibc-headers-2.17-157.el7_3.1.x86_64                                                                                                                                                                                                                      9/13
  Cleanup    : binutils-2.23.52.0.1-30.el7.x86_64                                                                                                                                                                                                                        10/13
  Cleanup    : kernel-headers-3.10.0-514.10.2.el7.x86_64                                                                                                                                                                                                                 11/13
  Cleanup    : glibc-common-2.17-157.el7_3.1.x86_64                                                                                                                                                                                                                      12/13
  Cleanup    : glibc-2.17-157.el7_3.1.x86_64                                                                                                                                                                                                                             13/13
  Verifying  : kernel-devel-3.10.0-957.21.3.el7.x86_64                                                                                                                                                                                                                    1/13
  Verifying  : binutils-2.27-34.base.el7.x86_64                                                                                                                                                                                                                           2/13
  Verifying  : glibc-headers-2.17-260.el7_6.5.x86_64                                                                                                                                                                                                                      3/13
  Verifying  : glibc-2.17-260.el7_6.5.x86_64                                                                                                                                                                                                                              4/13
  Verifying  : glibc-common-2.17-260.el7_6.5.x86_64                                                                                                                                                                                                                       5/13
  Verifying  : glibc-devel-2.17-260.el7_6.5.x86_64                                                                                                                                                                                                                        6/13
  Verifying  : kernel-headers-3.10.0-957.21.3.el7.x86_64                                                                                                                                                                                                                  7/13
  Verifying  : glibc-headers-2.17-157.el7_3.1.x86_64                                                                                                                                                                                                                      8/13
  Verifying  : glibc-common-2.17-157.el7_3.1.x86_64                                                                                                                                                                                                                       9/13
  Verifying  : glibc-2.17-157.el7_3.1.x86_64                                                                                                                                                                                                                             10/13
  Verifying  : kernel-headers-3.10.0-514.10.2.el7.x86_64                                                                                                                                                                                                                 11/13
  Verifying  : binutils-2.23.52.0.1-30.el7.x86_64                                                                                                                                                                                                                        12/13
  Verifying  : glibc-devel-2.17-157.el7_3.1.x86_64                                                                                                                                                                                                                       13/13

Installed:
  kernel-devel.x86_64 0:3.10.0-957.21.3.el7

Updated:
  binutils.x86_64 0:2.27-34.base.el7                             glibc-devel.x86_64 0:2.17-260.el7_6.5                             glibc-headers.x86_64 0:2.17-260.el7_6.5                             kernel-headers.x86_64 0:3.10.0-957.21.3.el7

Dependency Updated:
  glibc.x86_64 0:2.17-260.el7_6.5                                                                                                    glibc-common.x86_64 0:2.17-260.el7_6.5

Complete!

2. Add Repository

virtual box를 인스톨하기 위한 yum repository를 등록 한다.

wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo

[root@localhost devops]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# ls
CentOS-Base.repo  CentOS-CR.repo  CentOS-Debuginfo.repo  CentOS-Sources.repo  CentOS-Vault.repo  CentOS-fasttrack.repo  docker-ce.repo  epel-testing.repo  epel.repo  mariadb.repo  webtatic-archive.repo  webtatic-testing.repo  webtatic.repo
[root@localhost yum.repos.d]# ll
합계 52
-rw-r--r--. 1 root root 1664  4월  1  2015 CentOS-Base.repo
-rw-r--r--. 1 root root 1309  4월  1  2015 CentOS-CR.repo
-rw-r--r--. 1 root root  649  4월  1  2015 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root 1331  4월  1  2015 CentOS-Sources.repo
-rw-r--r--. 1 root root 1002  4월  1  2015 CentOS-Vault.repo
-rw-r--r--. 1 root root  290  4월  1  2015 CentOS-fasttrack.repo
-rw-r--r--. 1 root root 2424 10월 25  2018 docker-ce.repo
-rw-r--r--. 1 root root 1056 11월  5  2012 epel-testing.repo
-rw-r--r--. 1 root root  960  6월 20 12:28 epel.repo
-rw-r--r--. 1 root root  139  2월 24  2017 mariadb.repo
-rw-r--r--. 1 root root  963 11월 13  2016 webtatic-archive.repo
-rw-r--r--. 1 root root  963 11월 13  2016 webtatic-testing.repo
-rw-r--r--. 1 root root  865 11월 13  2016 webtatic.repo
[root@localhost yum.repos.d]# wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo
--2019-06-21 11:04:18--  http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo
Resolving download.virtualbox.org (download.virtualbox.org)... 23.35.220.157
Connecting to download.virtualbox.org (download.virtualbox.org)|23.35.220.157|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 259 [text/plain]
Saving to: ‘virtualbox.repo’

100%[=====================================================================================================================================================================================================================================>] 259         --.-K/s   in 0s

2019-06-21 11:04:19 (40.2 MB/s) - ‘virtualbox.repo’ saved [259/259]

3. install virtualbox

virtual box를 install 한다.

6.0이 현재 기준 최신이다.

yum install -y VirtualBox-6.0

[root@localhost yum.repos.d]# yum install -y VirtualBox-6.0
Loaded plugins: fastestmirror, langpacks
virtualbox/7/x86_64/signature                                                                                                                                                                                                                           |  181 B  00:00:00
Retrieving key from https://www.virtualbox.org/download/oracle_vbox.asc
Importing GPG key 0x98AB5139:
 Userid     : "Oracle Corporation (VirtualBox archive signing key) <info@virtualbox.org>"
 Fingerprint: 7b0f ab3a 13b9 0743 5925 d9c9 5442 2a4b 98ab 5139
 From       : https://www.virtualbox.org/download/oracle_vbox.asc
virtualbox/7/x86_64/signature                                                                                                                                                                                                                           | 2.9 kB  00:00:01 !!!
virtualbox/7/x86_64/primary_db                                                                                                                                                                                                                          | 130 kB  00:00:00
Loading mirror speeds from cached hostfile
 * base: centos.mirror.moack.net
 * extras: data.aonenetworks.kr
 * updates: mirror.kakao.com
 * webtatic: us-east.repo.webtatic.com
Resolving Dependencies
--> Running transaction check
---> Package VirtualBox-6.0.x86_64 0:6.0.8_130520_el7-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================================================================================================================================================
 Package                                                             Arch                                                        Version                                                                 Repository                                                       Size
===============================================================================================================================================================================================================================================================================
Installing:
 VirtualBox-6.0                                                      x86_64                                                      6.0.8_130520_el7-1                                                      virtualbox                                                      116 M

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

Total download size: 116 M
Installed size: 238 M
Downloading packages:
경고: /var/cache/yum/x86_64/7/virtualbox/packages/VirtualBox-6.0-6.0.8_130520_el7-1.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 98ab5139: NOKEY========================================================================================-] 8.1 MB/s | 116 MB  00:00:00 ETA
Public key for VirtualBox-6.0-6.0.8_130520_el7-1.x86_64.rpm is not installed
VirtualBox-6.0-6.0.8_130520_el7-1.x86_64.rpm                                                                                                                                                                                                            | 116 MB  00:00:14
Retrieving key from https://www.virtualbox.org/download/oracle_vbox.asc
Importing GPG key 0x98AB5139:
 Userid     : "Oracle Corporation (VirtualBox archive signing key) <info@virtualbox.org>"
 Fingerprint: 7b0f ab3a 13b9 0743 5925 d9c9 5442 2a4b 98ab 5139
 From       : https://www.virtualbox.org/download/oracle_vbox.asc
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : VirtualBox-6.0-6.0.8_130520_el7-1.x86_64                                                                                                                                                                                                                    1/1

Creating group 'vboxusers'. VM users must be member of that group!

This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    kernel-devel kernel-devel-3.10.0-229.el7.x86_64
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    kernel-devel kernel-devel-3.10.0-229.el7.x86_64

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.  If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system's documentation for more information.
  Verifying  : VirtualBox-6.0-6.0.8_130520_el7-1.x86_64                                                                                                                                                                                                                    1/1

Installed:
  VirtualBox-6.0.x86_64 0:6.0.8_130520_el7-1

Complete!
[root@localhost yum.repos.d]# rcvboxdrv setup
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    kernel-devel kernel-devel-3.10.0-957.el7.x86_64

상위와 같이 virtual box를 셋업 했을 경우

Please install the Linux kernel "header" files matching the current kernel

와 같은 글이 나오면 정상적인 셋업이 되지 않았다는 의미이다.

virtual box에서 요청하는 커널 header는

sudo yum install "kernel-devel-uname-r == $(uname -r)"

를 사용해서 install이 가능한데, 어떤 경우는 devel header kernel이 없는 경우가 있다. (직접 빌드 했다던지...)

[root@localhost yum.repos.d]# sudo yum install "kernel-devel-uname-r == $(uname -r)"
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.moack.net
 * extras: centos.mirror.moack.net
 * updates: centos.mirror.moack.net
Resolving Dependencies
--> Running transaction check
---> Package kernel-devel.x86_64 0:3.10.0-957.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================================================================================================================================
 Package                                              Arch                                           Version                                                   Repository                                    Size
==================================================================================================================================================================================================================
Installing:
 kernel-devel                                         x86_64                                         3.10.0-957.el7                                            base                                          17 M

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

Total download size: 17 M
Installed size: 37 M
Is this ok [y/d/N]: y
Downloading packages:
No Presto metadata available for base
kernel-devel-3.10.0-957.el7.x86_64.rpm                                                                                                                                                     |  17 MB  00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : kernel-devel-3.10.0-957.el7.x86_64                                                                                                                                                             1/1
  Verifying  : kernel-devel-3.10.0-957.el7.x86_64                                                                                                                                                             1/1

Installed:
  kernel-devel.x86_64 0:3.10.0-957.el7

Complete!
[root@localhost yum.repos.d]# rcvboxdrv setup
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.

상위와 같이 작동 안되면 cent0S 새로 까는게 정신 건강에 좋다.

4. Vagrant install

virtual box가 정상적으로 인스톨 완료 되었다면, vagrant를 install한다.

yum -y install https://releases.hashicorp.com/vagrant/1.9.6/vagrant_1.9.6_x86_64.rpm

1.9.6버전은 virtual box 5.1버전까지만 호환 가능하고 6.0부터는 2.0 이상의 vagrant를 install 해야 한다.

하기는 1.x vagrant를 까는 것을 보여준다. (앞서 virtual box 6.x를 깔았음으로 실패 한다.)

[root@localhost ~]# yum -y install https://releases.hashicorp.com/vagrant/1.9.6/vagrant_1.9.6_x86_64.rpm
Loaded plugins: fastestmirror, langpacks
vagrant_1.9.6_x86_64.rpm                                                                                                                                                                                                                                |  75 MB  00:00:11
Examining /var/tmp/yum-root-4ytLB4/vagrant_1.9.6_x86_64.rpm: 1:vagrant-1.9.6-1.x86_64
Marking /var/tmp/yum-root-4ytLB4/vagrant_1.9.6_x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package vagrant.x86_64 1:1.9.6-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================================================================================================================================================
 Package                                                       Arch                                                         Version                                                          Repository                                                                   Size
===============================================================================================================================================================================================================================================================================
Installing:
 vagrant                                                       x86_64                                                       1:1.9.6-1                                                        /vagrant_1.9.6_x86_64                                                       190 M

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

Total size: 190 M
Installed size: 190 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 1:vagrant-1.9.6-1.x86_64                                                                                                                                                                                                                                    1/1
  Verifying  : 1:vagrant-1.9.6-1.x86_64                                                                                                                                                                                                                                    1/1

Installed:
  vagrant.x86_64 1:1.9.6-1

Complete!

5. Vagrant Start

vagrant init

vagrant up

으로 최초 vagrant가 잘 install 되었는지 확인 가능하지만

Provider를 설정해달라는 요청이 나오게 되는데

vagrant up --provider=virtualbox

와 같이 provider를 설정 해주면 된다.

[root@localhost yum.repos.d]# cd ~
[root@localhost ~]# ls
anaconda-ks.cfg
[root@localhost ~]# mkdir vagrant
[root@localhost ~]# cd vagrant/
[root@localhost vagrant]# ls
[root@localhost vagrant]# vagrant init
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
[root@localhost vagrant]# vagrant up
No usable default provider could be found for your system.

Vagrant relies on interactions with 3rd party systems, known as
"providers", to provide Vagrant with resources to run development
environments. Examples are VirtualBox, VMware, Hyper-V.

The easiest solution to this message is to install VirtualBox, which
is available for free on all major platforms.

If you believe you already have a provider available, make sure it
is properly installed and configured. You can see more details about
why a particular provider isn't working by forcing usage with
`vagrant up --provider=PROVIDER`, which should give you a more specific
error message for that particular provider.

centos/7이라는 box를 vagrant에 등록 해준다.

이때 default Provider를 선택하면 앞서 --provider= 옵션을 사용하지 않아도 된다.

[root@localhost vagrant]# vagrant box add centos/7
==> box: Loading metadata for box 'centos/7'
    box: URL: https://vagrantcloud.com/centos/7
This box can work with multiple providers! The providers that it
can work with are listed below. Please review the list and choose
the provider you will be working with.

1) hyperv
2) libvirt
3) virtualbox
4) vmware_desktop

Enter your choice: 3
==> box: Adding box 'centos/7' (v1902.01) for provider: virtualbox
    box: Downloading: https://vagrantcloud.com/centos/boxes/7/versions/1902.01/providers/virtualbox.box
==> box: Successfully added box 'centos/7' (v1902.01) for 'virtualbox'!

vagrant init

명령어를 사용할 경우

해당 명령어를 실행한 디렉토리에

Vagrantfile이 생성되는데, VM에 대한 설정을 할 수있다.

여기에서는

config.vm.box = "centos/7" 이 부분만 수정 함으로써 기본 OS가 centos 7 버전이라는 것을 알려주었다.

# -*- mode: ruby -*-
# vi: set ft=ruby :

# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
  # The most common configuration options are documented and commented below.
  # For a complete reference, please see the online documentation at
  # https://docs.vagrantup.com.

  # Every Vagrant development environment requires a box. You can search for
  # boxes at https://vagrantcloud.com/search.
  config.vm.box = "centos/7"

앞서서 vagrant를 1.x로 깔았음으로

아래와 같이 오류가 나온다.

4.0, 4.1, 4.2, 4.3, 5.0, 5.1

Virtual Box 5.1까지만 호환 한다는 의미이다.

Vagrant를 1.x에서 2.x로 새로 install 하자.

vagrant 삭제

[root@localhost vagrant]# rm -rf /opt/vagrant/
[root@localhost vagrant]# rm -f /usr/bin/vagrant

vagrant install

[root@localhost vagrant]# sudo wget https://releases.hashicorp.com/vagrant/2.2.4/vagrant_2.2.4_x86_64.rp

[root@localhost vagrant]# sudo yum localinstall vagrant_2.2.4_x86_64.rpm

[root@localhost vagrant]# vagrant up --provider=virtualbox
The provider 'virtualbox' that was requested to back the machine
'default' is reporting that it isn't usable on this system. The
reason is shown below:

Vagrant has detected that you have a version of VirtualBox installed
that is not supported by this version of Vagrant. Please install one of
the supported versions listed below to use Vagrant:

4.0, 4.1, 4.2, 4.3, 5.0, 5.1

A Vagrant update may also be available that adds support for the version
you specified. Please check www.vagrantup.com/downloads.html to download
the latest version.
[root@localhost vagrant]# yum update vagrant
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.moack.net
 * extras: centos.mirror.moack.net
 * updates: centos.mirror.moack.net
No packages marked for update
[root@localhost vagrant]# yum uninstall vagrant
Loaded plugins: fastestmirror, langpacks
No such command: uninstall. Please use /usr/bin/yum --help
[root@localhost vagrant]# rm -rf /opt/vagrant/
[root@localhost vagrant]# rm -f /usr/bin/vagrant
[root@localhost vagrant]# sudo wget https://releases.hashicorp.com/vagrant/2.2.4/vagrant_2.2.4_x86_64.rpm
--2019-06-21 19:40:06--  https://releases.hashicorp.com/vagrant/2.2.4/vagrant_2.2.4_x86_64.rpm
Resolving releases.hashicorp.com (releases.hashicorp.com)... 151.101.229.183, 2a04:4e42:36::439
Connecting to releases.hashicorp.com (releases.hashicorp.com)|151.101.229.183|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 40824607 (39M) [application/x-redhat-package-manager]
Saving to: ‘vagrant_2.2.4_x86_64.rpm’

100%[========================================================================================================================================================================>] 40,824,607  9.96MB/s   in 4.7s

2019-06-21 19:40:12 (8.20 MB/s) - ‘vagrant_2.2.4_x86_64.rpm’ saved [40824607/40824607]

[root@localhost vagrant]# vagrant --version
bash: /usr/bin/vagrant: 그런 파일이나 디렉터리가 없습니다
[root@localhost vagrant]# vagrnat
bash: vagrnat: 명령을 찾을 수 없습니다...

[root@localhost vagrant]# ls
Vagrantfile  vagrant_2.2.4_x86_64.rpm
[root@localhost vagrant]# sudo yum localinstall vagrant_2.2.4_x86_64.rpm
Loaded plugins: fastestmirror, langpacks
Examining vagrant_2.2.4_x86_64.rpm: 1:vagrant-2.2.4-1.x86_64
Marking vagrant_2.2.4_x86_64.rpm as an update to 1:vagrant-1.9.6-1.x86_64
Resolving Dependencies
--> Running transaction check
---> Package vagrant.x86_64 1:1.9.6-1 will be updated
---> Package vagrant.x86_64 1:2.2.4-1 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================================================================================================================================
 Package                                        Arch                                          Version                                          Repository                                                    Size
==================================================================================================================================================================================================================
Updating:
 vagrant                                        x86_64                                        1:2.2.4-1                                        /vagrant_2.2.4_x86_64                                        110 M

Transaction Summary
==================================================================================================================================================================================================================
Upgrade  1 Package

Total size: 110 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : 1:vagrant-2.2.4-1.x86_64                                                                                                                                                                       1/2
  Cleanup    : 1:vagrant-1.9.6-1.x86_64                                                                                                                                                                       2/2
경고: file /opt/vagrant/embedded/share/info/rluserman.info: remove failed: 그런 파일이나 디렉터리가 없습니다
경고: file /opt/vagrant/embedded/share/info/readline.info: remove failed: 그런 파일이나 디렉터리가 없습니다
경고: file /opt/vagrant/embedded/share/info/libffi.info: remove failed: 그런 파일이나 디렉터리가 없습니다

앞서 vagrant를 새롭게 install 하였고, 아래와 같이 centos/7을 init 해보자.

vagrant init centos/7

vagrant up

[root@localhost vagrant-centos-7]# vagrant init centos/7
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
[root@localhost vagrant-centos-7]# vagrant up

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'centos/7'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'centos/7' version '1902.01' is up to date...
==> default: Setting the name of the VM: vagrant-centos-7_default_1561113935045_2937
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default:
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default:
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: No guest additions were detected on the base box for this VM! Guest
    default: additions are required for forwarded ports, shared folders, host only
    default: networking, and more. If SSH fails on this machine, please install
    default: the guest additions and repackage the box to continue.
    default:
    default: This is not an error message; everything may continue to work properly,
    default: in which case you may ignore this message.
==> default: Rsyncing folder: /root/vagrant-centos-7/ => /vagrant

상위와 같이 로그가 나왔다면, 성공적으로 virtual box, vagrant가 install 된것이다.

vagrant ssh로 접속까지 된다면 완료 이다.

vagrant ssh

[devops@localhost ~]$ vagrant ssh
[vagrant@localhost ~]$ ls
[vagrant@localhost ~]$ pwd
/home/vagrant
[vagrant@localhost ~]$
728x90
반응형

'OS' 카테고리의 다른 글

Hyper V Ubuntu File share (samba)  (0) 2020.09.13
virtual host on centos  (0) 2020.03.27
Nexus install on Centos7 with docker  (0) 2020.03.27
Network setup CentOS7 on Virtual Box  (0) 2020.03.27
Docker Ubuntu VM 만들기  (1) 2020.03.27