Nextcloud: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| Zeile 10: | Zeile 10: | ||
<pre> | <pre> | ||
sudo tar -C /var/www -xvjf /tmp/nextcloud-10.0.1.tar.bz2 | sudo tar -C /var/www -xvjf /tmp/nextcloud-10.0.1.tar.bz2 | ||
| + | </pre> | ||
| + | *Danach erstellen wir für Nextcloud ein Script, dass wir mit dem nano editor erstellen | ||
| + | <pre> | ||
| + | nano /tmp/nextcloud.sh | ||
| + | </pre> | ||
| + | <pre> | ||
| + | #!/bin/bash | ||
| + | ocpath='/var/www/nextcloud' | ||
| + | htuser='www-data' | ||
| + | htgroup='www-data' | ||
| + | rootuser='root' | ||
| + | |||
| + | printf "Creating possible missing Directories\n" | ||
| + | mkdir -p $ocpath/data | ||
| + | mkdir -p $ocpath/assets | ||
| + | mkdir -p $ocpath/updater | ||
| + | |||
| + | printf "chmod Files and Directories\n" | ||
| + | find ${ocpath}/ -type f -print0 | xargs -0 chmod 0640 | ||
| + | find ${ocpath}/ -type d -print0 | xargs -0 chmod 0750 | ||
| + | chmod 755 ${ocpath} | ||
| + | |||
| + | printf "chown Directories\n" | ||
| + | chown -R ${rootuser}:${htgroup} ${ocpath}/ | ||
| + | chown -R ${htuser}:${htgroup} ${ocpath}/apps/ | ||
| + | chown -R ${htuser}:${htgroup} ${ocpath}/assets/ | ||
| + | chown -R ${htuser}:${htgroup} ${ocpath}/config/ | ||
| + | chown -R ${htuser}:${htgroup} ${ocpath}/data/ | ||
| + | chown -R ${htuser}:${htgroup} ${ocpath}/themes/ | ||
| + | chown -R ${htuser}:${htgroup} ${ocpath}/updater/ | ||
| + | |||
| + | chmod +x ${ocpath}/occ | ||
| + | |||
| + | printf "chmod/chown .htaccess\n" | ||
| + | if [ -f ${ocpath}/.htaccess ] | ||
| + | then | ||
| + | chmod 0644 ${ocpath}/.htaccess | ||
| + | chown ${rootuser}:${htgroup} ${ocpath}/.htaccess | ||
| + | fi | ||
| + | if [ -f ${ocpath}/data/.htaccess ] | ||
| + | then | ||
| + | chmod 0644 ${ocpath}/data/.htaccess | ||
| + | chown ${rootuser}:${htgroup} ${ocpath}/data/.htaccess | ||
| + | fi | ||
</pre> | </pre> | ||
Version vom 20. Juni 2017, 12:32 Uhr
Download
- um zu starten wechseln wir ins Verzeichnis /tmp
- dann nutzen wir "curl" um Nextcloud downzuloaden (Stand 2017)
curl -LO https://download.nextcloud.com/server/releases/nextcloud-10.0.1.tar.bz2
Installation
- Zunächst wird nextcloud auf dem Server installiert, dazu entpacken wir die Datei in das Verzeichnis /var/www
sudo tar -C /var/www -xvjf /tmp/nextcloud-10.0.1.tar.bz2
- Danach erstellen wir für Nextcloud ein Script, dass wir mit dem nano editor erstellen
nano /tmp/nextcloud.sh
#!/bin/bash
ocpath='/var/www/nextcloud'
htuser='www-data'
htgroup='www-data'
rootuser='root'
printf "Creating possible missing Directories\n"
mkdir -p $ocpath/data
mkdir -p $ocpath/assets
mkdir -p $ocpath/updater
printf "chmod Files and Directories\n"
find ${ocpath}/ -type f -print0 | xargs -0 chmod 0640
find ${ocpath}/ -type d -print0 | xargs -0 chmod 0750
chmod 755 ${ocpath}
printf "chown Directories\n"
chown -R ${rootuser}:${htgroup} ${ocpath}/
chown -R ${htuser}:${htgroup} ${ocpath}/apps/
chown -R ${htuser}:${htgroup} ${ocpath}/assets/
chown -R ${htuser}:${htgroup} ${ocpath}/config/
chown -R ${htuser}:${htgroup} ${ocpath}/data/
chown -R ${htuser}:${htgroup} ${ocpath}/themes/
chown -R ${htuser}:${htgroup} ${ocpath}/updater/
chmod +x ${ocpath}/occ
printf "chmod/chown .htaccess\n"
if [ -f ${ocpath}/.htaccess ]
then
chmod 0644 ${ocpath}/.htaccess
chown ${rootuser}:${htgroup} ${ocpath}/.htaccess
fi
if [ -f ${ocpath}/data/.htaccess ]
then
chmod 0644 ${ocpath}/data/.htaccess
chown ${rootuser}:${htgroup} ${ocpath}/data/.htaccess
fi