Install in any folder fedora redhat rocky alma centos amazon mageia
Installing Golf without root access (for instance in a home directory of a user) can be helpful if you have no root permissions, or if you just want to test locally before installing Golf on your system.
To install Golf locally without root access, first decide which directory you'd like to install it. It can be any directory you can read/write access to. In this case, we'll use $HOME/.app/golf directory as an example.
Set the Golf root directory:
GG_ROOT="$HOME/.app/golf"
Copied!
Get wget and tar (some distros don't have it by default; you do need root access for this, or if not, ask your System Administrator to perform these tasks):
sudo dnf install -y wget tar
Copied!
Download Golf source code and extract it:
Install dependencies (you do need root access for this, or if not, ask your System Administrator to perform these tasks):
Then compile the source:
make -j$(nproc) GG_LOCAL=1 DESTDIR="$GG_ROOT"
Copied!
And install Golf:
make GG_LOCAL=1 DESTDIR="$GG_ROOT" install
Copied!
In order for the installation to take effect, you must update paths (so executables and other files, such as man pages, are found):
export GG_ROOT="$HOME/.app/golf"
export PATH="$GG_ROOT/usr/bin":$PATH
export C_INCLUDE_PATH="$GG_ROOT/usr/include":$C_INCLUDE_PATH
export MANPATH=$GG_ROOT/usr/share/man/:$MANPATH
mandb -u -c
Copied!
To make these path settings permanent, add the above exports to the end of your $HOME/.bashrc file so it runs when you start a new session (or in any other file you execute before working with Golf).
If you want to have SELinux enabled, you must have root access to setup Golf for SELinux, or if not, ask your System Administrator to perform this (otherwise you must disable SELinux):
sudo $GG_ROOT/usr/lib/golf/selinux/selinux.setup
Copied!
You've installed Golf!
To test, type in command line:
gg -g
Copied!
If you see the path you choose for GG_ROOT above, it's working!
Note that if you're using Unix sockets (for instance for web servers to talk to your Golf server), your $HOME directory as well as Golf root directory must be searchable to access those sockets (if you're using TCP ports instead of sockets, then this isn't necessary):
chmod o+x $HOME
find $HOME/.app/golf -type d -name '*' -exec chmod o+x {} \;
Copied!
Here's how to uninstall.
Install golf
install-arch-manjaro
install-debian
install-fedora-redhat-rocky-alma-centos-amazon-mageia
install-from-source-arch-manjaro
install-from-source-debian-ubuntu-raspbian
install-from-source-fedora-redhat-rocky-alma-centos-amazon-mageia
install-from-source-opensuse
install-in-any-folder-arch-manjaro
install-in-any-folder-debian-ubuntu-raspbian
install-in-any-folder-fedora-redhat-rocky-alma-centos-amazon-mageia
install-in-any-folder-opensuse
install-opensuse
install-raspbian
install-ubuntu
uninstall
See all
documentation
Copyright (c) 2019-2025 Gliim LLC. All contents on this web site is "AS IS" without warranties or guarantees of any kind.