Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| tutoriel:internet:disque_internet:owncloud:raspi:start [2022/03/03 09:49] – [Autres étapes] admin | tutoriel:internet:disque_internet:owncloud:raspi:start [2022/08/13 22:27] (Version actuelle) – modification externe 127.0.0.1 | ||
|---|---|---|---|
| Ligne 68: | Ligne 68: | ||
| systemctl restart apache2 | systemctl restart apache2 | ||
| </ | </ | ||
| - | </ | + | - **Donnez |
| - | ===== Autres étapes ===== | + | - Éditez avec les droits d' |
| - | + | ||
| - | Tout d' | + | |
| - | <WRAP list-deep> | + | |
| - | - Éditez avec les droits d' | + | |
| auto eth0 | auto eth0 | ||
| iface eth0 inet static | iface eth0 inet static | ||
| Ligne 81: | Ligne 77: | ||
| | | ||
| | | ||
| - | | + | |
| - | - Mettez à jour le Pi et téléchargez le logiciel :<cli prompt=' | + | - **Mettez à jour le Pi** et téléchargez le logiciel :<cli prompt=' |
| - | - Installez Apache, SSL, PHP5, PHP APC qui chargeront les pages plus rapidement :<cli prompt=' | + | - **Installez Apache, SSL, PHP5, PHP APC** qui chargeront les pages plus rapidement :<cli prompt=' |
| + | - **Étape 3 : Configurez Php et Apache** : | ||
| + | - <cli prompt=' | ||
| + | Generating RSA private key, 1024 bit long modulus (2 primes) | ||
| + | .....................+++++ | ||
| + | ...............+++++ | ||
| + | e is 65537 (0x010001) | ||
| + | Enter pass phrase for server.key: | ||
| + | Verifying - Enter pass phrase for server.key: | ||
| + | pi@framboise4: | ||
| + | Enter pass phrase for server.key: | ||
| + | writing RSA key | ||
| + | pi@framboise4: | ||
| + | Enter pass phrase for server.key: | ||
| + | You are about to be asked to enter information that will be incorporated | ||
| + | into your certificate request. | ||
| + | What you are about to enter is what is called a Distinguished Name or a DN. | ||
| + | There are quite a few fields but you can leave some blank | ||
| + | For some fields there will be a default value, | ||
| + | If you enter ' | ||
| + | ----- | ||
| + | Country Name (2 letter code) [AU]:FR | ||
| + | State or Province Name (full name) [Some-State]: | ||
| + | Locality Name (eg, city) []: | ||
| + | Organization Name (eg, company) [Internet Widgits Pty Ltd]: | ||
| + | Organizational Unit Name (eg, section) []: | ||
| + | Common Name (e.g. server FQDN or YOUR name) []: | ||
| + | Email Address []: | ||
| + | |||
| + | Please enter the following ' | ||
| + | to be sent with your certificate request | ||
| + | A challenge password []:pass | ||
| + | An optional company name []: | ||
| + | pi@framboise4: | ||
| + | Signature ok | ||
| + | subject=C = FR, ST = Some-State, O = Internet Widgits Pty Ltd | ||
| + | Getting Private key | ||
| + | Enter pass phrase for server.key: | ||
| + | pi@framboise4: | ||
| + | pi@framboise4: | ||
| + | pi@framboise4: | ||
| + | ... | ||
| + | Enabling module ssl. | ||
| + | See / | ||
| + | To activate the new configuration, | ||
| + | systemctl restart apache2 | ||
| + | pi@framboise4: | ||
| + | Enabling site default-ssl. | ||
| + | To activate the new configuration, | ||
| + | systemctl restart apache2 | ||
| + | </ | ||
| + | ; first used (Just In Time) instead of when the script starts. If these | ||
| + | ; variables are not used within a script, having this directive on will result | ||
| + | ; in a performance gain. The PHP directive register_argc_argv must be disabled | ||
| + | ; for this directive to have any affect. | ||
| + | ; http:// | ||
| + | auto_globals_jit = On | ||
| + | ; Whether PHP will read the POST data. | ||
| + | ; This option is enabled by default. | ||
| + | ; Most Likely, you won't want to disable this option globally. It causes $_POST | ||
| + | ; and $_FILES to always be empty: the only way you will be able to read the | ||
| + | ; POST data will be through the php://input stream wrapper. This can be useful | ||
| + | ; to proxy requests or to process the POST data in a memory efficient fashion. | ||
| + | ; http:// | ||
| + | ; | ||
| + | |||
| + | ; Maximum size of POST data that PHP will accept. | ||
| + | ; Its value may be 0 to disable the limit. It is ignored if POST data reading | ||
| + | ; is disabled through enable_post_data_reading. | ||
| + | ; http:// | ||
| + | post_max_size = 120M | ||
| + | |||
| + | ; Automatically add files before PHP document. | ||
| + | ; http:// | ||
| + | auto_prepend_fite = | ||
| + | |||
| + | ; Automatically add files after PHP document. | ||
| + | ; http:// | ||
| + | auto_append_file = | ||
| + | |||
| + | ; By default, PHP will output a character encoding using | ||
| + | ; the Content-type: | ||
| + | ; set it to be empty. | ||
| + | ; | ||
| + | ; PHP's built-in default is text/html | ||
| + | ; http:// | ||
| + | default_mimetype = " | ||
| + | |||
| + | ; PHP's default character set is set to empty. | ||
| + | ; http:// | ||
| + | ; | ||
| + | |||
| + | ; Always populate the $HTTP_RAW_POST_DATA variable. PHP's default behavior is | ||
| + | |||
| + | ;;;;;;;;;;;;;;;;;;;;;;;; | ||
| + | |||
| + | ; Whether to allow HTTP file uploads. | ||
| + | ; http:// | ||
| + | file_uploads = On | ||
| + | |||
| + | ; Temporary directory for HTTP uploaded files (will use system default if not | ||
| + | ; specified). | ||
| + | ; http:// | ||
| + | ; | ||
| + | |||
| + | ; Maximum allowed size for uploaded files. | ||
| + | ; http:// | ||
| + | upload_max_filesize = 1024M | ||
| + | |||
| + | ; Maximum number of files that can be uploaded via a single request | ||
| + | max_file_uploads = 20 | ||
| + | |||
| + | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| + | ; Fopen wrappers ; | ||
| + | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| + | |||
| + | ; Whether to allow the treatment of URLs (like http:// or ftp://) as files. | ||
| + | ; http:// | ||
| + | allow_url_fopen = On | ||
| + | |||
| + | ; Whether to allow include/ | ||
| + | ; http:// | ||
| + | allow_url_include = Off | ||
| + | |||
| + | ; Define the anonymous ftp password (your email address). PHP's default setting | ||
| + | ; for this is empty. | ||
| + | ; http:// | ||
| + | ; from=" | ||
| + | |||
| + | ; Define the User-Agent string. PHP's default setting for this is empty. | ||
| + | ; http:// | ||
| + | ; | ||
| + | |||
| + | ; Default timeout for socket based streams (seconds) | ||
| + | ; http:// | ||
| + | default_socket_timeout = 60 | ||
| + | |||
| + | ; If your scripts have to deal with files from Macintosh systems, | ||
| + | ; or you are running on a Mac and need to deal with files from</ | ||
| + | - **Nous avons téléchargé le logiciel qu'il nous faut configurer.** | ||
| + | - Tout d' | ||
| + | WARNING: " | ||
| + | WARNING: channel " | ||
| + | downloading APC-3.1.13.tgz ... | ||
| + | Starting to download APC-3.1.13.tgz (171,591 bytes) | ||
| + | ........done: | ||
| + | 55 source files, building | ||
| + | running: phpize | ||
| + | Configuring for: | ||
| + | PHP Api Version: | ||
| + | Zend Module Api No: 20180731 | ||
| + | Zend Extension Api No: | ||
| + | Enable internal debugging in APC [no] : | ||
| + | Enable per request file info about files used from the APC cache [no] : | ||
| + | Enable spin locks (EXPERIMENTAL) [no] : | ||
| + | Enable memory protection (EXPERIMENTAL) [no] : | ||
| + | Enable pthread mutexes (default) [no] : | ||
| + | Enable pthread read/write locks (EXPERIMENTAL) [yes] : | ||
| + | building in / | ||
| + | running: / | ||
| + | checking for grep that handles long lines and -e... / | ||
| + | checking for egrep... / | ||
| + | checking for a sed that does not truncate output... / | ||
| + | checking for cc... cc | ||
| + | checking whether the C compiler works... yes | ||
| + | checking for C compiler default output file name... a.out | ||
| + | checking for suffix of executables... | ||
| + | checking whether we are cross compiling... no | ||
| + | checking for suffix of object files... o | ||
| + | checking whether we are using the GNU C compiler... yes | ||
| + | checking whether cc accepts -g... yes | ||
| + | checking for cc option to accept ISO C89... none needed | ||
| + | checking how to run the C preprocessor... cc -E | ||
| + | checking for icc... no | ||
| + | checking for suncc... no | ||
| + | checking whether cc understands -c and -o together... yes | ||
| + | checking for system library directory... lib | ||
| + | checking if compiler supports -R... no | ||
| + | checking if compiler supports -Wl, | ||
| + | checking build system type... armv7l-unknown-linux-gnueabihf | ||
| + | checking host system type... armv7l-unknown-linux-gnueabihf | ||
| + | checking target system type... armv7l-unknown-linux-gnueabihf | ||
| + | checking for PHP prefix... /usr | ||
| + | checking for PHP includes... -I/ | ||
| + | checking for PHP extension directory... / | ||
| + | checking for PHP installed headers prefix... / | ||
| + | checking if debug is enabled... no | ||
| + | checking if zts is enabled... no | ||
| + | checking for re2c... no | ||
| + | configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers. | ||
| + | checking for gawk... gawk | ||
| + | checking whether to enable APC support... yes, shared | ||
| + | checking whether we should enable cache request file info... no | ||
| + | checking whether we should use mmap... yes | ||
| + | checking whether we should use semaphore locking instead of fcntl... no | ||
| + | checking whether we should use pthread mutex locking... no | ||
| + | checking whether we should use pthread read/write locking... yes | ||
| + | pthread rwlocks are supported! | ||
| + | checking whether the target compiler supports builtin atomics... yes | ||
| + | checking whether we should use spin locks... no | ||
| + | checking whether we should enable memory protection... no | ||
| + | checking for zend_set_lookup_function_hook... no | ||
| + | checking for sigaction... yes | ||
| + | checking for union semun... no | ||
| + | checking whether we should enable valgrind support... checking for ANSI C header files... yes | ||
| + | checking for sys/ | ||
| + | checking for sys/ | ||
| + | checking for stdlib.h... yes | ||
| + | checking for string.h... yes | ||
| + | checking for memory.h... yes | ||
| + | checking for strings.h... yes | ||
| + | checking for inttypes.h... yes | ||
| + | checking for stdint.h... yes | ||
| + | checking for unistd.h... yes | ||
| + | yes | ||
| + | checking valgrind/ | ||
| + | checking valgrind/ | ||
| + | checking for valgrind/ | ||
| + | checking for shm_open in -lrt... yes | ||
| + | checking whether to include code coverage symbols... no | ||
| + | checking how to print strings... printf | ||
| + | checking for a sed that does not truncate output... (cached) / | ||
| + | checking for fgrep... / | ||
| + | checking for ld used by cc... / | ||
| + | checking if the linker (/ | ||
| + | checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B | ||
| + | checking the name lister (/ | ||
| + | checking whether ln -s works... yes | ||
| + | checking the maximum length of command line arguments... 1572864 | ||
| + | checking how to convert armv7l-unknown-linux-gnueabihf file names to armv7l-unknown-linux-gnueabihf format... func_convert_file_noop | ||
| + | checking how to convert armv7l-unknown-linux-gnueabihf file names to toolchain format... func_convert_file_noop | ||
| + | checking for /usr/bin/ld option to reload object files... -r | ||
| + | checking for objdump... objdump | ||
| + | checking how to recognize dependent libraries... pass_all | ||
| + | checking for dlltool... no | ||
| + | checking how to associate runtime and link libraries... printf %s\n | ||
| + | checking for ar... ar | ||
| + | checking for archiver @FILE support... @ | ||
| + | checking for strip... strip | ||
| + | checking for ranlib... ranlib | ||
| + | checking for gawk... (cached) gawk | ||
| + | checking command to parse /usr/bin/nm -B output from cc object... ok | ||
| + | checking for sysroot... no | ||
| + | checking for a working dd... / | ||
| + | checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1 | ||
| + | checking for mt... mt | ||
| + | checking if mt is a manifest tool... no | ||
| + | checking for dlfcn.h... yes | ||
| + | checking for objdir... .libs | ||
| + | checking if cc supports -fno-rtti -fno-exceptions... no | ||
| + | checking for cc option to produce PIC... -fPIC -DPIC | ||
| + | checking if cc PIC flag -fPIC -DPIC works... yes | ||
| + | checking if cc static flag -static works... yes | ||
| + | checking if cc supports -c -o file.o... yes | ||
| + | checking if cc supports -c -o file.o... (cached) yes | ||
| + | checking whether the cc linker (/ | ||
| + | checking whether -lc should be explicitly linked in... no | ||
| + | checking dynamic linker characteristics... GNU/Linux ld.so | ||
| + | checking how to hardcode library paths into programs... immediate | ||
| + | checking whether stripping libraries is possible... yes | ||
| + | checking if libtool supports shared libraries... yes | ||
| + | checking whether to build shared libraries... yes | ||
| + | checking whether to build static libraries... no | ||
| + | configure: creating ./ | ||
| + | config.status: | ||
| + | config.status: | ||
| + | running: make | ||
| + | /bin/bash / | ||
| + | libtool: compile: | ||
| + | In file included from / | ||
| + | from / | ||
| + | from / | ||
| + | from / | ||
| + | / | ||
| + | / | ||
| + | # | ||
| + | | ||
| + | / | ||
| + | if (zend_get_constant(APC_SERIALIZER_CONSTANT, | ||
| + | | ||
| + | In file included from / | ||
| + | from / | ||
| + | from / | ||
| + | / | ||
| + | | ||
| + | ^~~~~~~~~~~~~~~~~ | ||
| + | In file included from / | ||
| + | from / | ||
| + | from / | ||
| + | from / | ||
| + | / | ||
| + | if (zend_get_constant(APC_SERIALIZER_CONSTANT, | ||
| + | | ||
| + | In file included from / | ||
| + | from / | ||
| + | from / | ||
| + | / | ||
| + | | ||
| + | ^~~~~~~~~~~~~~~~~ | ||
| + | In file included from / | ||
| + | / | ||
| + | / | ||
| + | | ||
| + | | ||
| + | / | ||
| + | # | ||
| + | | ||
| + | compilation terminated. | ||
| + | make: *** [Makefile: | ||
| + | ERROR: `make' failed</ | ||
| + | - Cela fait, nous devons créer avec les droits d' | ||
| + | apc.enabled=1 | ||
| + | apc.shm_size=30</ | ||
| + | - Ensuite, Éditez avec les droits d' | ||
| + | - nous devons modifier le PHP.ini pour modifier le fichier de téléchargement maximal afin que nous puissions ajouter un fichier volumineux et ajouter l' | ||
| + | - Changez la valeur de **upload_max_filesize** en 1024M, ce qui permettra de télécharger des fichiers jusqu' | ||
| + | - Changez la valeur de **post_max_size** en 1200m, ce qui permettra de télécharger des fichiers jusqu' | ||
| + | - Dans la section extension=, ajoutez extension=apc.so | ||
| + | - Ensuite, nous devons configurer apache et activer SSL. Éditez avec les droits d' | ||
| + | - changez Allow override to All de none | ||
| + | - Ensuite, nous devons installer SSL | ||
| + | - <cli prompt=' | ||
| + | pi@framboise4: | ||
| + | - Après la commande suivante, il vous sera demandé de fournir des informations :<cli prompt=' | ||
| + | - Une fois que tout cela est fait, apache doit redémarrer :<cli prompt=' | ||
| + | - **Étape 4 : Téléchargez et installez OwnCloud**< | ||
| + | ErrorDocument 403 / | ||
| + | ErrorDocument 404 / | ||
| + | < | ||
| + | php_value upload_max_filesize 512M | ||
| + | php_value post_max_size 512M | ||
| + | php_value memory_limit 512M | ||
| + | < | ||
| + | SetEnv htaccessWorking true | ||
| + | </ | ||
| + | </ | ||
| + | < | ||
| + | RewriteEngine on | ||
| + | RewriteRule .* - [env=HTTP_AUTHORIZATION: | ||
| + | RewriteRule ^.well-known/ | ||
| + | RewriteRule ^.well-known/ | ||
| + | RewriteRule ^.well-known/ | ||
| + | RewriteRule ^apps/ | ||
| + | RewriteRule ^remote/ | ||
| + | </ | ||
| + | Options =Indexes</ | ||
| + | - Maintenant que nous avons configuré Apache et PHP, nous devons télécharger owncloud :<cli prompt=' | ||
| + | - une fois téléchargé, | ||
| + | - Et puis copier dans la racine Web :<cli prompt=' | ||
| + | - Une fois qu'il a été copié, nous devons autoriser le serveur Web à accéder au répertoire owncloud :<cli prompt=' | ||
| + | - Nous devons également modifier le fichier **/ | ||
| + | - **Step 5: Configurez OwnCloud**{{ : | ||
| + | - Le moyen le plus simple de configurer le lecteur externe consiste à utiliser gparted sur le Pi<cli prompt=' | ||
| + | - Une fois cela fait, réglez les permissions pour le serveur Web :<cli prompt=' | ||
| + | - dans un navigateur web tapez [[https:// | ||
| + | - Choisissez un nom d' | ||
| + | - cliquez sur avancé et modifiez l' | ||
| + | - Un clic sur terminé et le tour est joué. Vous devriez maintenant pouvoir télécharger des fichiers. Pour lire des fichiers vidéo, vous devez activer l' | ||
| + | - Pour configurer l' | ||
| + | - **Étape 6 : Placement dans le boîtier** :{{ : | ||
| </ | </ | ||
| + | ===== Autres étapes ===== | ||
| + | |||
| + | |||
| ===== Conclusion ===== | ===== Conclusion ===== | ||