Поставил на ноутбук Ubuntu 14.04 LTS вместо Fedora 20. Ниже скрипт, который обновляет систему и ставит базовый набор необходимых инструментов.
#!/bin/bash # update system sudo apt-get update && sudo apt-get upgrade ### reboot # install useful tools sudo apt-get install vim gcc make m4 bindfs rsync ant tmux git mercurial vlc # install hfs+ support sudo apt-get install hfsplus hfsutils hfsprogs # install libraries needs by python & ruby sudo apt-get install libffi-dev python-dev libssl-dev zlib1g-dev ruby-dev # install skype & keepass ... skype pulls mysql as dependency :( sudo apt-get install skype keepassx #install chrome wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb sudo dpkg -i ./google-chrome-stable_current_amd64.deb # install kvm sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder \ bridge-utils virt-manager qemu-system libvirt-dev libxslt-dev \ libxml2-dev # install pip (python 2.7.6 installed out of box) sudo curl -sSL https://bootstrap.pypa.io/get-pip.py | python # install some python libs sudo pip install requests[security] --upgrade sudo pip install uwsgi virtualenv # install rvm (optional) (ruby 1.9.3 installed out of box) #sudo gpg --keyserver hkp://keys.gnupg.net --recv-keys \ 409B6B1796C275462A1703113804BB82D39DC0E3 #sudo curl -sSL https://get.rvm.io | bash -s stable # install vagrant (old one coz it requires ruby 1.9) # newer version requires ruby 2.0+ wget https://dl.bintray.com/mitchellh/vagrant/vagrant_1.6.5_x86_64.deb sudo dpkg -i ./vagrant_1.6.5_x86_64.deb # install required vagrant plugins vagrant plugin install vagrant-libvirt vagrant plugin install vagrant-mutate vagrant plugin install vagrant-rekey-ssh # pull debian 8 image vagrant box add debian/jessie64 # conver to libvirt format vagrant mutate debian/jessie64 libvirt # install nvidia optimus support + steam sudo apt-get install bumblebee bumblebee-nvidia primus mesa-utils steam ### reboot
После этого можно работать с vagrant с использованием kvm. Выглядит это примерно так:
$ vagrant init debian/jessie64 $ vagrant up --provider=libvirt Bringing machine 'default' up with 'libvirt' provider... ==> default: Creating image (snapshot of base box volume). ==> default: Creating domain with the following settings... ==> default: -- Name: v1_default ==> default: -- Domain type: kvm ==> default: -- Cpus: 1 ==> default: -- Memory: 512M ==> default: -- Management MAC: ==> default: -- Loader: ==> default: -- Base box: debian/jessie64 ==> default: -- Storage pool: default ==> default: -- Image: /var/lib/libvirt/images/v1_default.img (10G) ==> default: -- Volume Cache: default ==> default: -- Kernel: ==> default: -- Initrd: ==> default: -- Graphics Type: vnc ==> default: -- Graphics Port: 5900 ==> default: -- Graphics IP: 127.0.0.1 ==> default: -- Graphics Password: Not defined ==> default: -- Video Type: cirrus ==> default: -- Video VRAM: 9216 ==> default: -- Keymap: en-us ==> default: -- INPUT: type=mouse, bus=ps2 ==> default: -- Command line : ==> default: Creating shared folders metadata... ==> default: Starting domain. ==> default: Waiting for domain to get an IP address... ==> default: Waiting for SSH to become available... ==> default: Configuring and enabling network interfaces... ==> default: Installing rsync to the VM... ==> default: Rsyncing folder: /home/awlee/v1/ => /vagrant ==> default: Replaced insecure vagrant key with less insecure key! $ vagrant ssh The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Fri Oct 16 22:04:04 2015 from 192.168.121.1 vagrant@debian-jessie:~$
Ставим веб-сервер на виртуальную машинку и получаем окружение для проекта идентичное боевому серверу. Основная система хоста остается чистой и не засранной.