Etape n°1 : Installation de l’OS ( 2018-06-27-raspbian-stretch-lite.img ) sur la carte SD ( Avec ApplePi si vous êtes sous MacOS ) .
-> Voir : https://www.cyber-neurones.org/2018/09/raspberry-mac-os-applepi-baker-creer-une-carte-sd-pour-le-raspberry/ .
$ hostnamectl
Static hostname: raspberrypi
Icon name: computer
Machine ID: 0f6c6ab22a3449b586fc81ca195ae839
Boot ID: d83331ef484a4e6a94bcdf486eb270c1
Operating System: Raspbian GNU/Linux 9 (stretch)
Kernel: Linux 4.14.50-v7+
Architecture: arm
Etape n°2 : Changement de l’IP.
-> Voir : https://www.cyber-neurones.org/2018/09/raspberry-configuration-reseau-sur-une-raspbian-gnu-linux-9-stretch-avec-une-freebox/ .
Modification de /etc/dhcpcd.conf , mais aussi de /etc/hostname (pour le nom RASP7, et oui le 7ème Raspberry : 192.168.0.75 ) . Le login : pi et le mot de passe raspberry (enfin rqspberry )
Et lancement du service ssh ( afin de supprimer écran/clavier et faire à distance ).
$ sudo systemctl enable ssh.service
$ sudo systemctl start ssh.service
$ sudo apt-get update
Changement du mot de passe ( commande passwd ) … et reboot.
Etape n°3 : Installation de OwnCloud
Installation du package :
$ sudo apt-get upgrade
$ sudo apt-get install owncloud
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
owncloud : Depends: php-assetic but it is not going to be installed
Depends: php-doctrine-dbal (< 2.5) but 2.5.4-2 is to be installed
Depends: php-opencloud but it is not going to be installed
Depends: php-pimple (< 2) but it is not going to be installed Depends: php5 (>= 5.3.8) but it is not installable
Depends: php5-cli but it is not installable
Depends: php5-gd but it is not installable
Depends: php5-json but it is not installable
Depends: php5-mysql but it is not installable or
php5-pgsql but it is not installable or
php5-sqlite but it is not installable
Recommends: exim4 but it is not going to be installed or
mail-transport-agent
Recommends: php-aws-sdk (< 3) but it is not going to be installed Recommends: php-crypt-blowfish (>= 1.1.0~RC2-2~) but it is not going to be installed
Recommends: php-dropbox but it is not going to be installed
Recommends: php-google-api-php-client (< 1) but it is not going to be installed
Recommends: php5-apcu but it is not installable or
php5-xcache but it is not installable
Recommends: php5-curl but it is not installable
Recommends: php5-imap but it is not installable
Recommends: php5-intl but it is not installable
Recommends: php5-ldap but it is not installable
Recommends: php5-mcrypt but it is not installable
C’est ce que j’appelle un mauvais départ 😉
Bizarre l’erreur quand je vois un article : https://owncloud.org/news/php-7-is-here-and-owncloud-is-ready/ : PHP 7 Is Here And ownCloud Is Ready .
Je commence donc par :
$ sudo apt-get install php
$ sudo apt-get install smbclient
$ sudo apt-get install exim4
Pour rappel, je suis en version « stretch » :
$ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Je continue donc avec l’installation de MariaDB ( MySQL ) :
$ sudo apt install -y apache2 mariadb-server libapache2-mod-php7.0 php7.0-gd php7.0-json php7.0-mysql php7.0-curl php7.0-intl php7.0-mcrypt php-imagick php7.0-zip php7.0-xml php7.0-mbstring
...
$ sudo apt-get install -y php php-gd php-curl php-zip php-dom php-xml php-simplexml php-mbstring
Ensuite :
$ cd /tmp
$ wget https://download.owncloud.org/community/owncloud-10.0.10.tar.bz2
$ cd /var/www/html
$ sudo tar xjf /tmp/owncloud-10.0.10.tar.bz2
$ sudo chown -R www-data:www-data owncloud
$ sudo chmod -R 755 owncloud
$ sudo rm -f /tmp/owncloud-10.0.10.tar.bz2
Etape n°4 : Configuration de la base de donnée
$ sudo mysql --user=root
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 7
Server version: 10.1.23-MariaDB-9+deb9u1 Raspbian 9.0
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> CREATE DATABASE owncloud;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> GRANT ALL ON owncloud.* to 'owncloud'@'localhost' IDENTIFIED BY '_password_';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> quit
Bye
pi@raspb
Etape n°5 : Lancement du site : http://192.168.0.xx/owncloud/index.php
Aie …
Un reboot s’impose.
Après le reboot c’est nettement mieux :
Et c’est fini :
Etape n°6 : J’installe toujours Munin sur mes serveurs :
Le client MUNIN :
$ sudo apt-get install munin munin-node munin-plugins-extra libnet-snmp-perl
$ sudo nano /etc/munin/munin-node.conf
...
allow ^127\.0\.0\.1$
allow ^192\.168\.0\.80$
allow ^::1$
...
$ sudo munin-node-configure --shell | sh -x
Sur mon serveur MUNI N:
$ sudo vi /etc/munin/munin.conf
...
[RASP7-OWNCLOUD]
address 192.168.0.75
use_node_name yes
...
$ sudo su - munin --shell=/bin/bash
$ /usr/share/munin/munin-update --nofork --debug
$ exit
$ sudo service munin-node restart
A suivre :
Il va falloir remplir le disque maintenant :
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 59G 1.9G 55G 4% /
devtmpfs 460M 0 460M 0% /dev
tmpfs 464M 0 464M 0% /dev/shm
tmpfs 464M 6.3M 458M 2% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 464M 0 464M 0% /sys/fs/cgroup
/dev/mmcblk0p1 43M 22M 21M 52% /boot
tmpfs 93M 0 93M 0% /run/user/1000
Un petit glisser coller de 5 Go avec plus de 8000 fichiers :
Voici les graphiques Munin suite au transfert :
J’aime ça :
J’aime chargement…