Как установить vagrant linux mint

linux-notes.org

Vagrant является инструментом для создания и распространения среды разработки. Vagrant может работать с VirtualBox/VMware, а так же AWS/OpenStack, или в контейнерах ( например Docker/LXC). Vagrant можно использовать в Unix/Linux и я в своей статье расскажу как можно установить его.

Установить Vagrant на Debian/Ubuntu.

Чтобы установить данное ПО на Ubuntu, выполните:

В качестве виртуализации, можно использовать Virtualbox, установим его:

Но после чего, стоит установить dkms пакет — это модули для VirtualBox(vboxdrv, vboxnetflt и vboxnetadp):

Для ОС, Debian/Mint:

Ставим Virtualbox (но перед ним, установим линукс хеадеры — так званые модули):

Писал как установить сам виртуалбокс:

Установим еще ruby (он потребуется для установки самого вагранта):

Производим установку Vagrant:

Установить Vagrant на CentOS/Fedora/RedHat.

Добавляем репозиторий для virtualbox:

Устанавливаем разное необходимое:

И устанавливаем virtualbox:

Писал когда-то статью по этой установке:

Выполняем установку ПО:

Обновим все пакеты:

Выполняем установку Vagrant:

Установить Vagrant на MacOS.

Провайдером для Vagrant будет VirtualBox, по этому — устанавливаем:

Устанавливаем сам Vagrant:

Менеджер для управления машинами:

Другие ОС:

Для других ОС, можно использовать git репозиторий, выполним клонирование:

Затем, переходим в этот путь (где находиться клон). Все команды будут работать с этого пути:

Запустите bundle команду с версией для установки:

Теперь вы можете запустить Vagrant, запустив bundle из внутри этого каталога.

Локальное использование

Для того, чтобы использовать вашу локальную, установленную версию Vagrant в других проектах, вам нужно будет создать binstub и добавить его в свой путь.

Во-первых, выполните следующую команду из репозитория:

Это будет генерировать файлы в exec/, включая vagrant. Теперь можно указать полный путь к exec/vagrant где-нибудь в вашей операционной системе:

Если вы не хотите указывать полный путь к Vagrant (т.е. вы просто хотите запустить его), вы можете создать символическую ссылку на ваш Exec:

Настройка Vagrant в Unix/Linux

Вагрант уже имеется, я под мои виртуальные машины, создам папку:

Заходим в директорию:

Создаём новую машину:

Vagrant box-ы тут:

Можно найти любой желающий.

Использование Vagrant в Unix/Linux

Запустим virtualbox в Linux ОС:

Переходим в директорию где лежат все VagrantFile-ы и выполняем команду:

Подключаемся к данной виртуальной машине:

Все! Установка Vagrant в Unix/Linux завершена.

Добавить комментарий Отменить ответ

Этот сайт использует Akismet для борьбы со спамом. Узнайте, как обрабатываются ваши данные комментариев.

Источник

🐧 Как установить Vagrant на Linux

Установка Vagrant на Linux

Vagrant доступен в официальных репозиториях большинства дистрибутивов Linux и Unix.

Таким образом, мы можем установить vagrant, используя менеджеры пакетов по умолчанию.

Читайте также:  Настройка подключения openvpn windows

Например, выполните следующую команду, чтобы установить Vagrant на Debian, Ubuntu, Linux Mint:

Официальные версии в репозиториях могут быть очень устаревшими.

Если вам нужна самая последняя версия, перейдите на официальную страницу скачивания Vagrant и загрузите последний бинарник для своей операционной системы Linux.

Например, если вы используете Debian и другие системы на основе Debian, такие как Ubuntu, просто скачайте версию пакета .deb.

На момент написания этого руководства последней версией была 2.2.10.

Он доступен как для 32-битной, так и для 64-битной архитектуры.

Здесь я использовал gdebi потому, что он автоматически устанавливает необходимые зависимости.

Если вы скачали файл .rpm, вы можете установить его с помощью команды:

Установка гипервизоров

После установки Vagrant вам необходимо установить любые гипервизоры виртуализации, например VirtualBox или KVM.

Потому что Vagrant не является отдельной программой для виртуализации.

Это просто оболочка и интерфейс для других приложений виртуализации.

Vagrant изначально разрабатывался для VirtualBox.

Начиная с версии 1.1, команда Vagrant3 расширила свою поддержку другого популярного программного обеспечения для виртуализации и серверных сред, включая Aws, Azure, GCE, Docker, KVM, Proxmox, Openstack, Openvz, VMware и многих других.

Вы можете просмотреть полный список поддерживаемых провайдеров / сред тут:

В этом руководстве я собираюсь использовать Oracle VirtualBox.

Потому что установить Virtualbox легко, и Vagrant использует VirtualBox в качестве поставщика по умолчанию.

Чтобы установить VirtualBox на Debian, Ubuntu, Linux Mint, выполните следующую команду:

Чтобы установить Virtualbox на Red Hat, CentOS, Fedora, запустите:

Чтобы установить Virtualbox в SUSE / openSUSE, запустите:

Проверьте установку Vagrant

Чтобы проверить, правильно ли установлен Vagrant, просто запустите его без каких-либо опций в терминале:

Вы также можете использовать параметр -h или –help, чтобы вызвать раздел справки.

Чтобы получить справку по отдельным командам, запустите:

Чтобы просмотреть версию Vagrant, запустите:

Обновление Vagrant

Если вы установили Vagrant из официальных репозиториев с помощью диспетчера пакетов дистрибутива, вы можете просто обновить Vagrant до более новой версии, обновив свою систему.

Например, в системах на основе Debian следующие команды обновят Vagrant до более новой версии:

В системах на основе RPM, таких как RHEL, CentOS, выполните:

Если вы загрузили и установили Vagrant вручную, просто загрузите новую версию с официальной страницы загрузки Vagrant и установите ее, как описано в разделе «Установка Vagrant» выше.

Исправление проблем

Если вы запускаете несколько гипервизоров на одном хост-компьютере, вы, вероятно, столкнетесь с ошибкой, подобной приведенной ниже, при запуске виртуальной машины:

Эта ошибка возникает из-за того, что в настоящее время используется другой гипервизор, например KVM .

Чтобы исправить эту ошибку, вам может потребоваться временно заблокировать этот гипервизор.

Найдите модуль KVM с помощью команды:

Если ваша хост-система – Intel, вы получите следующий результат:

Если это AMD, вы получите вместо этого:

Теперь заблокируйте модуль KVM с помощью команды:

Введите «kvm-amd» в приведенной выше команде, если ваш процессор AMD.

Перезагрузите систему и попробуйте снова запустить Vagrant.

На этот раз виртуальная машина запустится без проблем.

Источник

Installing Vagrant on Linux Mint

This article will cover installing Vagrant on Linux Mint, but what is Vagrant? Vagrant is a useful tool for setting up testing and development virtual machines on Linux. Setting it up on Debian and Ubuntu based distributions like Linux Mint is quite straight forward and the following guide will go over the main steps. For further information, Vagrant itself has some great docs http://docs.vagrantup.com/v2/. It covers installation of Vagrant on various Linux distros as well as more advanced management and configuration, but here’s a quick start:

Читайте также:  Как посмотреть состав компьютера windows 10

Installing Vagrant on Linux Mint

First, open up a terminal and install virtual box, the kernel sources and vagrant all in one neat step:
sudo apt-get install virtualbox virtualbox-dkms vagrant

Please note that the version in Mint/Ubuntu’s repositories is not the latest one. If you’ve using tools such as PuPHPet you’ll need to grab the latest version of Vagrant from the Vagrant downloads page.

Make a new sub directory in your home folder for your Vagrant machines files to be stored in:
mkdir

Now lets get create a VM. Pick what machine you want from the Vagrant Boxes (http://www.vagrantbox.es/). I’m going to use Debian 7.3. You need to copy the box URL.

Make sure you’re in your vagrant directory:

cd

/vagrant

Initialise the vagrant box. This creates a configuration file for it which you can use to change key settings before you start it up

vagrant init debs http://puppet-vagrant-boxes.puppetlabs.com/debian-73-x64-virtualbox-nocm.box

Make configuration changes if you want to. I like to set a hostname and have the machine appear on my main network so I can access it from other computers

nano Vagrantfile

These are the additional lines I put in:

# Set the machines hostname
config .vm.hostname = «debs7»

# Setup a network bridge
config.vm.network :public_network

Now you can start the vagrant box. It’ll download the image first time so it might be a little slow to get going.
vagrant up

Once done, you can access it using
vagrant ssh

Источник

» Installing Vagrant

Installing Vagrant is extremely easy. Head over to the Vagrant downloads page and get the appropriate installer or package for your platform. Install the package using standard procedures for your operating system.

The installer will automatically add vagrant to your system path so that it is available in terminals. If it is not found, please try logging out and logging back in to your system (this is particularly necessary sometimes for Windows).

Looking for the gem install? Vagrant 1.0.x had the option to be installed as a RubyGem. This installation method is no longer supported. If you have an old version of Vagrant installed via Rubygems, please remove it prior to installing newer versions of Vagrant.

Beware of system package managers! Some operating system distributions include a vagrant package in their upstream package repos. Please do not install Vagrant in this manner. Typically these packages are missing dependencies or include very outdated versions of Vagrant. If you install via your system’s package manager, it is very likely that you will experience issues. Please use the official installers on the downloads page.

Читайте также:  Efi cfg windows 10

» Running Multiple Hypervisors

Sometimes, certain hypervisors do not allow you to bring up virtual machines if more than one hypervisor is in use. If you are lucky, you might see the following error message come up when trying to bring up a virtual machine with Vagrant and VirtualBox:

Other operating systems like Windows will blue screen if you attempt to bring up a VirtualBox VM with Hyper-V enabled. Below are a couple of ways to ensure you can use Vagrant and VirtualBox if another hypervisor is present.

» Linux, VirtualBox, and KVM

The above error message is because another hypervisor (like KVM) is in use. We must blacklist these in order for VirtualBox to run correctly.

First find out the name of the hypervisor:

The one we’re interested in is kvm_intel . You might have another.

Blacklist the hypervisor (run the following as root):

Restart your machine and try running vagrant again.

» Windows, VirtualBox, and Hyper-V

If you wish to use VirtualBox on Windows, you must ensure that Hyper-V is not enabled on Windows. You can turn off the feature by running this Powershell command:

You can also disable it by going through the Windows system settings:

  • Right click on the Windows button and select ‘Apps and Features’.
  • Select Turn Windows Features on or off.
  • Unselect Hyper-V and click OK.

You might have to reboot your machine for the changes to take effect. More information about Hyper-V can be read here.

Источник

How to Install Vagrant on Linux Mint 19 Easy Guide

GNU/Linux Mint 19.x Installing Vagrant – Quick-Start Guide

You are Welcome! The Tutorial Shows You Step-by-Step How to Install the Latest Vagrant in GNU/Linux Mint 19.x Tara/Tessa/Tina/Tricia 64-bit Desktops.

And Vagrant for Linux Mint 19 Setup is a Tool that Makes it Easier to Run and Manage Virtual Machines on your computer.

Especially relevant: by Default Vagrant Works only with VirtualBox VMs, to get it Working with VMware or other Hypervisor you have to Install a Paid Plugin.

Furthermore, to Get Installed right the Latest Vagrant Release for Linux we Provide Directly to the Download from the Vagrant WebSite.

Finally, for your Comfort this Guide is Split into several Pages to make it Easier to View and Follow every single Step involved.

And the Vagrant main Features are:

  • Makes a VM with an OS of your choice
  • Changes the Settings of a VM (e.g., RAM, number of CPUs, etc.)
  • Settles Network Interfaces to access a VM from outside
  • Etablishes Shared Folders to exchange with your computer
  • Defines the Hostname of a VM
  • Provides Software for the VM by shell scripts or configuration management solutions
  • Operates specific Tweakings on hosts and guests
  • SSH into a VM from you computer

    1. Launching Terminal

    Open a Shell Terminal emulator window
    Start Typing ‘term’ on Desktop.
    (Press “Enter” to Execute Commands)

    Источник

Оцените статью