Mettre à jour le système :
sudo apt update && sudo apt upgrade -y
Créer un utilisateur Pixelfed dédié :
sudo useradd -m -s /bin/bash pixelfed-user
Définir son mot de passe :
sudo passwd pixelfed-user
Et installer des programmes supplémentaires :
sudo apt install -y sshguard fail2ban apache2 redis-server git jpegoptim optipng pngquant ffmpeg
Autoriser OpenSSH et Apache Full à travers le pare-feu d'Ubuntu :
sudo ufw allow OpenSSH
sudo ufw allow 'Apache Full'
Activer le pare-feu :
sudo ufw enable
Éditer le fichier de configuration :
sudo nano /etc/redis/redis.conf
Et modifier les lignes suivantes :
# Unix socket.
#
# Specify the path for the Unix socket that will be used to listen for
# incoming connections. There is no default, so Redis will not listen
# on a unix socket when not specified.
#
unixsocket /run/redis/redis.sock
unixsocketperm 770
# If you run Redis from upstart or systemd, Redis can interact with your
# supervision tree. Options:
# supervised no - no supervision interaction
# supervised upstart - signal upstart by putting Redis into SIGSTOP mode
# requires "expect stop" in your upstart job config
# supervised systemd - signal systemd by writing READY=1 to $NOTIFY_SOCKET
# on startup, and updating Redis status on a regular
# basis.
# supervised auto - detect upstart or systemd method based on
# UPSTART_JOB or NOTIFY_SOCKET environment variables
# Note: these supervision methods only signal "process is ready."
# They do not enable continuous pings back to your supervisor.
#
# The default is "no". To run under upstart/systemd, you can simply uncomment
# the line below:
#
supervised systemd
Enregistrer et quitter Nano.
Ajouter pixelfed-user au groupe redis :
sudo usermod -aG redis pixelfed-user
Et redémarrer le serveur Redis :
sudo systemctl restart redis.service