Skip to content

Instantly share code, notes, and snippets.

@PapsOu
Last active Nov 20, 2018
Embed
What would you like to do?
Fedora installation script
#!/bin/sh
# This script must be run as root
TARGET_USER='papsou'
# First update, very loooooong...
dnf -y update
# Install RPM fusion for akmod nVidia
dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
# REMI Repository
dnf install http://rpms.remirepo.net/fedora/remi-release-$(rpm -E %fedora).rpm
# RING
dnf config-manager --add-repo https://dl.ring.cx/ring-nightly/fedora_28/ring-nightly.repo
# Install VSCode repository
rpm --import https://packages.microsoft.com/keys/microsoft.asc
sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
dnf check-update
# Install akmod nVidia
dnf install akmod-nvidia "kernel-devel-uname-r == $(uname -r)"
# Install tools and libs
dnf -y install \
code \
nano \
guake \
chromium \
zsh \
parcellite \
npm \
gitg \
hunspell-fr \
php \
php-posix \
php-gd \
php-curl \
php-intl \
php-xml \
php-pgsql \
php-mbstring \
php-zip \
postgresql-server \
docker \
meld \
gimp \
inkscape \
gnome-tweak-tool
# Configure docker
groupadd docker
usermod -aG docker $TARGET_USER
# Portainer
docker volume create portainer_data
docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer --name portainer
# Mailcatcher
docker run -d -p 1080:1080 -p 1025:1025 --name mailcatcher jgiannuzzi/mailcatcher
# Systemd Units
## Portainer
echo '[Unit]
Description=Start Portainer at startup
After=docker.service
Requires=docker.service
[Service]
Type=simple
KillMode=none
ExecStart=/usr/bin/docker start -a portainer
ExecStop=/usr/bin/docker stop -t 2 portainer
TimeoutSec=2
[Install]
WantedBy=multi-user.target' > /etc/systemd/system/portainer.service
## Mailcatcher
echo '[Unit]
Description=Start Mailcatcher at startup
After=docker.service
Requires=docker.service
[Service]
Type=simple
KillMode=none
ExecStart=/usr/bin/docker start -a mailcatcher
ExecStop=/usr/bin/docker stop -t 2 mailcatcher
TimeoutSec=2
[Install]
WantedBy=multi-user.target' > /etc/systemd/system/mailcatcher.service
# Hosts
echo '
127.0.0.1 band-manager.local
0.0.0.0 icescrum.local
0.0.0.0 portainer.local
0.0.0.0 mailcatcher.local' >> /etc/hosts
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment