From 13b022bcb56d32356a919175c3f48ad703aec1f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=EA=99=A8d=D1=86=D3=8Do=CE=B7=D2=AC?= Date: Mon, 3 Jul 2017 17:10:47 +0700 Subject: [PATCH] Add Linux instructions --- INSTALL_LINUX.md | 89 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 INSTALL_LINUX.md diff --git a/INSTALL_LINUX.md b/INSTALL_LINUX.md new file mode 100644 index 0000000..eaf820c --- /dev/null +++ b/INSTALL_LINUX.md @@ -0,0 +1,89 @@ +# Instructions to install libre.sh on linux with Systemd + +## Recommendation +- Systemd (debian 8 or debian 9, CentOS 7 ...) + +# Installation +Where basicly reproduce what the user_data do for us. + +as root + +# configure sshd +Don't forget to create the user core and adding your ssh key before +You could also remove AllowUsers core or/and change the username. + +> cat > /etc/ssh/sshd_config < chmod 600 /etc/ssh/sshd_config +> systemctl restart sshd + +# add kernel parameter + +> cat > /etc/sysctl.d/libresh.conf < chmod 644 /etc/sysctl.d/libresh.conf +> sysctl -p + +# define Localhost + +> cat > /etc/hosts < cat > /etc/environment < mkdir -p /opt/bin &&\ +> dockerComposeVersion=$(curl -s https://api.github.com/repos/docker/compose/releases/latest|grep tag_name|cut -d'"' -f4) &&\ +> curl -L https://github.com/docker/compose/releases/download/$dockerComposeVersion/docker-compose-`uname -s`-`uname -m` > /opt/bin/docker-compose &&\ +> chmod +x /opt/bin/docker-compose + +# install Libre.sh + +> git clone https://github.com/indiehosters/libre.sh.git /libre.sh &&\ +> mkdir /{data,system} &&\ +> mkdir /data/trash &&\ +> cp /libre.sh/unit-files/* /etc/systemd/system && systemctl daemon-reload &&\ +> systemctl enable web-net.service &&\ +> systemctl start web-net.service &&\ +> cp /libre.sh/utils/* /opt/bin/ + +# add /opt/bin path + +> cat > /etc/profile.d/libre.sh <