#!/bin/bash # Nextcloud LAMP base installation on Raspbian # Tested with 2017-03-02-raspbian-jessie-lite.img # # Copyleft 2017 by Ignacio Nunez Hernanz # GPL licensed (see end of file) * Use at your own risk! # # Usage: # # ./installer.sh lamp.sh () # # See installer.sh instructions for details # # Notes: # Upon each necessary restart, the system will cut the SSH session, therefore # it is required to save the state of the installation. See variable $STATE_FILE # It will be necessary to invoke this a number of times for a complete installation # # More at https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ # DBPASSWD_=ownyourbits APTINSTALL="apt-get install -y --no-install-recommends" export DEBIAN_FRONTEND=noninteractive install() { # GET STRETCH SOURCES FOR HTTP2 AND PHP7 ########################################## echo "deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free rpi" >> /etc/apt/sources.list cat > /etc/apt/preferences </etc/apache2/conf-available/http2.conf <> /etc/apache2/apache2.conf < Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload" EOF # CONFIGURE PHP7 ########################################## cat > /etc/php/7.0/mods-available/apcu.ini < /etc/php/7.0/mods-available/opcache.ini <