aboutsummaryrefslogtreecommitdiffstats
path: root/.homeinstall
diff options
context:
space:
mode:
authorEiner von Vielen <tomwie@users.sourceforge.net>2017-12-19 17:35:14 +0100
committerEiner von Vielen <tomwie@users.sourceforge.net>2017-12-19 17:35:14 +0100
commit03d95ec089aeba03d4c9d8c129e8010c3bd1fb6e (patch)
tree6813da46f3034bbd181d28e7cb0466c52f744fd2 /.homeinstall
parentbb4dcbe89e5225f8feff774a338b8cb82d0c140b (diff)
downloadvolse-hubzilla-03d95ec089aeba03d4c9d8c129e8010c3bd1fb6e.tar.gz
volse-hubzilla-03d95ec089aeba03d4c9d8c129e8010c3bd1fb6e.tar.bz2
volse-hubzilla-03d95ec089aeba03d4c9d8c129e8010c3bd1fb6e.zip
Excluded third party plugins and themes from installation. Fixed backup for changed config of rsnapshot. Added autoremove of for apt-get. Added disclaimers in README.md. Added sanitiy check for Debian version 9.
Diffstat (limited to '.homeinstall')
-rw-r--r--.homeinstall/README.md13
-rwxr-xr-x.homeinstall/hubzilla-setup.sh54
2 files changed, 38 insertions, 29 deletions
diff --git a/.homeinstall/README.md b/.homeinstall/README.md
index 14a0846c3..793f7d404 100644
--- a/.homeinstall/README.md
+++ b/.homeinstall/README.md
@@ -2,12 +2,15 @@
Run hubzilla-setup.sh for an unattended installation of hubzilla.
-The script is known to work with Debian 9 stable (Stretch)
+The script is known to work without adjustments with
-+ Home-PC (Debian-9.2-amd64)
-+ Raspian (Debian-9.3 on a Rapberry 3)
++ Home-PC (Debian-9.2-amd64) or Raspian (Debian-9.3 on a Rapberry 3)
++ DynDNS from selfHOST.de or freedns.afraid.org/
-This script does not work for Debian 8 (Jessie).
+## Disclaimers
+
+- This script does work with Debian 9 (Stretch) only without adjustments.
+- This script has to be used on a fresh debian install only (it does not take account for a possibly already installed and configured webserver or sql implementation).
# Step-by-Step Overwiew
@@ -16,7 +19,7 @@ This script does not work for Debian 8 (Jessie).
Hardware
+ Internet connection and router at home
-+ Mini-pc connected to your router (a Raspberry 3 will do it too)
++ Mini-pc connected to your router (a Raspberry 3 will do for very small Hubs)
+ USB drive for backups
Software
diff --git a/.homeinstall/hubzilla-setup.sh b/.homeinstall/hubzilla-setup.sh
index 66fdd433d..023b9eed1 100755
--- a/.homeinstall/hubzilla-setup.sh
+++ b/.homeinstall/hubzilla-setup.sh
@@ -43,10 +43,15 @@
# Security - password is the same for mysql-server, phpmyadmin and hubzilla db
# - The script runs into installation errors for phpmyadmin if it uses
# different passwords. For the sake of simplicity one singel password.
+#
+# Security - suhosin for PHP
+# - The script does not install suhosin.
+# - Is the security package suhosin usefull or not usefull?
#
# Hubzilla - email verification
# - The script switches off email verification off in all htconfig.tpl.
# Example: /var/www/html/view/en/htconfig.tpl
+# - Is this a silly idea or not?
#
#
# Remove Hubzilla (for a fresh start using the script)
@@ -109,7 +114,11 @@ function check_sanity {
fi
if [ ! -f /etc/debian_version ]
then
- die "Ubuntu is not supported"
+ die "Debian is supported only"
+ fi
+ if ! grep -q 'Linux 9' /etc/issue
+ then
+ die "Linux 9 (stretch) is supported only"x
fi
}
@@ -251,7 +260,6 @@ function install_php {
# openssl and mbstring are included in libapache2-mod-php
print_info "installing php..."
nocheck_install "libapache2-mod-php php php-pear php-curl php-mcrypt php-gd"
- print_info "increase upload file size to 100M..."
sed -i "s/^upload_max_filesize =.*/upload_max_filesize = 100M/g" /etc/php/7.0/apache2/php.ini
sed -i "s/^post_max_size =.*/post_max_size = 100M/g" /etc/php/7.0/apache2/php.ini
}
@@ -300,7 +308,7 @@ function install_phpmyadmin {
echo phpmyadmin phpmyadmin/reconfigure-webserver multiselect apache2 | debconf-set-selections
nocheck_install "phpmyadmin"
- # It seems not to be neccessary to check rewrite.load because it comes
+ # It seems to be not neccessary to check rewrite.load because it comes
# with the installation. To be sure you could check this manually by:
#
# nano /etc/apache2/mods-available/rewrite.load
@@ -451,6 +459,11 @@ function configure_cron_selfhost {
fi
}
+function install_git {
+ print_info "installing git..."
+ nocheck_install "git"
+}
+
function install_letsencrypt {
print_info "installing let's encrypt ..."
# check if user gave domain
@@ -567,7 +580,10 @@ function install_hubzilla {
chmod -R 777 store
touch .htconfig.php
chmod ou+w .htconfig.php
- install_hubzilla_plugins
+ # uncomment the last function call "install_hubzilla_plugins"
+ # - if you want to install addons and themes that are not officially supported
+ # - and read the comments in function "install_hubzilla_plugins" how do do it
+ # install_hubzilla_plugins
cd /var/www/
chown -R www-data:www-data html
chown root:www-data /var/www/html/
@@ -667,25 +683,19 @@ function rewrite_to_https {
function install_rsnapshot {
print_info "installing rsnapshot..."
nocheck_install "rsnapshot"
- # internal disk
- cp -f /etc/rsnapshot.conf $snapshotconfig
- sed -i "/hourly/s/retain/#retain/" $snapshotconfig
- sed -i "/monthly/s/#retain/retain/" $snapshotconfig
+ # internal disk
+ cp -f /etc/rsnapshot.conf $snapshotconfig
sed -i "s/^cmd_cp/#cmd_cp/" $snapshotconfig
sed -i "s/^backup/#backup/" $snapshotconfig
- if [ -z "`grep 'letsencrypt' $snapshotconfig`" ]
- then
- echo "backup /var/lib/mysql/ localhost/" >> $snapshotconfig
- echo "backup /var/www/html/ localhost/" >> $snapshotconfig
- echo "backup /var/www/letsencrypt/ localhost/" >> $snapshotconfig
- fi
+ echo "backup /var/lib/mysql/ localhost/" >> $snapshotconfig
+ echo "backup /var/www/html/ localhost/" >> $snapshotconfig
+ echo "backup /var/www/letsencrypt/ localhost/" >> $snapshotconfig
# external disk
- if [ -n "$backup_device_name" ] && [ -n "$backup_device_pass" ]
+ if [ -n "$backup_device_name" ]
then
cp -f /etc/rsnapshot.conf $snapshotconfig_external_device
sed -i "s#snapshot_root.*#snapshot_root $backup_mount_point#" $snapshotconfig_external_device
- sed -i "/hourly/s/retain/#retain/" $snapshotconfig_external_device
- sed -i "/monthly/s/#retain/retain/" $snapshotconfig_external_device
+ sed -i "/alpha/s/6/30/" $snapshotconfig_external_device
sed -i "s/^cmd_cp/#cmd_cp/" $snapshotconfig_external_device
sed -i "s/^backup/#backup/" $snapshotconfig_external_device
if [ -z "`grep 'letsencrypt' $snapshotconfig_external_device`" ]
@@ -759,9 +769,7 @@ echo " if mount $backup_device_name $backup_mount_point" >> /var/www/$hub
echo " then" >> /var/www/$hubzilladaily
echo " device_mounted=1" >> /var/www/$hubzilladaily
echo " echo \"device $backup_device_name is now mounted. Starting backup...\"" >> /var/www/$hubzilladaily
-echo " rsnapshot -c $snapshotconfig_external_device daily" >> /var/www/$hubzilladaily
-echo " rsnapshot -c $snapshotconfig_external_device weekly" >> /var/www/$hubzilladaily
-echo " rsnapshot -c $snapshotconfig_external_device monthly" >> /var/www/$hubzilladaily
+echo " rsnapshot -c $snapshotconfig_external_device alpha" >> /var/www/$hubzilladaily
echo " echo \"\$(date) - disk sizes...\"" >> /var/www/$hubzilladaily
echo " df -h" >> /var/www/$hubzilladaily
echo " echo \"\$(date) - db size...\"" >> /var/www/$hubzilladaily
@@ -781,9 +789,7 @@ echo "fi" >> /var/www/$hubzilladaily
echo "if [ \$device_mounted == 0 ]" >> /var/www/$hubzilladaily
echo "then" >> /var/www/$hubzilladaily
echo " echo \"device could not be mounted $backup_device_name. Using internal disk for backup...\"" >> /var/www/$hubzilladaily
-echo " rsnapshot -c $snapshotconfig daily" >> /var/www/$hubzilladaily
-echo " rsnapshot -c $snapshotconfig weekly" >> /var/www/$hubzilladaily
-echo " rsnapshot -c $snapshotconfig monthly" >> /var/www/$hubzilladaily
+echo " rsnapshot -c $snapshotconfig alpha" >> /var/www/$hubzilladaily
echo "fi" >> /var/www/$hubzilladaily
echo "#" >> /var/www/$hubzilladaily
echo "echo \"\$(date) - db size...\"" >> /var/www/$hubzilladaily
@@ -798,7 +804,7 @@ echo "chown -R www-data:www-data /var/www/html/ # make all accessable for the we
echo "chown root:www-data /var/www/html/.htaccess" >> /var/www/$hubzilladaily
echo "chmod 0644 /var/www/html/.htaccess # www-data can read but not write it" >> /var/www/$hubzilladaily
echo "echo \"\$(date) - updating linux...\"" >> /var/www/$hubzilladaily
-echo "apt-get -q -y update && apt-get -q -y dist-upgrade # update linux and upgrade" >> /var/www/$hubzilladaily
+echo "apt-get -q -y update && apt-get -q -y dist-upgrade && apt-get -q -y autoremove # update linux and upgrade" >> /var/www/$hubzilladaily
echo "echo \"\$(date) - Backup hubzilla and update linux finished. Rebooting...\"" >> /var/www/$hubzilladaily
echo "#" >> /var/www/$hubzilladaily
echo "reboot" >> /var/www/$hubzilladaily