Vous n'êtes pas identifié(e).
L'icône rouge permet de télécharger chaque page du wiki visitée au format PDF et la grise au format ODT →
Ceci est une ancienne révision du document !
Installation et configuration de nextcloud sur un serveur debian 10 (buster) . cette installation est faite sur mon serveur auto hébergé, donc pas forcément adapté à tous. .
pour le téléchargement, je suis allé dans var/www/html/ en user $
wget https://download.nextcloud.com/server/releases/nextcloud-17.0.0.zip
en root #
unzip nextcloud-17.0.0.zip
Pour l’installation, j’ai suivi la doc du site de nextcloud j’ai eu quelques erreurs qui me demandait d’installer les paquets suivant :
apt-get install php5-curl php7.3-xml php-mbstring php7.3-xml php-dom
Puis j’ai l’affichage dans le navigateur :
nextcloud vous demande un login et un pass plus le login et le pass de la BDD (mysql)
une fois entrée, j’ai changé l’image d’accueil et mis mon logo
#
adduser lagrenouille www-data
#
chown -R www-data:lagrenouille /var/www/html/nextcloud
#
chmod -R 755nextcloud/ (ou 770)
pour que tout le monde puisse renommer les fichiers ou les supprimer, j'ai mis les data à 755
$
mysql -u root -p
Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 39 Server version: 10.3.17-MariaDB-0+deb10u1 Debian 10 Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> CREATE DATABASE nextcloud ; Query OK, 1 row affected (0.001 sec)
$
mysql -u lagrenouille -p -e "show databases";
Enter password: +--------------------+ +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | nextcloud | | performance_schema | +--------------------+
la base est bien créer
dpkg -l | grep php
ii libapache2-mod-php7.3 7.3.9-1~deb10u1 amd64 server-side, HTML-embedded scripting language (Apache 2 module) ii php 2:7.3+69 all server-side, HTML-embedded scripting language (default) ii php-common 2:69 all Common files for PHP packages ii php-curl 2:7.3+69 all CURL module for PHP [default] ii php-mbstring 2:7.3+69 all MBSTRING module for PHP [default] ii php-mysql 2:7.3+69 all MySQL module for PHP [default] ii php-pear 1:1.10.6+submodules+notgz-1.1 all PEAR Base System ii php-xml 2:7.3+69 all DOM, SimpleXML, WDDX, XML, and XSL module for PHP [default] ii php7.3 7.3.9-1~deb10u1 all server-side, HTML-embedded scripting language (metapackage) ii php7.3-cli 7.3.9-1~deb10u1 amd64 command-line interpreter for the PHP scripting language ii php7.3-common 7.3.9-1~deb10u1 amd64 documentation, examples and common module for PHP ii php7.3-curl 7.3.9-1~deb10u1 amd64 CURL module for PHP ii php7.3-gd 7.3.9-1~deb10u1 amd64 GD module for PHP ii php7.3-json 7.3.9-1~deb10u1 amd64 JSON module for PHP ii php7.3-mbstring 7.3.9-1~deb10u1 amd64 MBSTRING module for PHP ii php7.3-mysql 7.3.9-1~deb10u1 amd64 MySQL module for PHP ii php7.3-opcache 7.3.9-1~deb10u1 amd64 Zend OpCache module for PHP ii php7.3-readline 7.3.9-1~deb10u1 amd64 readline module for PHP ii php7.3-sqlite3 7.3.9-1~deb10u1 amd64 SQLite3 module for PHP ii php7.3-xml 7.3.9-1~deb10u1 amd64 DOM, SimpleXML, WDDX, XML, and XSL module for PHP ii php7.3-zip 7.3.9-1~deb10u1 amd64 Zip module for PHP php7.3-fpm
dpkg -l | grep apache
ii apache2 2.4.38-3+deb10u1 amd64 Apache HTTP Server ii apache2-bin 2.4.38-3+deb10u1 amd64 Apache HTTP Server (modules and other binary files) ii apache2-data 2.4.38-3+deb10u1 all Apache HTTP Server (common files) ii apache2-doc 2.4.38-3+deb10u1 all Apache HTTP Server (on-site documentation) ii apache2-utils 2.4.38-3+deb10u1 amd64 Apache HTTP Server (utility programs for web servers) ii libapache-poi-java 4.0.1-1 all Apache POI - Java API for Microsoft Documents ii libapache-pom-java 18-1 all Maven metadata for all Apache Software projects ii libapache2-mod-php7.3 7.3.9-1~deb10u1 amd64 server-side, HTML-embedded scripting language (Apache 2 module) ii libapache2-mod-php 2:7.3+69 all server-side, HTML-embedded scripting language (Apache 2 module) (default) ii libapache2-mod-evasive 1.10.1-3 amd64 evasive module to minimize HTTP DoS or brute force attacks ii apache2-ssl-dev 2.4.38-3+deb10u1 amd64 Apache HTTP Server (mod_ssl development headers)
dpkg -l | grep mysql
ii libdbd-mysql-perl:amd64 4.050-2 amd64 Perl5 database interface to the MariaDB/MySQL database ii mysql-common 5.8+1.0.5 all MySQL database common files, e.g. /etc/mysql/my.cnf ii php-mysql 2:7.3+69 all MySQL module for PHP [default] ii php7.3-mysql 7.3.9-1~deb10u1 amd64 MySQL module for PHP ii python3-pymysql 0.9.3-1 all Pure-Python MySQL Driver - Python 3.x
dpkg -l | grep mariadb
ii libmariadb3:amd64 1:10.3.17-0+deb10u1 amd64 MariaDB database client library ii mariadb-client-10.3 1:10.3.17-0+deb10u1 amd64 MariaDB database client binaries ii mariadb-client-core-10.3 1:10.3.17-0+deb10u1 amd64 MariaDB database core client binaries ii mariadb-common 1:10.3.17-0+deb10u1 all MariaDB common metapackage ii mariadb-server 1:10.3.17-0+deb10u1 all MariaDB database server (metapackage depending on the latest version) ii mariadb-server-10.3 1:10.3.17-0+deb10u1 amd64 MariaDB database server binaries ii mariadb-server-core-10.3 1:10.3.17-0+deb10u1 amd64 MariaDB database core server files
Vu que ma box m’attribue des IP en DHCP Je suis allé récupérer mon apikey chez gandi :
un copain m’a fait un script python qui récupère mon ip public et qui la place dans ma zone DNS chez Gandi
#!/usr/local/bin/python3 # -*- coding: UTF-8 -*- import pycurl from io import BytesIO import json import pprint import urllib.parse apikey = 'sxxxxxxxxxxxxx' buffer = BytesIO() buffer1 = BytesIO() curl = pycurl.Curl() # Requete chez Gandi pour avoir l'ip du DNS curl.setopt(pycurl.HTTPHEADER, [ "X-Api-Key: " + apikey ]); curl.setopt(pycurl.WRITEDATA, buffer) curl.setopt(pycurl.URL, "https://dns.api.gandi.net/api/v5/domains/funambule.org/records/@/A") curl.perform() data = buffer.getvalue().decode('utf-8') datajs = json.loads(data) old_ip = datajs['rrset_values'][0] # Requete chez ifconfig pour avoir l'ip, la vraie curl.setopt(pycurl.URL, "https://ifconfig.me/all.json") curl.setopt(pycurl.HTTPHEADER, [ "X-Api-Key: " + apikey ]); curl.setopt(pycurl.WRITEDATA, buffer1) curl.perform() data1js = json.loads(buffer1.getvalue().decode('utf-8')) new_ip = data1js['ip_addr'] # Les deux sont-elles les memes ? if old_ip != new_ip: # NON - Je supprime l'ancienne adresse buffer2 = BytesIO() curl.setopt(pycurl.HTTPHEADER, [ "Content-Type: application/json", "X-Api-Key: " + apikey ]) curl.setopt(pycurl.CUSTOMREQUEST,'DELETE') curl.setopt(pycurl.WRITEDATA, buffer2) curl.setopt(pycurl.URL, "https://dns.api.gandi.net/api/v5/domains/funambule.org/records/@/A") curl.perform() print("DELETE -> " + buffer2.getvalue().decode('utf-8')) # Je remets new_ip post_data = {} post_data["rrset_ttl"] = 10800 post_data["rrset_values"] = [ new_ip ] postfields = json.dumps(post_data) buffer3 = BytesIO() curl.setopt(pycurl.HTTPHEADER, [ "Content-Type: application/json", "X-Api-Key: " + apikey ]) curl.setopt(pycurl.CUSTOMREQUEST,'PUT') curl.setopt(pycurl.POSTFIELDS, postfields) curl.setopt(pycurl.WRITEDATA, buffer3) curl.setopt(pycurl.URL, "https://dns.api.gandi.net/api/v5/domains/funambule.org/records/@/A") curl.perform() print("PUT -> " + buffer3.getvalue().decode('utf-8'))//
14 * * * * python3 /etc/dnsnew/manu_update.py