From 3831d310091fe975893972185baa592789194952 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Fri, 1 Sep 2023 19:32:59 +0200 Subject: docs: Put a max version on erlang and elixir Closes: https://git.pleroma.social/pleroma/pleroma/-/issues/3194 --- docs/installation/generic_dependencies.include | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/installation') diff --git a/docs/installation/generic_dependencies.include b/docs/installation/generic_dependencies.include index dcaacfdfd..dbe6fe49d 100644 --- a/docs/installation/generic_dependencies.include +++ b/docs/installation/generic_dependencies.include @@ -1,8 +1,8 @@ ## Required dependencies -* PostgreSQL 9.6+ -* Elixir 1.10+ -* Erlang OTP 22.2+ +* PostgreSQL >=9.6 +* Elixir >=1.11.0 <1.15 +* Erlang OTP >=22.2.0 <26 * git * file / libmagic * gcc (clang might also work) -- cgit v1.2.3 From 19519d6c969196f2b1d9283168060a751068472d Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Fri, 1 Sep 2023 19:33:27 +0200 Subject: docs: clang is also supported --- docs/installation/generic_dependencies.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/installation') diff --git a/docs/installation/generic_dependencies.include b/docs/installation/generic_dependencies.include index dbe6fe49d..3365a36a8 100644 --- a/docs/installation/generic_dependencies.include +++ b/docs/installation/generic_dependencies.include @@ -5,7 +5,7 @@ * Erlang OTP >=22.2.0 <26 * git * file / libmagic -* gcc (clang might also work) +* gcc or clang * GNU make * CMake -- cgit v1.2.3 From be39146ecc6d55191f8ed3ec9cd3e113d8ee5e21 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Fri, 17 Nov 2023 11:44:33 -0500 Subject: Update docs to include dependencies on rust and vips where appropriate --- docs/installation/alpine_linux_en.md | 2 +- docs/installation/arch_linux_en.md | 1 + docs/installation/debian_based_en.md | 2 +- docs/installation/debian_based_jp.md | 1 + docs/installation/freebsd_en.md | 3 ++- 5 files changed, 6 insertions(+), 3 deletions(-) (limited to 'docs/installation') diff --git a/docs/installation/alpine_linux_en.md b/docs/installation/alpine_linux_en.md index 7154bca48..9794833a3 100644 --- a/docs/installation/alpine_linux_en.md +++ b/docs/installation/alpine_linux_en.md @@ -28,7 +28,7 @@ sudo apk upgrade * Install some tools, which are needed later: ```shell -sudo apk add git build-base cmake file-dev +sudo apk add git build-base cmake file-dev rust ``` ### Install Elixir and Erlang diff --git a/docs/installation/arch_linux_en.md b/docs/installation/arch_linux_en.md index f7d722ef9..dbfbf6bf8 100644 --- a/docs/installation/arch_linux_en.md +++ b/docs/installation/arch_linux_en.md @@ -14,6 +14,7 @@ This guide will assume that you have administrative rights, either as root or a * `base-devel` * `cmake` * `file` +* `rust` #### Optional packages used in this guide diff --git a/docs/installation/debian_based_en.md b/docs/installation/debian_based_en.md index b61e4addd..44c93e1ef 100644 --- a/docs/installation/debian_based_en.md +++ b/docs/installation/debian_based_en.md @@ -20,7 +20,7 @@ sudo apt full-upgrade * Install some of the above mentioned programs: ```shell -sudo apt install git build-essential postgresql postgresql-contrib cmake libmagic-dev +sudo apt install git build-essential postgresql postgresql-contrib cmake libmagic-dev rust ``` ### Install Elixir and Erlang diff --git a/docs/installation/debian_based_jp.md b/docs/installation/debian_based_jp.md index 1424ad7f4..43902c987 100644 --- a/docs/installation/debian_based_jp.md +++ b/docs/installation/debian_based_jp.md @@ -21,6 +21,7 @@ Note: This article is potentially outdated because at this time we may not have - `build-essential` - `cmake` - `libmagic-dev` +- `rust` #### このガイドで利用している追加パッケージ diff --git a/docs/installation/freebsd_en.md b/docs/installation/freebsd_en.md index 50ed30d74..b88853dd1 100644 --- a/docs/installation/freebsd_en.md +++ b/docs/installation/freebsd_en.md @@ -9,7 +9,7 @@ This document was written for FreeBSD 12.1, but should be work on future release This assumes the target system has `pkg(8)`. ``` -# pkg install elixir postgresql12-server postgresql12-client postgresql12-contrib git-lite sudo nginx gmake acme.sh cmake +# pkg install elixir postgresql12-server postgresql12-client postgresql12-contrib git-lite sudo nginx gmake acme.sh cmake rust vips ``` Copy the rc.d scripts to the right directory: @@ -41,6 +41,7 @@ Create a user for Pleroma: ``` # pw add user pleroma -m # echo 'export LC_ALL="en_US.UTF-8"' >> /home/pleroma/.profile +# echo 'export VIX_COMPILATION_MODE=PLATFORM_PROVIDED_LIBVIPS' >> /home/pleroma/.profile # su -l pleroma ``` -- cgit v1.2.3 From 10525ac7f8ed4e3882a21d6cb3f1a7acfabc0674 Mon Sep 17 00:00:00 2001 From: Lain Soykaf Date: Tue, 28 Nov 2023 15:21:34 +0400 Subject: Docs: Remove rust references --- docs/installation/alpine_linux_en.md | 2 +- docs/installation/arch_linux_en.md | 1 - docs/installation/debian_based_en.md | 2 +- docs/installation/debian_based_jp.md | 1 - docs/installation/freebsd_en.md | 2 +- 5 files changed, 3 insertions(+), 5 deletions(-) (limited to 'docs/installation') diff --git a/docs/installation/alpine_linux_en.md b/docs/installation/alpine_linux_en.md index 9794833a3..7154bca48 100644 --- a/docs/installation/alpine_linux_en.md +++ b/docs/installation/alpine_linux_en.md @@ -28,7 +28,7 @@ sudo apk upgrade * Install some tools, which are needed later: ```shell -sudo apk add git build-base cmake file-dev rust +sudo apk add git build-base cmake file-dev ``` ### Install Elixir and Erlang diff --git a/docs/installation/arch_linux_en.md b/docs/installation/arch_linux_en.md index dbfbf6bf8..f7d722ef9 100644 --- a/docs/installation/arch_linux_en.md +++ b/docs/installation/arch_linux_en.md @@ -14,7 +14,6 @@ This guide will assume that you have administrative rights, either as root or a * `base-devel` * `cmake` * `file` -* `rust` #### Optional packages used in this guide diff --git a/docs/installation/debian_based_en.md b/docs/installation/debian_based_en.md index 44c93e1ef..b61e4addd 100644 --- a/docs/installation/debian_based_en.md +++ b/docs/installation/debian_based_en.md @@ -20,7 +20,7 @@ sudo apt full-upgrade * Install some of the above mentioned programs: ```shell -sudo apt install git build-essential postgresql postgresql-contrib cmake libmagic-dev rust +sudo apt install git build-essential postgresql postgresql-contrib cmake libmagic-dev ``` ### Install Elixir and Erlang diff --git a/docs/installation/debian_based_jp.md b/docs/installation/debian_based_jp.md index 43902c987..1424ad7f4 100644 --- a/docs/installation/debian_based_jp.md +++ b/docs/installation/debian_based_jp.md @@ -21,7 +21,6 @@ Note: This article is potentially outdated because at this time we may not have - `build-essential` - `cmake` - `libmagic-dev` -- `rust` #### このガイドで利用している追加パッケージ diff --git a/docs/installation/freebsd_en.md b/docs/installation/freebsd_en.md index b88853dd1..02513daf2 100644 --- a/docs/installation/freebsd_en.md +++ b/docs/installation/freebsd_en.md @@ -9,7 +9,7 @@ This document was written for FreeBSD 12.1, but should be work on future release This assumes the target system has `pkg(8)`. ``` -# pkg install elixir postgresql12-server postgresql12-client postgresql12-contrib git-lite sudo nginx gmake acme.sh cmake rust vips +# pkg install elixir postgresql12-server postgresql12-client postgresql12-contrib git-lite sudo nginx gmake acme.sh cmake vips ``` Copy the rc.d scripts to the right directory: -- cgit v1.2.3 From 017e35fbf128d47c033275a70b76b72f24d7c754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Thu, 28 Dec 2023 00:15:32 +0100 Subject: Fix some more typos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- docs/installation/gentoo_en.md | 4 ++-- docs/installation/gentoo_otp_en.md | 2 +- docs/installation/openbsd_en.md | 4 ++-- docs/installation/otp_en.md | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'docs/installation') diff --git a/docs/installation/gentoo_en.md b/docs/installation/gentoo_en.md index 87128d6f6..dc47d27f8 100644 --- a/docs/installation/gentoo_en.md +++ b/docs/installation/gentoo_en.md @@ -59,7 +59,7 @@ Gentoo quite pointedly does not come with a cron daemon installed, and as such i If you would not like to install the optional packages, remove them from this line. -If you're running this from a low-powered virtual machine, it should work though it will take some time. There were no issues on a VPS with a single core and 1GB of RAM; if you are using an even more limited device and run into issues, you can try creating a swapfile or use a more powerful machine running Gentoo to [cross build](https://wiki.gentoo.org/wiki/Cross_build_environment). If you have a wait ahead of you, now would be a good time to take a break, strech a bit, refresh your beverage of choice and/or get a snack, and reply to Arch users' posts with "I use Gentoo btw" as we do. +If you're running this from a low-powered virtual machine, it should work though it will take some time. There were no issues on a VPS with a single core and 1GB of RAM; if you are using an even more limited device and run into issues, you can try creating a swapfile or use a more powerful machine running Gentoo to [cross build](https://wiki.gentoo.org/wiki/Cross_build_environment). If you have a wait ahead of you, now would be a good time to take a break, stretch a bit, refresh your beverage of choice and/or get a snack, and reply to Arch users' posts with "I use Gentoo btw" as we do. ### Install PostgreSQL @@ -104,7 +104,7 @@ Not only does this make it much easier to deploy changes you make, as you can co * Add a new system user for the Pleroma service and set up default directories: -Remove `,wheel` if you do not want this user to be able to use `sudo`, however note that being able to `sudo` as the `pleroma` user will make finishing the insallation and common maintenence tasks somewhat easier: +Remove `,wheel` if you do not want this user to be able to use `sudo`, however note that being able to `sudo` as the `pleroma` user will make finishing the installation and common maintenance tasks somewhat easier: ```shell # useradd -m -G users,wheel -s /bin/bash pleroma diff --git a/docs/installation/gentoo_otp_en.md b/docs/installation/gentoo_otp_en.md index 4fafc0c17..20d8835da 100644 --- a/docs/installation/gentoo_otp_en.md +++ b/docs/installation/gentoo_otp_en.md @@ -49,7 +49,7 @@ Gentoo quite pointedly does not come with a cron daemon installed, and as such i If you would not like to install the optional packages, remove them from this line. -If you're running this from a low-powered virtual machine, it should work though it will take some time. There were no issues on a VPS with a single core and 1GB of RAM; if you are using an even more limited device and run into issues, you can try creating a swapfile or use a more powerful machine running Gentoo to [cross build](https://wiki.gentoo.org/wiki/Cross_build_environment). If you have a wait ahead of you, now would be a good time to take a break, strech a bit, refresh your beverage of choice and/or get a snack, and reply to Arch users' posts with "I use Gentoo btw" as we do. +If you're running this from a low-powered virtual machine, it should work though it will take some time. There were no issues on a VPS with a single core and 1GB of RAM; if you are using an even more limited device and run into issues, you can try creating a swapfile or use a more powerful machine running Gentoo to [cross build](https://wiki.gentoo.org/wiki/Cross_build_environment). If you have a wait ahead of you, now would be a good time to take a break, stretch a bit, refresh your beverage of choice and/or get a snack, and reply to Arch users' posts with "I use Gentoo btw" as we do. ### Setup PostgreSQL diff --git a/docs/installation/openbsd_en.md b/docs/installation/openbsd_en.md index 9e7e040f5..e58e144d2 100644 --- a/docs/installation/openbsd_en.md +++ b/docs/installation/openbsd_en.md @@ -62,7 +62,7 @@ rcctl start postgresql To check that it started properly and didn't fail right after starting, you can run `ps aux | grep postgres`, there should be multiple lines of output. #### httpd -httpd will have three fuctions: +httpd will have three functions: * redirect requests trying to reach the instance over http to the https URL * serve a robots.txt file @@ -225,7 +225,7 @@ pass in quick on $if inet6 proto icmp6 to ($if) icmp6-type { echoreq unreach par pass in quick on $if proto tcp to ($if) port { http https } # relayd/httpd pass in quick on $if proto tcp from $authorized_ssh_clients to ($if) port ssh ``` -Replace ** by your server's network interface name (which you can get with ifconfig). Consider replacing the content of the authorized\_ssh\_clients macro by, for exemple, your home IP address, to avoid SSH connection attempts from bots. +Replace ** by your server's network interface name (which you can get with ifconfig). Consider replacing the content of the authorized\_ssh\_clients macro by, for example, your home IP address, to avoid SSH connection attempts from bots. Check pf's configuration by running `pfctl -nf /etc/pf.conf`, load it with `pfctl -f /etc/pf.conf` and enable pf at boot with `rcctl enable pf`. diff --git a/docs/installation/otp_en.md b/docs/installation/otp_en.md index a69b2fe7a..86efa27f8 100644 --- a/docs/installation/otp_en.md +++ b/docs/installation/otp_en.md @@ -238,7 +238,7 @@ At this point if you open your (sub)domain in a browser you should see a 502 err systemctl enable pleroma ``` -If everything worked, you should see Pleroma-FE when visiting your domain. If that didn't happen, try reviewing the installation steps, starting Pleroma in the foreground and seeing if there are any errrors. +If everything worked, you should see Pleroma-FE when visiting your domain. If that didn't happen, try reviewing the installation steps, starting Pleroma in the foreground and seeing if there are any errors. Questions about the installation or didn’t it work as it should be, ask in [#pleroma:libera.chat](https://matrix.to/#/#pleroma:libera.chat) via Matrix or **#pleroma** on **libera.chat** via IRC, you can also [file an issue on our Gitlab](https://git.pleroma.social/pleroma/pleroma-support/issues/new). -- cgit v1.2.3 From ddb9e90c405369496fdf9e6dfed593eff8d5dc5c Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Thu, 28 Dec 2023 15:59:25 -0500 Subject: Update minimum elixir version found in various docs --- docs/installation/debian_based_jp.md | 2 +- docs/installation/generic_dependencies.include | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/installation') diff --git a/docs/installation/debian_based_jp.md b/docs/installation/debian_based_jp.md index 1424ad7f4..502eefaf8 100644 --- a/docs/installation/debian_based_jp.md +++ b/docs/installation/debian_based_jp.md @@ -14,7 +14,7 @@ Note: This article is potentially outdated because at this time we may not have - PostgreSQL 9.6以上 (Ubuntu16.04では9.5しか提供されていないので,[](https://www.postgresql.org/download/linux/ubuntu/)こちらから新しいバージョンを入手してください) - `postgresql-contrib` 9.6以上 (同上) -- Elixir 1.8 以上 ([Debianのリポジトリからインストールしないこと!!! ここからインストールすること!](https://elixir-lang.org/install.html#unix-and-unix-like)。または [asdf](https://github.com/asdf-vm/asdf) をpleromaユーザーでインストールしてください) +- Elixir 1.13 以上 ([Debianのリポジトリからインストールしないこと!!! ここからインストールすること!](https://elixir-lang.org/install.html#unix-and-unix-like)。または [asdf](https://github.com/asdf-vm/asdf) をpleromaユーザーでインストールしてください) - `erlang-dev` - `erlang-nox` - `git` diff --git a/docs/installation/generic_dependencies.include b/docs/installation/generic_dependencies.include index 3365a36a8..e0cfd3264 100644 --- a/docs/installation/generic_dependencies.include +++ b/docs/installation/generic_dependencies.include @@ -1,7 +1,7 @@ ## Required dependencies * PostgreSQL >=9.6 -* Elixir >=1.11.0 <1.15 +* Elixir >=1.13.0 <1.15 * Erlang OTP >=22.2.0 <26 * git * file / libmagic -- cgit v1.2.3 From 63a74f7b6dcfd8b5498a98d1fd0a08b7f0cfdd26 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Fri, 29 Dec 2023 23:22:31 -0500 Subject: Support for Erlang OTP 26 --- docs/installation/generic_dependencies.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/installation') diff --git a/docs/installation/generic_dependencies.include b/docs/installation/generic_dependencies.include index 3365a36a8..56274a3f0 100644 --- a/docs/installation/generic_dependencies.include +++ b/docs/installation/generic_dependencies.include @@ -2,7 +2,7 @@ * PostgreSQL >=9.6 * Elixir >=1.11.0 <1.15 -* Erlang OTP >=22.2.0 <26 +* Erlang OTP >=22.2.0 * git * file / libmagic * gcc or clang -- cgit v1.2.3 From 355487041a610a2834eebca520660b74a667df06 Mon Sep 17 00:00:00 2001 From: Haelwenn Date: Tue, 16 Jan 2024 16:21:23 +0000 Subject: We are unsure if OTP27 will bring more breaking changes --- docs/installation/generic_dependencies.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/installation') diff --git a/docs/installation/generic_dependencies.include b/docs/installation/generic_dependencies.include index 56274a3f0..aebf21e7c 100644 --- a/docs/installation/generic_dependencies.include +++ b/docs/installation/generic_dependencies.include @@ -2,7 +2,7 @@ * PostgreSQL >=9.6 * Elixir >=1.11.0 <1.15 -* Erlang OTP >=22.2.0 +* Erlang OTP >=22.2.0 (supported: <27) * git * file / libmagic * gcc or clang -- cgit v1.2.3 From 7f97fbc1ae8d38c88d32739e968b4f2572c755a8 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Mon, 18 Mar 2024 15:36:26 -0400 Subject: Update minimum Postgres version to 11.0; disable JIT This release is where JIT was introduced and it should be disabled. Pleroma's queries do not benefit from JIT, but it can increase latency of queries. --- docs/installation/debian_based_jp.md | 4 ++-- docs/installation/generic_dependencies.include | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/installation') diff --git a/docs/installation/debian_based_jp.md b/docs/installation/debian_based_jp.md index 1424ad7f4..b6b5c9c07 100644 --- a/docs/installation/debian_based_jp.md +++ b/docs/installation/debian_based_jp.md @@ -12,8 +12,8 @@ Note: This article is potentially outdated because at this time we may not have ### 必要なソフトウェア -- PostgreSQL 9.6以上 (Ubuntu16.04では9.5しか提供されていないので,[](https://www.postgresql.org/download/linux/ubuntu/)こちらから新しいバージョンを入手してください) -- `postgresql-contrib` 9.6以上 (同上) +- PostgreSQL 11.0以上 (Ubuntu16.04では9.5しか提供されていないので,[](https://www.postgresql.org/download/linux/ubuntu/)こちらから新しいバージョンを入手してください) +- `postgresql-contrib` 11.0以上 (同上) - Elixir 1.8 以上 ([Debianのリポジトリからインストールしないこと!!! ここからインストールすること!](https://elixir-lang.org/install.html#unix-and-unix-like)。または [asdf](https://github.com/asdf-vm/asdf) をpleromaユーザーでインストールしてください) - `erlang-dev` - `erlang-nox` diff --git a/docs/installation/generic_dependencies.include b/docs/installation/generic_dependencies.include index aebf21e7c..6572716ed 100644 --- a/docs/installation/generic_dependencies.include +++ b/docs/installation/generic_dependencies.include @@ -1,6 +1,6 @@ ## Required dependencies -* PostgreSQL >=9.6 +* PostgreSQL >=11.0 * Elixir >=1.11.0 <1.15 * Erlang OTP >=22.2.0 (supported: <27) * git -- cgit v1.2.3 From af53efa9e3a7192239e68bf570fe9e835df2f0d9 Mon Sep 17 00:00:00 2001 From: pleromian Date: Thu, 20 Jun 2024 01:40:02 +0200 Subject: docs: update docs for NetBSD --- docs/installation/netbsd_en.md | 153 +++++++++++++++++++++++++++++++---------- 1 file changed, 116 insertions(+), 37 deletions(-) (limited to 'docs/installation') diff --git a/docs/installation/netbsd_en.md b/docs/installation/netbsd_en.md index 2ade7df98..35337fd71 100644 --- a/docs/installation/netbsd_en.md +++ b/docs/installation/netbsd_en.md @@ -2,14 +2,41 @@ {! backend/installation/generic_dependencies.include !} -## Installing software used in this guide +# Installation options + +Currently there are two options available for NetBSD: manual installation (from source) or using experimental package from [pkgsrc-wip](https://github.com/NetBSD/pkgsrc-wip/tree/master/pleroma). + +WIP package can be installed via pkgsrc and can be crosscompiled for easier binary distribution. Source installation most probably will be restricted to a single machine. + +## pkgsrc installation + +WIP package creates Mix.Release (similar to how Docker images are built) but doesn't bundle Erlang runtime, listing it as a dependency instead. This allows for easier and more modular installations, especially on weaker machines. Currently this method also does not support all features of `pleroma_ctl` command (like changing installation type or managing frontends) as NetBSD is not yet a supported binary flavour of Pleroma's CI. + +In any case, you can install it the same way as any other `pkgsrc-wip` package: + +``` +cd /usr/pkgsrc +git clone --depth 1 git://wip.pkgsrc.org/pkgsrc-wip.git wip +cp -rf wip/pleroma www +cp -rf wip/libvips graphics +cd /usr/pkgsrc/www/pleroma +bmake && bmake install +``` + +Use `bmake package` to create a binary package. This can come especially handy if you're targeting embedded or low-power systems and are crosscompiling on a more powerful machine. + +> Note: Elixir has [endianness bug](https://github.com/elixir-lang/elixir/issues/2785) which requires it to be compiled on a machine with the same endianness. In other words, package crosscompiled on amd64 (little endian) won't work on powerpc or sparc machines (big endian). While _in theory™_ nothing catastrophic should happen, one can see that for example regexes won't work properly. Some distributions just strip this warning away, so it doesn't bother the users... anyway, you've been warned. + +## Source installation pkgin should have been installed by the NetBSD installer if you selected -the right options. If it isn't installed, install it using pkg_add. +the right options. If it isn't installed, install it using `pkg_add`. Note that `postgresql11-contrib` is needed for the Postgres extensions Pleroma uses. +> Note: you can use modern versions of PostgreSQL. In this case, just use `postgresql16-contrib` and so on. + The `mksh` shell is needed to run the Elixir `mix` script. `# pkgin install acmesh elixir git-base git-docs mksh nginx postgresql11-server postgresql11-client postgresql11-contrib sudo ffmpeg4 ImageMagick` @@ -29,80 +56,114 @@ shells/mksh www/nginx ``` -Copy the rc.d scripts to the right directory: +Create a user for Pleroma: ``` -# cp /usr/pkg/share/examples/rc.d/nginx /usr/pkg/share/examples/rc.d/pgsql /etc/rc.d +# groupadd pleroma +# useradd -d /home/pleroma -m -g pleroma -s /usr/pkg/bin/mksh pleroma +# echo 'export LC_ALL="en_GB.UTF-8"' >> /home/pleroma/.profile +# su -l pleroma -c $SHELL ``` -Add nginx and Postgres to `/etc/rc.conf`: +Clone the repository: ``` -nginx=YES -pgsql=YES +$ cd /home/pleroma +$ git clone -b stable https://git.pleroma.social/pleroma/pleroma.git ``` -## Configuring postgres +Get deps and compile: -First, run `# /etc/rc.d/pgsql start`. Then, `$ sudo -Hu pgsql -g pgsql createdb`. +``` +$ cd /home/pleroma/pleroma +$ export MIX_ENV=prod +$ mix deps.get +$ mix compile +``` -### Install media / graphics packages (optional, see [`docs/installation/optional/media_graphics_packages.md`](../installation/optional/media_graphics_packages.md)) +## Install media / graphics packages (optional, see [`docs/installation/optional/media_graphics_packages.md`](../installation/optional/media_graphics_packages.md)) `# pkgin install ImageMagick ffmpeg4 p5-Image-ExifTool` -## Configuring Pleroma +or via pkgsrc: -Create a user for Pleroma: +``` +graphics/p5-Image-ExifTool +graphics/ImageMagick +multimedia/ffmpeg4 +``` + +# Configuration + +## Understanding $PREFIX + +From now on, you may encounter `$PREFIX` variable in the paths. This variable indicates your current local pkgsrc prefix. Usually it's `/usr/pkg` unless you configured it otherwise. Translating to pkgsrc's lingo, it's called `LOCALBASE`, which essentially means the same this. You may want to set it up for your local shell session (this uses `mksh` which should already be installed as one of the required dependencies): ``` -# groupadd pleroma -# useradd -d /home/pleroma -m -g pleroma -s /usr/pkg/bin/mksh pleroma -# echo 'export LC_ALL="en_GB.UTF-8"' >> /home/pleroma/.profile -# su -l pleroma -c $SHELL +$ export PREFIX=$(pkg_info -Q LOCALBASE mksh) +$ echo $PREFIX +/usr/pkg ``` -Clone the repository: +## Setting up your instance + +Now, you need to configure your instance. During this initial configuration, you will be asked some questions about your server. You will need a domain name at this point; it doesn't have to be deployed, but changing it later will be very cumbersome. + +If you've installed via pkgsrc, `pleroma_ctl` should already be in your `PATH`; if you've installed from source, it's located at `/home/pleroma/pleroma/release/bin/pleroma_ctl`. ``` -$ cd /home/pleroma -$ git clone -b stable https://git.pleroma.social/pleroma/pleroma.git +$ su -l pleroma +$ pleroma_ctl instance gen --output $PREFIX/etc/pleroma/config.exs --output-psql /tmp/setup_db.psql ``` -Configure Pleroma. Note that you need a domain name at this point: +During installation, you will be asked about static and upload directories. Don't forget to create them and update permissions: ``` -$ cd /home/pleroma/pleroma -$ mix deps.get -$ MIX_ENV=prod mix pleroma.instance gen # You will be asked a few questions here. +mkdir -p /var/lib/pleroma/uploads +chown -R pleroma:pleroma /var/lib/pleroma ``` -Since Postgres is configured, we can now initialize the database. There should -now be a file in `config/setup_db.psql` that makes this easier. Edit it, and -*change the password* to a password of your choice. Make sure it is secure, since +## Setting up the database + +First, run `# /etc/rc.d/pgsql start`. Then, `$ sudo -Hu pgsql -g pgsql createdb`. + +We can now initialize the database. You'll need to edit generated SQL file from the previous step. It's located at `/tmp/setup_db.psql`. + +Edit this file, and *change the password* to a password of your choice. Make sure it is secure, since it'll be protecting your database. Now initialize the database: ``` -$ sudo -Hu pgsql -g pgsql psql -f config/setup_db.psql +$ sudo -Hu pgsql -g pgsql psql -f /tmp/setup_db.psql ``` Postgres allows connections from all users without a password by default. To -fix this, edit `/usr/pkg/pgsql/data/pg_hba.conf`. Change every `trust` to +fix this, edit `$PREFIX/pgsql/data/pg_hba.conf`. Change every `trust` to `password`. Once this is done, restart Postgres with `# /etc/rc.d/pgsql restart`. Run the database migrations. + +### pkgsrc installation + +``` +pleroma_ctl migrate +``` + +### Source installation + You will need to do this whenever you update with `git pull`: ``` +$ cd /home/pleroma/pleroma $ MIX_ENV=prod mix ecto.migrate ``` ## Configuring nginx Install the example configuration file -`/home/pleroma/pleroma/installation/pleroma.nginx` to -`/usr/pkg/etc/nginx.conf`. +(`` or `/home/pleroma/pleroma/installation/pleroma.nginx`) to +`$PREFIX/etc/nginx.conf`. Note that it will need to be wrapped in a `http {}` block. You should add settings for the nginx daemon outside of the http block, for example: @@ -176,27 +237,45 @@ Let's add auto-renewal to `/etc/daily.local` --stateless ``` -## Creating a startup script for Pleroma +## Autostart + +For properly functioning instance, you will need pleroma (backend service), nginx (reverse proxy) and postgresql (database) services running. There's no requirement for them to reside on the same machine, but you have to provide autostart for each of them. + +### nginx +``` +# cp $PREFIX/share/examples/rc.d/nginx /etc/rc.d +# echo "nginx=YES" >> /etc/rc.conf +``` + +### postgresql + +``` +# cp $PREFIX/share/examples/rc.d/pgsql /etc/rc.d +# echo "pgsql=YES" >> /etc/rc.conf +``` + +### pleroma -Copy the startup script to the correct location and make sure it's executable: +First, copy the script (pkgsrc variant) +``` +# cp $PREFIX/share/examples/rc.d/pleroma /etc/rc.d +``` +or source variant ``` # cp /home/pleroma/pleroma/installation/netbsd/rc.d/pleroma /etc/rc.d/pleroma # chmod +x /etc/rc.d/pleroma ``` -Add the following to `/etc/rc.conf`: +Then, add the following to `/etc/rc.conf`: ``` pleroma=YES -pleroma_home="/home/pleroma" -pleroma_user="pleroma" ``` -Run `# /etc/rc.d/pleroma start` to start Pleroma. - ## Conclusion +Run `# /etc/rc.d/pleroma start` to start Pleroma. Restart nginx with `# /etc/rc.d/nginx restart` and you should be up and running. Make sure your time is in sync, or other instances will receive your posts with -- cgit v1.2.3 From b33b1b7253592db3e4c7f5c06c117d4cbf125bd6 Mon Sep 17 00:00:00 2001 From: pleromian Date: Thu, 20 Jun 2024 23:52:25 +0200 Subject: docs: update nginx and rcscript path for NetBSD --- docs/installation/generic_dependencies.include | 2 +- docs/installation/netbsd_en.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/installation') diff --git a/docs/installation/generic_dependencies.include b/docs/installation/generic_dependencies.include index 666f49fbb..bdb7f94d3 100644 --- a/docs/installation/generic_dependencies.include +++ b/docs/installation/generic_dependencies.include @@ -1,7 +1,7 @@ ## Required dependencies * PostgreSQL >=11.0 -* Elixir >=1.13.0 <1.15 +* Elixir >=1.13.0 <1.17 * Erlang OTP >=22.2.0 (supported: <27) * git * file / libmagic diff --git a/docs/installation/netbsd_en.md b/docs/installation/netbsd_en.md index 35337fd71..7c003700c 100644 --- a/docs/installation/netbsd_en.md +++ b/docs/installation/netbsd_en.md @@ -162,7 +162,7 @@ $ MIX_ENV=prod mix ecto.migrate ## Configuring nginx Install the example configuration file -(`` or `/home/pleroma/pleroma/installation/pleroma.nginx`) to +(`$PREFIX/share/examples/pleroma/pleroma.nginx` or `/home/pleroma/pleroma/installation/pleroma.nginx`) to `$PREFIX/etc/nginx.conf`. Note that it will need to be wrapped in a `http {}` block. You should add @@ -258,7 +258,7 @@ For properly functioning instance, you will need pleroma (backend service), ngin First, copy the script (pkgsrc variant) ``` -# cp $PREFIX/share/examples/rc.d/pleroma /etc/rc.d +# cp $PREFIX/share/examples/pleroma/pleroma.rc /etc/rc.d/pleroma ``` or source variant -- cgit v1.2.3