vagrant:create_box
Diferenças
Aqui você vê as diferenças entre duas revisões dessa página.
Ambos lados da revisão anteriorRevisão anteriorPróxima revisão | Revisão anterior | ||
vagrant:create_box [2014/08/06 15:03] – Édson Kuzniewski | vagrant:create_box [2022/05/25 16:24] (atual) – edição externa 127.0.0.1 | ||
---|---|---|---|
Linha 1: | Linha 1: | ||
====== Links para ver ====== | ====== Links para ver ====== | ||
+ | [[http:// | ||
+ | [[https:// | ||
+ | [[https:// | ||
- | [[https://github.com/ | + | ====== Create a BOX ====== |
- | [[https://github.com/ckan/ckan/wiki/How-to-Create-a-CentOS-Vagrant-Base-Box]]\\ | + | {{:vagrant: |
- | [[http://aruizca.com/steps-to-create-a-vagrant-base-box-with-ubuntu-14-04-desktop-gui-and-virtualbox/ | + | set **USER** and **PASSWORD** define '' |
+ | set **PASSWORD** root define '' | ||
+ | < | ||
+ | $ sudo apt-get install dkms | ||
+ | $ sudo apt-get install | ||
+ | </ | ||
+ | {{:vagrant:vitualbox-guest-addtions.png? | ||
+ | < | ||
+ | $ sudo mount /dev/cdrom /media/cdrom | ||
+ | $ sudo /media/cdrom/VBoxLinuxAdditions.run | ||
+ | $ sudo umount | ||
+ | $ sudo apt-get clean | ||
- | < | + | $ sudo / |
+ | $ sudo apt-get update -y | ||
+ | </code> | ||
+ | |||
+ | ===== Add the vagrant user to sudoers | ||
+ | < | ||
+ | $ sudo echo " | ||
+ | $ sudo chmod 0440 / | ||
+ | </ | ||
+ | |||
+ | ===== Install Vagrant Public Keys ===== | ||
+ | < | ||
+ | $ mkdir ~/.ssh | ||
+ | $ wget -qO- https:// | ||
+ | |||
+ | # Ensure we have the correct permissions set | ||
+ | $ chmod 0700 / | ||
+ | $ chmod 0600 / | ||
+ | $ chown -R vagrant / | ||
+ | </ | ||
+ | |||
+ | ===== Install OpenSSH Server ===== | ||
+ | < | ||
+ | $ sudo apt-get install -y openssh-server | ||
+ | $ sudo vi / | ||
+ | </ | ||
+ | ==== Ensure the following is set ==== | ||
+ | < | ||
+ | Port 22 | ||
+ | PubKeyAuthentication yes | ||
+ | AuthorizedKeysFile %h/ | ||
+ | PermitEmptyPasswords no | ||
+ | </ | ||
+ | < | ||
+ | $ sudo service ssh restart | ||
+ | </ | ||
+ | |||
+ | ===== GRUB ===== | ||
+ | Run Gedit as root (gksu gedit).\\ | ||
+ | \\ | ||
+ | Open ''/ | ||
+ | < | ||
+ | GRUB_HIDDEN_TIMEOUT=0 | ||
+ | GRUB_HIDDEN_TIMEOUT_QUIET=true | ||
+ | </ | ||
+ | Change the values as follows: | ||
+ | < | ||
+ | GRUB_HIDDEN_TIMEOUT=10 | ||
+ | GRUB_HIDDEN_TIMEOUT_QUIET=false | ||
+ | </ | ||
+ | Save and run '' | ||
+ | |||
+ | ===== Create Vagrant Base Box ===== | ||
+ | Asuming you already have Vagrant installed in the host system, just run the following command: | ||
+ | < | ||
+ | $ vagrant package –-base < | ||
+ | </ | ||
+ | ==== Install the box ==== | ||
+ | < | ||
+ | $ vagrant box add {boxname} package.box | ||
+ | </ | ||
+ | ==== Init a Vagrant Box by referencing the Base one we have created ==== | ||
+ | < | ||
+ | $ vagrant init {boxname} | ||
+ | </ | ||
+ | ==== Edit the generated Vagrantfile by uncommenting the following lines ==== | ||
+ | To show window VM | ||
+ | < | ||
+ | config.vm.provider " | ||
+ | v.gui = true | ||
+ | end | ||
+ | </ | ||
+ | ==== Spin it up! ==== | ||
+ | < | ||
+ | $ vagrant up | ||
+ | </ | ||
+ | |||
+ | ==== ERROR ==== | ||
+ | <file sh ifup_eth1> | ||
ERROR: | ERROR: | ||
The following SSH command responded with a non-zero exit status. | The following SSH command responded with a non-zero exit status. |
vagrant/create_box.1407348209.txt.gz · Última modificação: 2022/05/25 16:25 (edição externa)