Add Fedora install instructions (#50)

Add Fedora install instructions
This commit is contained in:
Samantaz Fox 2021-04-06 08:14:48 +02:00 committed by GitHub
parent e3017ba9da
commit c1ee65c77a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,19 +8,19 @@ editor: markdown
dateCreated: 2021-02-25T11:24:06.655Z dateCreated: 2021-02-25T11:24:06.655Z
--- ---
## Installation: # Installation
To manually compile invidious you need at least 2GB of RAM. If you have less you can setup SWAP to have a combined amount of 2 GB or use Docker instead. To manually compile invidious you need at least 2GB of RAM. If you have less you can setup SWAP to have a combined amount of 2 GB or use Docker instead.
After installation take a look at the [Post-install steps](#post-install-configuration). After installation take a look at the [Post-install steps](#post-install-configuration).
### Automated installation: ## Automated installation
[Invidious-Updater](https://github.com/tmiland/Invidious-Updater) is a self-contained script that can automatically install and update Invidious. [Invidious-Updater](https://github.com/tmiland/Invidious-Updater) is a self-contained script that can automatically install and update Invidious.
### Docker: ## Docker
#### Build and start cluster: ### Build and start cluster
```bash ```bash
$ docker-compose up $ docker-compose up
@ -28,35 +28,56 @@ $ docker-compose up
Then visit `localhost:3000` in your browser. Then visit `localhost:3000` in your browser.
#### Rebuild cluster: ### Rebuild cluster
```bash ```bash
$ docker-compose build $ docker-compose build
``` ```
#### Delete data and rebuild: ### Delete data and rebuild
```bash ```bash
$ docker volume rm invidious_postgresdata $ docker volume rm invidious_postgresdata
$ docker-compose build $ docker-compose build
``` ```
### Manual installation: ## Manual installation
### Linux: ### Linux
#### Install the dependencies #### Install the dependencies
Arch Linux
```bash ```bash
# Arch Linux sudo pacman -S base-devel shards crystal librsvg postgresql
$ sudo pacman -S base-devel shards crystal librsvg postgresql ```
# Ubuntu or Debian Ubuntu or Debian
```bash
# First you have to add the repository to your APT configuration. For easy setup just run in your command line: # First you have to add the repository to your APT configuration. For easy setup just run in your command line:
$ curl -fsSL https://crystal-lang.org/install.sh | sudo bash curl -fsSL https://crystal-lang.org/install.sh | sudo bash
# That will add the signing key and the repository configuration. If you prefer to do it manually, Follow the instructions here https://crystal-lang.org/install
$ sudo apt-get update # That will add the signing key and the repository configuration.
$ sudo apt install crystal libssl-dev libxml2-dev libyaml-dev libgmp-dev libreadline-dev postgresql librsvg2-bin libsqlite3-dev zlib1g-dev # If you prefer to do it manually, Follow the instructions here https://crystal-lang.org/install
sudo apt-get update
sudo apt install crystal libssl-dev libxml2-dev libyaml-dev libgmp-dev libreadline-dev postgresql librsvg2-bin libsqlite3-dev zlib1g-dev
```
Fedora
```bash
# To install crystal on fedora, you can either install:
# - with brew/snap: https://crystal-lang.org/install/on_fedora/
# - from tarball: https://crystal-lang.org/install/from_targz/
# Currently, invidious depends on crystal 0.36.1-1, so a tarball install is necessary.
cd ~/Downloads
wget https://github.com/crystal-lang/crystal/releases/download/0.36.1/crystal-0.36.1-1-linux-x86_64.tar.gz
cd /opt
sudo tar -xzf ~/Downloads/crystal-0.36.1-1-linux-x86_64.tar.gz
sudo ln -s /opt/crystal-0.36.1-1/bin/crystal /usr/local/bin/crystal
sudo ln -s /opt/crystal-0.36.1-1/bin/shards /usr/local/bin/shards
# Then use dnf to install the dependencies:
sudo dnf install -y openssl-devel libevent-devel libxml2-devel libyaml-devel gmp-devel readline-devel postgresql librsvg2-devel sqlite-devel zlib-devel gcc
``` ```
#### Add an Invidious user and clone the repository #### Add an Invidious user and clone the repository
@ -99,14 +120,14 @@ $ ./invidious # stop with ctrl c
$ exit $ exit
``` ```
#### Systemd service: #### Systemd service
```bash ```bash
$ sudo cp /home/invidious/invidious/invidious.service /etc/systemd/system/invidious.service $ sudo cp /home/invidious/invidious/invidious.service /etc/systemd/system/invidious.service
$ sudo systemctl enable --now invidious.service $ sudo systemctl enable --now invidious.service
``` ```
#### Logrotate: #### Logrotate
```bash ```bash
$ echo "/home/invidious/invidious/invidious.log { $ echo "/home/invidious/invidious/invidious.log {
@ -120,7 +141,7 @@ minsize 1048576
$ sudo chmod 0644 /etc/logrotate.d/invidious.logrotate $ sudo chmod 0644 /etc/logrotate.d/invidious.logrotate
``` ```
### MacOS: ### MacOS
```bash ```bash
# Install dependencies # Install dependencies