mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-10 15:12:01 -03:30
update to Raspbian Stretch
This commit is contained in:
parent
3d8063221d
commit
5e711e9ffd
@ -10,7 +10,7 @@ This code also generates the [NextCloudPi ARM docker image](https://hub.docker.c
|
||||
|
||||
## Features
|
||||
|
||||
* Raspbian 8 Jessie
|
||||
* Raspbian 9 Stretch
|
||||
* Nextcloud 12
|
||||
* Apache 2.4.25, with HTTP2 enabled
|
||||
* PHP 7.0 (double the speed of PHP5!)
|
||||
|
||||
1
batch.sh
1
batch.sh
@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Batch creation of NextCloudPi image
|
||||
# Tested with 2017-03-02-raspbian-jessie-lite.img
|
||||
#
|
||||
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
|
||||
# GPL licensed (see end of file) * Use at your own risk!
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#!/bin/bish
|
||||
|
||||
# Install docker ARM on Raspbian
|
||||
# Tested with 2017-03-02-raspbian-jessie-lite.img
|
||||
#
|
||||
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
|
||||
# GPL licensed (see end of file) * Use at your own risk!
|
||||
|
||||
@ -24,12 +24,7 @@ install()
|
||||
apt-get install -y --no-install-recommends libapache2-mod-security2 modsecurity-crs
|
||||
a2dismod security2
|
||||
|
||||
# COPY RULES
|
||||
cd /usr/share/modsecurity-crs/base_rules/
|
||||
for ruleFile in * ; do sudo ln -s /usr/share/modsecurity-crs/base_rules/$ruleFile /etc/modsecurity/$ruleFile ; done
|
||||
cd /usr/share/modsecurity-crs/optional_rules/
|
||||
for ruleFile in * ; do sudo ln -s /usr/share/modsecurity-crs/optional_rules/$ruleFile /etc/modsecurity/$ruleFile ; done
|
||||
rm /etc/modsecurity/modsecurity_crs_16_session_hijacking.conf # https://github.com/SpiderLabs/owasp-modsecurity-crs/commit/e2fbef4ce89fed0c4dd338002b9a090dd2f6491d
|
||||
#FIXME - after migration to Stretch is done
|
||||
|
||||
# CONFIGURE
|
||||
cp /etc/modsecurity/modsecurity.conf-recommended /etc/modsecurity/modsecurity.conf
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Data dir configuration script for NextCloudPi
|
||||
# Tested with 2017-03-02-raspbian-jessie-lite.img
|
||||
#
|
||||
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
|
||||
# GPL licensed (see end of file) * Use at your own risk!
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Format a USB external drive as a unique ext4 partition
|
||||
# Tested with 2017-03-02-raspbian-jessie-lite.img
|
||||
#
|
||||
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
|
||||
# GPL licensed (see end of file) * Use at your own risk!
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Use uPnP to forward router ports for NextCloudPi
|
||||
# Tested with 2017-03-02-raspbian-jessie-lite.img
|
||||
#
|
||||
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
|
||||
# GPL licensed (see end of file) * Use at your own risk!
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# HTTPS rewrite configuration script for NextCloudPi
|
||||
# Tested with 2017-03-02-raspbian-jessie-lite.img
|
||||
#
|
||||
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
|
||||
# GPL licensed (see end of file) * Use at your own risk!
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Init NextCloud database and perform initial configuration
|
||||
# Tested with 2017-03-02-raspbian-jessie-lite.img
|
||||
#
|
||||
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
|
||||
# GPL licensed (see end of file) * Use at your own risk!
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# System limit configurator for NextCloudPi
|
||||
# Tested with 2017-03-02-raspbian-jessie-lite.img
|
||||
#
|
||||
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
|
||||
# GPL licensed (see end of file) * Use at your own risk!
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Install the latest News third party app
|
||||
# Tested with 2017-03-02-raspbian-jessie-lite.img
|
||||
#
|
||||
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
|
||||
# GPL licensed (see end of file) * Use at your own risk!
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Nextcloud installation on Raspbian over LAMP base
|
||||
# Tested with 2017-03-02-raspbian-jessie-lite.img
|
||||
#
|
||||
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
|
||||
# GPL licensed (see end of file) * Use at your own risk!
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Install the latest News third party app
|
||||
# Tested with 2017-03-02-raspbian-jessie-lite.img
|
||||
#
|
||||
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
|
||||
# GPL licensed (see end of file) * Use at your own risk!
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Data dir configuration script for NextCloudPi
|
||||
# Tested with 2017-03-02-raspbian-jessie-lite.img
|
||||
#
|
||||
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
|
||||
# GPL licensed (see end of file) * Use at your own risk!
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
|
||||
#!/bin/bash
|
||||
# Nextcloud restore backup
|
||||
# Tested with 2017-03-02-raspbian-jessie-lite.img
|
||||
#
|
||||
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
|
||||
# GPL licensed (see end of file) * Use at your own risk!
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Periodically synchronize NextCloud for externally modified files
|
||||
# Tested with 2017-03-02-raspbian-jessie-lite.img
|
||||
#
|
||||
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
|
||||
# GPL licensed (see end of file) * Use at your own risk!
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Synchronize NextCloud for externally modified files
|
||||
# Tested with 2017-03-02-raspbian-jessie-lite.img
|
||||
#
|
||||
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
|
||||
# GPL licensed (see end of file) * Use at your own risk!
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Data dir configuration script for NextCloudPi
|
||||
# Tested with 2017-03-02-raspbian-jessie-lite.img
|
||||
#
|
||||
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
|
||||
# GPL licensed (see end of file) * Use at your own risk!
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Data dir configuration script for NextCloudPi
|
||||
# Tested with 2017-03-02-raspbian-jessie-lite.img
|
||||
#
|
||||
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
|
||||
# GPL licensed (see end of file) * Use at your own risk!
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Data dir configuration script for NextCloudPi
|
||||
# Tested with 2017-03-02-raspbian-jessie-lite.img
|
||||
#
|
||||
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
|
||||
# GPL licensed (see end of file) * Use at your own risk!
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# no-ip.org installation on Raspbian
|
||||
# Tested with 2017-03-02-raspbian-jessie-lite.img
|
||||
#
|
||||
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
|
||||
# GPL licensed (see end of file) * Use at your own risk!
|
||||
@ -37,7 +36,7 @@ install()
|
||||
mkdir /tmp/noip && cd /tmp/noip
|
||||
wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz
|
||||
tar vzxf noip-duc-linux.tar.gz
|
||||
cd -; cd $OLDPWD/noip-*
|
||||
cd -; cd $OLDPWD/noip-2*
|
||||
make
|
||||
cp noip2 /usr/local/bin/
|
||||
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# SAMBA server for Raspbian
|
||||
# Tested with 2017-03-02-raspbian-jessie-lite.img
|
||||
#
|
||||
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
|
||||
# GPL licensed (see end of file) * Use at your own risk!
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Unattended upgrades installation on Raspbian
|
||||
# Tested with 2017-03-02-raspbian-jessie-lite.img
|
||||
#
|
||||
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
|
||||
# GPL licensed (see end of file) * Use at your own risk!
|
||||
@ -39,7 +38,6 @@ APT::Periodic::AutocleanInterval "7";
|
||||
Unattended-Upgrade::Automatic-Reboot "$AUTOREBOOT";
|
||||
Unattended-Upgrade::Automatic-Reboot-Time "04:00";
|
||||
Unattended-Upgrade::Origins-Pattern {
|
||||
o=Raspbian,n=jessie,l=Raspbian;
|
||||
o=Raspbian,n=stretch,l=Raspbian;
|
||||
}
|
||||
EOF
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Generic software installer for Raspbian. Online on a running RPi, or offline with QEMU.
|
||||
# Tested with 2017-03-02-raspbian-jessie-lite.img
|
||||
#
|
||||
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
|
||||
# GPL licensed (see end of file) * Use at your own risk!
|
||||
|
||||
18
lamp.sh
18
lamp.sh
@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Nextcloud LAMP base installation on Raspbian
|
||||
# Tested with 2017-03-02-raspbian-jessie-lite.img
|
||||
#
|
||||
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
|
||||
# GPL licensed (see end of file) * Use at your own risk!
|
||||
@ -25,24 +24,15 @@ 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 <<EOF
|
||||
Package: *
|
||||
Pin: release n=jessie
|
||||
Pin-Priority: 600
|
||||
EOF
|
||||
apt-get update
|
||||
|
||||
# INSTALL FROM STRETCH
|
||||
# INSTALL
|
||||
##########################################
|
||||
|
||||
$APTINSTALL apt-utils
|
||||
$APTINSTALL cron
|
||||
$APTINSTALL -t stretch apache2
|
||||
$APTINSTALL -t stretch php7.0 php7.0-curl php7.0-gd php7.0-fpm php7.0-cli php7.0-opcache php7.0-mbstring php7.0-xml php7.0-zip php7.0-APC
|
||||
$APTINSTALL apache2
|
||||
$APTINSTALL php7.0 php7.0-curl php7.0-gd php7.0-fpm php7.0-cli php7.0-opcache php7.0-mbstring php7.0-xml php7.0-zip php7.0-APC
|
||||
mkdir -p /run/php
|
||||
|
||||
# Randomize mariaDB password
|
||||
@ -53,7 +43,7 @@ EOF
|
||||
|
||||
debconf-set-selections <<< "mariadb-server-5.5 mysql-server/root_password password $DBPASSWD"
|
||||
debconf-set-selections <<< "mariadb-server-5.5 mysql-server/root_password_again password $DBPASSWD"
|
||||
$APTINSTALL -t stretch mariadb-server php7.0-mysql
|
||||
$APTINSTALL mariadb-server php7.0-mysql
|
||||
mkdir -p /run/mysqld
|
||||
chown mysql /run/mysqld
|
||||
|
||||
|
||||
@ -67,6 +67,7 @@ EOF
|
||||
|
||||
# NEXTCLOUDPI MOTD
|
||||
##########################################
|
||||
rm -rf /etc/update-motd.d
|
||||
mkdir /etc/update-motd.d
|
||||
rm /etc/motd
|
||||
ln -s /var/run/motd /etc/motd
|
||||
@ -129,13 +130,15 @@ EOF
|
||||
sed -i "s|^;\?upload_tmp_dir =.*$|upload_tmp_dir = $UPLOADTMPDIR|" /etc/php/7.0/fpm/php.ini
|
||||
sed -i "s|^;\?sys_temp_dir =.*$|sys_temp_dir = $UPLOADTMPDIR|" /etc/php/7.0/fpm/php.ini
|
||||
|
||||
touch /usr/local/etc/nextcloudpi-config.d/modsecurity.sh # TODO fix after migration to Stretch is done
|
||||
|
||||
# update to latest version from github as part of the build process
|
||||
wget https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/bin/ncp-update -O /usr/local/bin/ncp-update
|
||||
chmod a+x /usr/local/bin/ncp-update
|
||||
/usr/local/bin/ncp-update
|
||||
|
||||
# External requirements for Apps
|
||||
#$APTINSTALL -o "Dpkg::Options::=--force-confold" -t stretch php-smbclient # TODO breaks samba
|
||||
$APTINSTALL -o "Dpkg::Options::=--force-confold" php-smbclient
|
||||
}
|
||||
|
||||
configure() { :; }
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Create a Raspbian image with docker
|
||||
# Tested with 2017-03-02-raspbian-jessie-lite.img
|
||||
#
|
||||
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
|
||||
# GPL licensed (see end of file) * Use at your own risk!
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#!/bin/bish
|
||||
|
||||
# Prepare a Raspbian image (resize and update)
|
||||
# Tested with 2017-03-02-raspbian-jessie-lite.img
|
||||
#
|
||||
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
|
||||
# GPL licensed (see end of file) * Use at your own risk!
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Perform a software update in NextCloudPi
|
||||
# Tested with 2017-03-02-raspbian-jessie-lite.img
|
||||
#
|
||||
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
|
||||
# GPL licensed (see end of file) * Use at your own risk!
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user