Last active
February 25, 2023 03:21
-
-
Save SamSirry/73811b1c35d069d5ba7dff8e142c4ee8 to your computer and use it in GitHub Desktop.
Installing Duplicati 2.6 on CentOS 8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Start this script while logged in as root. | |
# Preparations: | |
# Update manually with yum if it's a new OS installation. | |
# yum update -y && reboot | |
yum install wget curl -y | |
mkdir /downloads | |
cd /downloads | |
# Install mono as per the instructions on: https://www.mono-project.com/download/stable/#download-lin-centos | |
# at the time of this writing (2021-05-11) it was as so: | |
rpmkeys --import "http://pool.sks-keyservers.net/pks/lookup?op=get&search=0x3fa7e0328081bff6a14da29aa6a19b38d3d831ef" | |
curl https://download.mono-project.com/repo/centos8-stable.repo | tee /etc/yum.repos.d/mono-centos8-stable.repo | |
yum install mono-devel -y | |
# Install additional requirements: | |
yum install sqlite gtk-sharp2 -y | |
# Download the latest Duplicati for CentOS. Get the URL from: https://www.duplicati.com/download | |
# e.g.: | |
wget https://updates.duplicati.com/beta/duplicati-2.0.6.1-2.0.6.1_beta_20210503.noarch.rpm | |
# Install as per the instructions at https://duplicati.readthedocs.io/en/latest/02-installation/ (at the bottom of the page) | |
# Note that yum install does not work. Use something like: | |
rpm -ivh --nodeps duplicati-2.0.6.1-2.0.6.1_beta_20210503.noarch.rpm | |
# Ignore the error about a service not existing. | |
# Create Duplicati service options file: | |
echo "# Defaults for duplicati initscript" > /etc/default/duplicati | |
echo "# sourced by /etc/init.d/duplicati" >> /etc/default/duplicati | |
echo "# installed at /etc/default/duplicati by the maintainer scripts" >> /etc/default/duplicati | |
echo "" >> /etc/default/duplicati | |
echo "#" >> /etc/default/duplicati | |
echo "# This is a POSIX shell fragment" >> /etc/default/duplicati | |
echo "#" >> /etc/default/duplicati | |
echo "" >> /etc/default/duplicati | |
echo "# Additional options that are passed to the Daemon." >> /etc/default/duplicati | |
echo "DAEMON_OPTS=\"--webservice-interface=any --webservice-port=8200 --portable-mode\"" >> /etc/default/duplicati | |
# Create the service: | |
echo "[Unit]" > /etc/systemd/system/duplicati.service | |
echo "Description=Duplicati web-server" >> /etc/systemd/system/duplicati.service | |
echo "After=network.target" >> /etc/systemd/system/duplicati.service | |
echo "" >> /etc/systemd/system/duplicati.service | |
echo "[Service]" >> /etc/systemd/system/duplicati.service | |
echo "Nice=19" >> /etc/systemd/system/duplicati.service | |
echo "IOSchedulingClass=idle" >> /etc/systemd/system/duplicati.service | |
echo "EnvironmentFile=-/etc/default/duplicati" >> /etc/systemd/system/duplicati.service | |
echo "ExecStart=/usr/bin/duplicati-server \$DAEMON_OPTS" >> /etc/systemd/system/duplicati.service | |
echo "Restart=always" >> /etc/systemd/system/duplicati.service | |
echo "" >> /etc/systemd/system/duplicati.service | |
echo "[Install]" >> /etc/systemd/system/duplicati.service | |
echo "WantedBy=multi-user.target" >> /etc/systemd/system/duplicati.service | |
systemctl enable duplicati.service | |
sleep 1 | |
systemctl daemon-reload | |
sleep 1 | |
# Start the service: | |
service duplicati start | |
sleep 4 | |
service duplicati status | |
# It's ready. | |
# Access the web interface using the favorite browser at http://ip:8200/ or as set in the config file. |
Glad I could be of help.
Oh wow, I was so much a Linux n00b back then lol
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Very helpful script - thank you very much for sharing!
I updated the download links to the newest version before I used it:
https://updates.duplicati.com/beta/duplicati-2.0.6.3-2.0.6.3_beta_20210617.noarch.rpm