Tries to follow the packaging guidelines from Fedora.
- Binary:
/usr/bin/consul
- Config:
/etc/consul.d/
- Sysconfig:
/etc/sysconfig/consul
To build the RPM (non-root user):
-
Check out this repo
-
Install rpmdevtools and mock
sudo yum install rpmdevtools mock
-
Set up your rpmbuild directory tree
rpmdev-setuptree
-
Link the spec file and sources from the repository into your rpmbuild/SOURCES directory
ln -s ${repo}/SPECS/consul.spec rpmbuild/SPECS/ ln -s ${repo}/SOURCES/* rpmbuild/SOURCES/
-
Download remote source files
spectool -g -R rpmbuild/SPECS/consul.spec
-
Build the RPM
rpmbuild -ba rpmbuild/SPECS/consul.spec
-
(Optional) Build for another Fedora release
sudo mock -r fedora-19-x86_64 --resultdir rpmbuild/RPMS/x86_64/ rpmbuild/SRPMS/consul-0.2.0-1.fc20.src.rpm
- Install the rpm
- Put config files in
/etc/consul.d/
- Change command line arguments to consul in
/etc/sysconfig/consul
. Note: You should remove-bootstrap
if this isn't the first server. - Start the service and tail the logs
systemctl start consul.service
andjournalctl -f
- To enable at reboot
systemctl enable consul.service
See the consul.io website.