|
| 1 | +# Index |
| 2 | + |
| 3 | +* [Debian-based distributions](#debian-based-distributions) (Debian, Ubuntu, etc.) |
| 4 | +* [RPM-based distributions](#rpm-based-distributions) (Fedora, CentOS, etc.) |
| 5 | +* [Prebuilt Binary](#prebuilt-binary) |
| 6 | +* [From Source](#from-source) |
| 7 | + |
| 8 | +# Prerequisites |
| 9 | + |
| 10 | +Make sure that your user has the `/dev/kvm` access. On most distributions, this can be accomplished by adding the current user to the `kvm` group: |
| 11 | + |
| 12 | +```shell |
| 13 | +sudo gpasswd -a $USER kvm |
| 14 | +``` |
| 15 | + |
| 16 | +Once added to a group, you will need to re-login for the changes to take effect. |
| 17 | + |
| 18 | +## Installation |
| 19 | + |
| 20 | +## Debian-based distributions |
| 21 | + |
| 22 | +First, make sure that you've installed the APT transport for downloading packages via HTTPS and common X.509 certificates: |
| 23 | + |
| 24 | +```shell |
| 25 | +sudo apt-get update && sudo apt-get -y install apt-transport-https ca-certificates |
| 26 | +``` |
| 27 | + |
| 28 | +Then, add the Cirrus Labs repository: |
| 29 | + |
| 30 | +```shell |
| 31 | +echo "deb [trusted=yes] https://apt.fury.io/cirruslabs/ /" | sudo tee /etc/apt/sources.list.d/cirruslabs.list |
| 32 | +``` |
| 33 | + |
| 34 | +Now you can update the package index files and install the Vetu: |
| 35 | + |
| 36 | +```shell |
| 37 | +sudo apt-get update && sudo apt-get -y install vetu |
| 38 | +``` |
| 39 | + |
| 40 | +## RPM-based distributions |
| 41 | + |
| 42 | +First, create a `/etc/yum.repos.d/cirruslabs.repo` file with the following contents: |
| 43 | + |
| 44 | +``` |
| 45 | +[cirruslabs] |
| 46 | +name=Cirrus Labs Repo |
| 47 | +baseurl=https://yum.fury.io/cirruslabs/ |
| 48 | +enabled=1 |
| 49 | +gpgcheck=0 |
| 50 | +``` |
| 51 | + |
| 52 | +Now you can install the Vetu: |
| 53 | + |
| 54 | +```shell |
| 55 | +sudo yum -y install vetu |
| 56 | +``` |
| 57 | + |
| 58 | +## Prebuilt Binary |
| 59 | + |
| 60 | +Check the [releases page](https://github.com/cirruslabs/vetu/releases) for a pre-built `vetu` binary for your platform. |
| 61 | + |
| 62 | +Here's a one-liner for Linux to download the latest release: |
| 63 | + |
| 64 | +```bash |
| 65 | +curl -L -o vetu https://github.com/cirruslabs/vetu/releases/latest/download/vetu-linux-$(uname -m) && sudo mv vetu /usr/bin/vetu && sudo chmod +x /usr/bin/vetu && sudo setcap cap_net_raw,cap_net_admin+eip /usr/bin/vetu |
| 66 | +``` |
| 67 | + |
| 68 | +## From Source |
| 69 | + |
| 70 | +If you have [Golang](https://golang.org/) 1.21 or newer installed, you can run: |
| 71 | + |
| 72 | +``` |
| 73 | +go install github.com/cirruslabs/vetu/...@latest |
| 74 | +``` |
| 75 | + |
| 76 | +This will build and place the `vetu` binary in `$GOPATH/bin`. |
| 77 | + |
| 78 | +Vetu binary also needs some capabilities assigned to it: |
| 79 | + |
| 80 | +```shell |
| 81 | +sudo setcap cap_net_raw,cap_net_admin+eip $GOPATH/bin/vetu |
| 82 | +``` |
| 83 | + |
| 84 | +To be able to run `vetu` command from anywhere, make sure the `$GOPATH/bin` directory is added to your `PATH` |
| 85 | +environment variable (see [article in the Go wiki](https://github.com/golang/go/wiki/SettingGOPATH) for more details). |
0 commit comments