From b1ac9a39f9c5449cbbc12e582bf167b4a222fd84 Mon Sep 17 00:00:00 2001 From: Dante4 <2075100@mail.ru> Date: Tue, 16 Jul 2024 09:40:39 +0300 Subject: [PATCH] Updated as of 16.07.2024 --- Installation-without-Docker.md | 40 ++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/Installation-without-Docker.md b/Installation-without-Docker.md index 9b5533c..2fdd666 100644 --- a/Installation-without-Docker.md +++ b/Installation-without-Docker.md @@ -1,7 +1,7 @@ **It is highly recommended that you deploy using [Docker](INSTALL.md) as it is easier install and maintain.** -This guide may help the few users who do not wish to use Docker. Please note that this guide may be incomplete or out of date. Additionally, this guide assumes Arch Linux. Although exact instructions for other -distributions are different, the steps stay roughly the same. +This guide may help the few users who do not wish to use Docker. Please note that this guide may be incomplete or out of date. Additionally, this guide assumes Arch Linux (or Ubuntu 24.04). Although exact instructions for other distributions are different, the steps stay roughly the same. +If you meet problem check Dockerfile for server and client. ### Installing hard dependencies @@ -11,6 +11,8 @@ Szurubooru requires the following dependencies: - FFmpeg - node.js +Pacman + ```console user@host:~$ sudo pacman -S postgresql user@host:~$ sudo pacman -S python @@ -18,6 +20,37 @@ user@host:~$ sudo pacman -S python-pip user@host:~$ sudo pacman -S ffmpeg user@host:~$ sudo pacman -S npm user@host:~$ sudo pip install virtualenv +``` + +Apt (Working with Ubuntu 24.04 Noble, untested on others versions) - assumes that you are **using VM only for szurubooru**, so there is no problem with any system-wide install. + +```console +# Import the repository signing key: +sudo apt install curl ca-certificates +sudo install -d /usr/share/postgresql-common/pgdg +sudo curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc + +# Create the repository configuration file: +sudo sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' + +# Update the package lists: +user@host:~$ sudo apt update + +# Install the latest version of PostgreSQL: +# If you want a specific version, use 'postgresql-16' or similar instead of 'postgresql' +sudo apt -y install postgresql +sudo apt -y install python3 +sudo apt -y install python3-pip +sudo apt -y install ffmpeg +sudo apt -y install python3-virtualenv python3-yaml python3-psycopg2 python3-sqlalchemy python3-certifi python3-numpy python3-pillow python3-tz python3-rfc3339 python3-nacl python3-alembic python3-pytest python3-pytest-cov +sudo apt -y install libheif-dev +sudo apt -y install libavif-dev +mv /usr/lib/python3.12/EXTERNALLY-MANAGED /usr/lib/python3.12/EXTERNALLY-MANAGED.old +pip3 install pyheif +pip3 install heif-image-plugin +pip3 install yt-dlp +pip3 install pillow-avif-plugin +pip3 install freezegun ``` @@ -63,6 +96,8 @@ Installing frontend dependencies: user@host:szuru$ cd client user@host:szuru/client$ npm install ``` +(@dante4 - my advice run npm audit fix, it shouldn't break anything, but at least fix a few critical vulnerabilities.) +(In case you are used Apt method you may skip below) `npm` sandboxes dependencies by default, i.e. installs them to `./node_modules`. This is good, because it avoids polluting the system with the @@ -70,6 +105,7 @@ project's dependencies. To make Python work the same way, we'll use `virtualenv`. Installing backend dependencies with `virtualenv` looks like this: + ```console user@host:szuru/client$ cd ../server user@host:szuru/server$ virtualenv python_modules # consistent with node_modules