From 6447dde136f454b69a616427a1100230903412fe Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Fri, 15 Mar 2019 17:41:28 +0000 Subject: [PATCH] Add macOS installer pages --- installation-linux-other.md | 1 + installation-macos-other.md | 80 +++++++++++++++++++++++++++++++++++++ installation-macos-pkg.md | 35 ++++++++++++++++ installation.md | 7 ++++ 4 files changed, 123 insertions(+) create mode 100644 installation-macos-other.md create mode 100644 installation-macos-pkg.md diff --git a/installation-linux-other.md b/installation-linux-other.md index 9931a5b..d44db14 100644 --- a/installation-linux-other.md +++ b/installation-linux-other.md @@ -36,6 +36,7 @@ sudo cp {yggdrasil,yggdrasilctl} /usr/local/bin ``` ##### Debug builds + You can create a debug build by running `./build -d` instead of `./build`. Debug builds contain profiling code as well as additional debugging symbols. They are likely to be larger files as a result. diff --git a/installation-macos-other.md b/installation-macos-other.md new file mode 100644 index 0000000..ab98f4a --- /dev/null +++ b/installation-macos-other.md @@ -0,0 +1,80 @@ +--- +tags: dontlink +sitemap: true +--- + +# Installing manually on macOS + +Yggdrasil is supported on macOS. You can either [download the latest binary from +CircleCI](builds.md) or you can build from source. + +### Build from source + +macOS has most of the tools needed to build Yggdrasil from source - you just +need to install the Go toolchain. Yggdrasil requires Go 1.11 as a minimum. + +- Install [the latest version of Go](https://golang.org/dl/) for your platform + +Clone the repository and build: +``` +cd /path/to +git clone https://github.com/yggdrasil-network/yggdrasil-go +``` + +Build Yggdrasil: +``` +cd /path/to/yggdrasil-go +./build +``` + +The build will produce `yggdrasil` and `yggdrasilctl` binaries. System Integrity +Protection in macOS prevents you from copying files into `/usr/bin`, therefore +you should install into `/usr/local/bin`: +``` +sudo cp {yggdrasil,yggdrasilctl} /usr/local/bin +``` + +##### Debug builds + +You can create a debug build by running `./build -d` instead of +`./build`. Debug builds contain profiling code as well as additional debugging +symbols. They are likely to be larger files as a result. + +### Install launchd service + +launchd service scripts are included in the `contrib/macos/` folder so that it +runs automatically in the background (using `/etc/yggdrasil.conf` for +configuration). + +Copy the service files: +``` +sudo cp contrib/macos/yggdrasil.plist /Library/LaunchDaemons/ +``` + +Enable and start Yggdrasil: +``` +sudo launchctl load /Library/LaunchDaemons/yggdrasil.plist +sudo launchctl start /Library/LaunchDaemons/yggdrasil.plist +``` + +Once installed as a launchd service, you can read the `yggdrasil` output in the +following files: +``` +tail -f /tmp/yggdrasil.stdout.log +tail -f /tmp/yggdrasil.stderr.log +``` + +### Generate configuration + +Generate an initial Yggdrasil configuration file: +``` +sudo yggdrasil -genconf > /etc/yggdrasil.conf +``` + +You can make changes to this file as described in the +[Configuration](configuration.md) page. + +### After installation + +Read the [macOS platform page](platform-macos.md) page for further +information about macOS platform support. diff --git a/installation-macos-pkg.md b/installation-macos-pkg.md new file mode 100644 index 0000000..1cf9e21 --- /dev/null +++ b/installation-macos-pkg.md @@ -0,0 +1,35 @@ +--- +tags: dontlink +sitemap: true +--- + +# Installing using the macOS installer + +Yggdrasil is supported on macOS. Visit our [Builds](builds.md) page and download +the relevant `.pkg` file + +### Install using Finder + +Locate the downloaded `.pkg` installer in Finder. Right-click it and click Open. + +Step through the installer as usual. + +Once completed, the Yggdrasil configuration will have automatically been +generated, the `launchd` service will have been installed and the service will +be running. + +### Install using Terminal + +Open Terminal.app and install the package: +``` +sudo installer -pkg /path/to/yggdrasil-xxx-macos.pkg -target / +``` + +Once completed, the Yggdrasil configuration will have automatically been +generated, the `launchd` service will have been installed and the service will +be running. + +### After installation + +Read the [macOS platform page](platform-macos.md) page for further +information about macOS platform support. diff --git a/installation.md b/installation.md index 5503900..2ea0db3 100644 --- a/installation.md +++ b/installation.md @@ -4,9 +4,16 @@ sitemap: true # Installation +Installation guides are available for the following platforms/distributions. + ## Linux - [Debian, Ubuntu, elementaryOS](installation-linux-deb.md) - [Red Hat Enterprise Linux, Fedora, CentOS](installation-linux-rpm.md) - [Ubiquiti EdgeOS](installation-linux-edgeos.md) - [Other distributions or build from source](installation-linux-other.md) + +## macOS + +- [macOS installer](installation-macos-pkg.md) +- [Build from source](installation-linux-other.md)