Installing Vector from source should be a last resort if Vector does not support your platform, operating system, or provide a pre-built archive. Because Vector is written in Rust it can compile to a single static binary. You can view an example of this in the musl builder Docker image.
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable
Create a directory to unpack the Vector source into:
Download and unarchive the Vector source:
curl -OL https://github.com/timberio/vector/archive/master.tar.gz | tar -xzf - --directory="vector"
Change into the
And build the project via the
build Make target:
The vector binary will be placed in
target/<target>/release/vector. For example, if you are building Vector on your Mac, your target triple is
x86_64-apple-darwin, and the Vector binary will be located at
Finally, go ahead and start vector:
target/<target>/release/vector --config config/vector.toml
You'll most likely want to move the
vector binary in your
$PATH, such as the
The Vector configuration file is located at:
A full spec is located at
config/vector.spec.toml and examples are located in
config/vector/examples/*. You can learn more about configuring Vector in the Configuration section.
We highly recommend creating a data directory that Vector can use:
And in your
data_dir = "/var/lib/vector"
Vector includes service files in case you need them:
To install Vector into Init.d run:
cp -av distribution/init.d/vector /etc/init.d
To install Vector into Systemd run:
cp -av distribution/systemd/vector /etc/systemd/system
Simply follow the same installation instructions above.