diff options
author | Einer von Vielen <tomwie@users.sourceforge.net> | 2018-01-03 15:31:53 +0100 |
---|---|---|
committer | Einer von Vielen <tomwie@users.sourceforge.net> | 2018-01-03 15:31:53 +0100 |
commit | b0f4929d4175d92a76e4b53cd26dfd336e3e1a52 (patch) | |
tree | 4a26a254055cb7447c2ea38dfaf359c51b06f7d3 /.homeinstall | |
parent | 10a1569c9aa1780344954dc4d01898b29a772aca (diff) | |
download | volse-hubzilla-b0f4929d4175d92a76e4b53cd26dfd336e3e1a52.tar.gz volse-hubzilla-b0f4929d4175d92a76e4b53cd26dfd336e3e1a52.tar.bz2 volse-hubzilla-b0f4929d4175d92a76e4b53cd26dfd336e3e1a52.zip |
Fixed 3.0RC. Forgot to change the setup script
Diffstat (limited to '.homeinstall')
-rw-r--r-- | .homeinstall/README.md | 22 | ||||
-rw-r--r-- | .homeinstall/hubzilla-config.txt.template | 10 | ||||
-rwxr-xr-x | .homeinstall/hubzilla-setup.sh | 70 |
3 files changed, 47 insertions, 55 deletions
diff --git a/.homeinstall/README.md b/.homeinstall/README.md index 002ae0e84..96ce3b6d4 100644 --- a/.homeinstall/README.md +++ b/.homeinstall/README.md @@ -34,9 +34,7 @@ Software ## The basic steps (quick overview) + Register your own domain (for example at selfHOST) or a free subdomain (for example at freeDNS) -+ Install Debian 9 -+ On your router: Open the ports 80 and 443 -+ Log on to your fresh Debian ++ Log on to your new debian (server) - apt-get install git - mkdir -p /var/www - cd /var/www @@ -72,10 +70,10 @@ The USB drive must be compatible with the filesystems ### Install Debian Linux on the Mini-PC -Download the stable Debian 9 at https://www.debian.org/ +Download the stable Debian at https://www.debian.org/ (Debian 8 is no longer supported.) -Create bootable USB drive with Debian on it. You could use +Create bootable USB drive with Debian on it.You could use - unetbootin, https://en.wikipedia.org/wiki/UNetbootin - or simply the linux command "dd" @@ -109,7 +107,7 @@ You can use subdomains as well my.cooldomain.org -There are two ways to get a domain +There are two way to get a domain - buy a domain, or - register a free subdomain @@ -129,7 +127,7 @@ Follow the instructions in .homeinstall/hubzilla-config.txt. ## Install Hubzilla on your Debian -Login to your Debian +Login to your debian (Provided your username is "you" and the name of the mini pc is "debian". You could take the IP address instead of "debian") @@ -160,7 +158,7 @@ Copy the template file cp hubzilla-config.txt.template hubzilla-config.txt -Modify the file "hubzilla-config.txt". Read the instructions there carefully and enter your values. +Change the file "hubzilla-config.txt". Read the instructions there carefully and enter your values. nano hubzilla-config.txt @@ -189,9 +187,7 @@ Follow the instructions in the next pages. ## Note for the Rasperry -The script was tested with a Raspberry 3 under Raspian (Debian 9.3, 2017-11-29-raspbian-stretch.img). - -Be patient when a page is loaded by your Raspi-Hub for the very first time. Especially the config pages after the install will load very slowly. +The script was tested with an Raspberry 3 under Raspian (Debian 9.3, 2017-11-29-raspbian-stretch.img). It is recommended to deinstall these programms to avoid endless updates. Use... @@ -202,6 +198,8 @@ It is recommended to run the Raspi without graphical frontend (X-Server). Use... sudo raspi-config -**DO NOT FORGET TO CHANGE THE DEFAULT PASSWORD FOR USER PI!** +to boot the Rapsi to the client console. + +DO NOT FORGET TO CHANGE THE DEFAULT PASSWORD FOR USER PI! diff --git a/.homeinstall/hubzilla-config.txt.template b/.homeinstall/hubzilla-config.txt.template index 089917c68..2776ccd27 100644 --- a/.homeinstall/hubzilla-config.txt.template +++ b/.homeinstall/hubzilla-config.txt.template @@ -13,10 +13,10 @@ db_pass= # This script automates installation of an SSL certificate from # Let's Encrypt (https://letsencrypt.org) # -# Please give the domain name of your hub. Examples: +# Please give the domain name of your hub # -# le_domain=my.cooldomain.org -# le_domain=cooldomain.org +# Example: my.cooldomain.org +# Example: cooldomain.org # # Email is optional # @@ -25,7 +25,7 @@ le_domain= le_email= ############################################### -### OPTIONAL - dynamic IP address - selfHOST ## +### OPTIONAL - selfHOST - dynamic IP address ## # # 1. Register a domain at selfhost.de # - choose offer "DOMAIN dynamisch" 1,50€/mon at 08.01.2016 @@ -42,7 +42,7 @@ selfhost_user= selfhost_pass= ############################################### -### OPTIONAL - dynamic IP address - FreeDNS ### +### OPTIONAL - FreeDNS - dynamic IP address ### # # Please give the alpha-numeric-key of freedns # diff --git a/.homeinstall/hubzilla-setup.sh b/.homeinstall/hubzilla-setup.sh index c83fb8de9..023b9eed1 100755 --- a/.homeinstall/hubzilla-setup.sh +++ b/.homeinstall/hubzilla-setup.sh @@ -114,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 } @@ -253,11 +257,11 @@ function install_sendmail { } function install_php { - # openssl and mbstring are included in libapache2-mod-php5 - # to_to: php5-suhosin + # openssl and mbstring are included in libapache2-mod-php print_info "installing php..." - nocheck_install "libapache2-mod-php5 php5 php-pear php5-xcache php5-curl php5-mcrypt php5-gd" - php5enmod mcrypt + nocheck_install "libapache2-mod-php php php-pear php-curl php-mcrypt php-gd" + 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 } function install_mysql { @@ -277,18 +281,17 @@ function install_mysql { # want to be prompted for it then this can be arranged by preseeding the # DebConf database with the required information. # - # echo mysql-server-5.5 mysql-server/root_password password xyzzy | debconf-set-selections - # echo mysql-server-5.5 mysql-server/root_password_again password xyzzy | debconf-set-selections + # echo mysql-server mysql-server/root_password password xyzzy | debconf-set-selections + # echo mysql-server mysql-server/root_password_again password xyzzy | debconf-set-selections # print_info "installing mysql..." if [ -z "$mysqlpass" ] then die "mysqlpass not set in $configfile" fi - echo mysql-server-5.5 mysql-server/root_password password $mysqlpass | debconf-set-selections - echo mysql-server-5.5 mysql-server/root_password_again password $mysqlpass | debconf-set-selections - nocheck_install "php5-mysql mysql-server mysql-client" - php5enmod mcrypt + echo mysql-server mysql-server/root_password password $mysqlpass | debconf-set-selections + echo mysql-server mysql-server/root_password_again password $mysqlpass | debconf-set-selections + nocheck_install "php-mysql mysql-server mysql-client" } function install_phpmyadmin { @@ -327,6 +330,7 @@ function install_phpmyadmin { echo "Include /etc/phpmyadmin/apache.conf" >> /etc/apache2/apache2.conf fi service apache2 restart + /etc/init.d/mysql start } function create_hubzilla_db { @@ -511,6 +515,8 @@ END then die "Failed to load $url_http" fi + # accept terms of service of letsencrypt + ./dehydrated --register --accept-terms # run script dehydrated # ./dehydrated --cron --config $le_dir/config.sh @@ -574,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/ @@ -607,7 +616,6 @@ function install_hubzilla_plugins { echo "# cd /var/www/html/.homeinstall" >> $plugin_install echo "# ./hubzilla-setup.sh" >> $plugin_install echo "https://gitlab.com/zot/ownmapp.git ownMapp" >> $plugin_install - echo "https://gitlab.com/zot/hubzilla-chess.git chess" >> $plugin_install fi # install plugins while read -r line; do @@ -675,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`" ] @@ -767,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 @@ -789,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 @@ -801,15 +799,12 @@ echo "# update" >> /var/www/$hubzilladaily echo "echo \"\$(date) - updating dehydrated...\"" >> /var/www/$hubzilladaily echo "git -C /var/www/letsencrypt/ pull" >> /var/www/$hubzilladaily echo "echo \"\$(date) - updating hubhilla core...\"" >> /var/www/$hubzilladaily -echo "git -C /var/www/html/ pull" >> /var/www/$hubzilladaily -echo "echo \"\$(date) - updating hubhilla addons...\"" >> /var/www/$hubzilladaily -echo "git -C /var/www/html/addon/ pull" >> /var/www/$hubzilladaily -echo "bash /var/www/html/$plugins_update" >> /var/www/$hubzilladaily +echo "(cd /var/www/html/ ; util/udall)" >> /var/www/$hubzilladaily echo "chown -R www-data:www-data /var/www/html/ # make all accessable for the webserver" >> /var/www/$hubzilladaily 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 @@ -894,7 +889,6 @@ install_run_selfhost ping_domain configure_cron_freedns configure_cron_selfhost -install_git install_letsencrypt configure_apache_for_https check_https |