Kashibuchi’s blog

勉強のこと、日々のこと

Vgarnt up がうまくいかない

qiita.com

↑そのまま実行。なるほど。

>vagrant up

・・・略・・・

 * base: ftp.iij.ad.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
No package kernel-devel-3.10.0-1127.el7.x86_64 available.
Error: Nothing to do
==> 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.
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

yum install -y kernel-devel-`uname -r`

Stdout from the command:

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
No package kernel-devel-3.10.0-1127.el7.x86_64 available.


Stderr from the command:

Error: Nothing to do

>vagrant ssh
$ sudo yum update kernel*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
Resolving Dependencies
--> Running transaction check
---> Package kernel.x86_64 0:3.10.0-1160.45.1.el7 will be installed
---> Package kernel-tools.x86_64 0:3.10.0-1127.el7 will be updated
---> Package kernel-tools.x86_64 0:3.10.0-1160.45.1.el7 will be an update
---> Package kernel-tools-libs.x86_64 0:3.10.0-1127.el7 will be updated
---> Package kernel-tools-libs.x86_64 0:3.10.0-1160.45.1.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================
 Package                         Arch                 Version                            Repository             Size
=====================================================================================================================
Installing:
 kernel                          x86_64               3.10.0-1160.45.1.el7               updates                50 M
Updating:
 kernel-tools                    x86_64               3.10.0-1160.45.1.el7               updates               8.2 M
 kernel-tools-libs               x86_64               3.10.0-1160.45.1.el7               updates               8.0 M

Transaction Summary
=====================================================================================================================
Install  1 Package
Upgrade  2 Packages

Total download size: 67 M
Is this ok [y/d/N]: y
Downloading packages:
No Presto metadata available for updates
(1/3): kernel-tools-3.10.0-1160.45.1.el7.x86_64.rpm                                           | 8.2 MB  00:00:03
(2/3): kernel-tools-libs-3.10.0-1160.45.1.el7.x86_64.rpm                                      | 8.0 MB  00:00:03
(3/3): kernel-3.10.0-1160.45.1.el7.x86_64.rpm                                                 |  50 MB  00:00:10
---------------------------------------------------------------------------------------------------------------------
Total                                                                                6.4 MB/s |  67 MB  00:00:10
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : kernel-tools-libs-3.10.0-1160.45.1.el7.x86_64                                                     1/5
  Updating   : kernel-tools-3.10.0-1160.45.1.el7.x86_64                                                          2/5
  Installing : kernel-3.10.0-1160.45.1.el7.x86_64                                                                3/5
  Cleanup    : kernel-tools-3.10.0-1127.el7.x86_64                                                               4/5
  Cleanup    : kernel-tools-libs-3.10.0-1127.el7.x86_64                                                          5/5
  Verifying  : kernel-3.10.0-1160.45.1.el7.x86_64                                                                1/5
  Verifying  : kernel-tools-libs-3.10.0-1160.45.1.el7.x86_64                                                     2/5
  Verifying  : kernel-tools-3.10.0-1160.45.1.el7.x86_64                                                          3/5
  Verifying  : kernel-tools-libs-3.10.0-1127.el7.x86_64                                                          4/5
  Verifying  : kernel-tools-3.10.0-1127.el7.x86_64                                                               5/5

Installed:
  kernel.x86_64 0:3.10.0-1160.45.1.el7

Updated:
  kernel-tools.x86_64 0:3.10.0-1160.45.1.el7             kernel-tools-libs.x86_64 0:3.10.0-1160.45.1.el7

Complete!
$exit
>vagrant reload --provision
・・・すごく長い標準出力・・・
3.10.0-1160.45.1.el7.x86_64.
Redirecting to /bin/systemctl start vboxadd.service
Redirecting to /bin/systemctl start vboxadd-service.service
Unmounting Virtualbox Guest Additions ISO from: /mnt
==> default: Checking for guest additions in VM...
==> default: Rsyncing folder: /cygdrive/c/Users/kamin/work/VagrantBase/centOsPrototype/ => /vagrant
> 

で、終わり。 なるほどなー。

ついでに色々入れた

>vagrant ssh
$ echo vagrant | sudo yum install -y https://corretto.aws/downloads/latest/amazon-corretto-11-x64-linux-jdk.rpm
$  sudo yum install -y vim

qiita.com

$ sudo vim /etc/yum.repos.d/elasticsearch.repo

で編集

[elasticsearch-6.x]
name=Elasticsearch repository for 6.x packages
baseurl=https://artifacts.elastic.co/packages/6.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md

でやってみる

$ sudo yum install -y elasticsearch-6.8.3
・・・略・・・
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Creating elasticsearch group... OK
Creating elasticsearch user... OK
  Installing : elasticsearch-6.8.3-1.noarch                                                                      1/1
### NOT starting on installation, please execute the following statements to configure elasticsearch service to start automatically using systemd
 sudo systemctl daemon-reload
 sudo systemctl enable elasticsearch.service
### You can start elasticsearch service by executing
 sudo systemctl start elasticsearch.service
Created elasticsearch keystore in /etc/elasticsearch
  Verifying  : elasticsearch-6.8.3-1.noarch                                                                      1/1

Installed:
  elasticsearch.noarch 0:6.8.3-1

Complete!

いけた! わーい。