GOLF(2gg)

πŸ“¦ version 601.4.41, in ubuntu questing

✨ NAME ✨

hi bestie!! okay so this whole page is GOLF(2gg) β€” it lives in the Development corner of the manual, and it's your girl's Golf documentation. the official name of this whole vibe is:

install-in-any-folder-fedora-redhat-rocky-alma-centos-amazon-mageia β€” also known as install-golf πŸ’…

yeah that name is a mouthful, we know, but she's iconic and she knows it πŸ‘‘


🌸 DESCRIPTION 🌸

okay so listen: installing Golf with no root access at all (like, putting it right in a user's home directory) is genuinely so helpful. it's the move when you have zero root permissions, or honestly when you just wanna test it locally before you commit and install Golf on your actual system. vibe check passed ✨

to install Golf locally without root access, first you gotta decide which directory you want it in. it can be any directory you have read/write access to β€” literally any. for this example we're using the $HOME/.app/golf directory πŸŽ€

Set the Golf root directory:

GG_ROOT="$HOME/.app/golf"

next up, get wget and tar (some distros just don't ship with them by default 😭 and heads up β€” you do need root access for this part, or if you don't have it, ask your System Administrator to do these tasks for you):

sudo dnf install -y wget tar

Download the Golf source code and extract it:

wget "https://github.com/golf-lang/golf/archive/refs/heads/main.tar.gz" -O main.tar.gz
tar xvfz main.tar.gz
cd golf-main

Install the dependencies (again bestie, you do need root access for this, or ask your System Administrator to perform these tasks):

sudo dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm || true
sudo dnf install -y rpmdevtools
sudo dnf builddep -y golf.spec

Then compile the source:

make -j$(nproc) GG_LOCAL=1 DESTDIR="$GG_ROOT"

And install Golf:

make GG_LOCAL=1 DESTDIR="$GG_ROOT" install

okay so for the installation to actually take effect, you MUST update your paths (that's how your executables and other files, like man pages, get found at all):

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

to make these path settings permanent, just add all those exports to the end of your $HOME/.bashrc file so it runs every time you start a new session (or honestly, in any other file you execute before working with Golf β€” whatever works for you 🫢).

if you want to have SELinux enabled, you must have root access to set up Golf for SELinux β€” or if not, ask your System Administrator to perform this. otherwise, you must disable SELinux. no cap, that's the deal πŸ™ˆ
sudo $GG_ROOT/usr/lib/golf/selinux/selinux.setup

You've installed Golf!! πŸŽ‰πŸ‘‘ periodt.

to test it, type this into the command line:

gg -g

if you see the path you chose for GG_ROOT above β€” it's working! ate and left no crumbs πŸ’…

⚠️ real talk: if you're using Unix sockets (like, for instance, for web servers to talk to your Golf server), your $HOME directory as well as the Golf root directory must be searchable to access those sockets. if you're using TCP ports instead of sockets, then this isn't necessary, so you can skip this πŸ’–
chmod o+x $HOME
find $HOME/.app/golf -type d -name '*' -exec chmod o+x {} \;

here's how to uninstall. (yes that's it, that's the whole line β€” she said what she said 😭)


πŸ¦‹ SEE ALSO πŸ¦‹

  • 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

and that's the whole page bestie!! πŸ’– this lil masterpiece is version $VERSION, dated $DATE, and it's living under GOLF(2gg) forever and ever πŸŽ€ slay, go install your Golf, and don't forget to hydrate βœ¨πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from