4
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

PackerでCentOS4.8のbox作った

Last updated at Posted at 2014-09-27

vagrantcloudに登録しようとしたところ、自前でbox保管場所を用意する必要が有ることに気がついた。

download

box作成手順

  • CentOS 4.8のpackerがあまり見つからなかったのでいっその事作った。
  • iso_download.sh に書いているISOは公式のミラーです。
sh iso_download.sh
packer build CentOS-4.8-i386.json
packer build CentOS-4.8-x86_64.json

注意点

  • vagrant up した時に以下エラーが出ますが、CentOS4で入っているsshのバージョンが古いのが原因だと思います。
sudo: Illegal option -E
usage: sudo -V | -h | -L | -l | -v | -k | -K | [-H] [-P] [-S] [-b] [-p prompt]
            [-u username/#uid] [-r role] [-t type] -s | <command>

使い方

vagrant init
Vagrantfile
-   config.vm.box = "base"
+   config.vm.box = "file://CentOS-4.8-i386.box"
vagrant up
vagrant ssh

bashのrpmリビルド方法

sudo yum groupinstall -y "Development Tools"
wget https://oss.oracle.com/el4/SRPMS-updates/bash-3.0-27.0.3.el4.src.rpm
sudo rpmbuild --rebuild bash-3.0-27.0.3.el4.src.rpm
  • /usr/src/redhat/RPMS/i386/bash-3.0-27.0.3.i386.rpm

が生成される。

更新
sudo rpm -Uvh /usr/src/redhat/RPMS/i386/bash-3.0-27.0.3.i386.rpm
4
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?