04-03-2022
This commit is contained in:
@@ -9,8 +9,8 @@ https://github.com/laurent22/joplin/blob/dev/packages/server/README.md
|
||||
#### Créer les dossiers:
|
||||
|
||||
```bash
|
||||
$ mkdir /volume1/docker/joplin
|
||||
$ mkdir /volume1/docker/joplin/data
|
||||
mkdir /volume1/docker/joplin
|
||||
mkdir /volume1/docker/joplin/data
|
||||
```
|
||||
|
||||
#### Créer le fichier `docker-compose.yml` dans `/volume1/docker/joplin`:
|
||||
@@ -19,7 +19,7 @@ $ mkdir /volume1/docker/joplin/data
|
||||
$ nano docker-compose.yml
|
||||
```
|
||||
|
||||
```yaml
|
||||
```yaml title="docker-compose.yml"
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
@@ -56,7 +56,8 @@ services:
|
||||
#### Créer le container:
|
||||
|
||||
```bash
|
||||
$ sudo docker-compose up -d
|
||||
sudo docker-compose up -d
|
||||
|
||||
Creating network "joplin_default" with the default driver
|
||||
Pulling app (joplin/server:latest)...
|
||||
latest: Pulling from joplin/server
|
||||
@@ -71,7 +72,7 @@ Le serveur est disponible en local sur: http://dsm916.local:22300
|
||||
|
||||
#### Créer une règle de proxy-inverse:
|
||||
|
||||
Panneau de configuration -> Portail des applications -> Proxy inversé -> Créer:
|
||||
Panneau de configuration :material-arrow-right: Portail des applications :material-arrow-right: Proxy inversé :material-arrow-right: Créer:
|
||||
|
||||
Source:
|
||||
|
||||
@@ -93,8 +94,9 @@ On se connecte à https://clicclac.synology.me:22301/login en administrateur ave
|
||||
#### Voir les logs:
|
||||
|
||||
```bash
|
||||
$ sudo docker-compose --file docker-compose.yml logs
|
||||
sudo docker-compose --file docker-compose.yml logs
|
||||
Password:
|
||||
|
||||
Attaching to joplin_app_1, joplin_db_1
|
||||
app_1 | WARNING: no logs are available with the 'db' log driver
|
||||
db_1 | WARNING: no logs are available with the 'db' log driver
|
||||
@@ -104,7 +106,7 @@ db_1 | WARNING: no logs are available with the 'db' log driver
|
||||
|
||||
### Application Joplin
|
||||
|
||||
Préférences -> Synchronisation:
|
||||
Préférences :material-arrow-right: Synchronisation:
|
||||
|
||||
Cible de la synchronisation: Joplin Server
|
||||
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
|
||||
|
||||
#### Paquet opkg
|
||||
### Paquet opkg
|
||||
|
||||
Formats supportés:
|
||||
```bash title="Formats supportés"
|
||||
magick --version
|
||||
identify --version
|
||||
|
||||
```bash
|
||||
$ magick --version
|
||||
$ identify --version
|
||||
Version: ImageMagick 7.0.9-5 Q8 x86_64 2021-04-19 https://imagemagick.org
|
||||
Copyright: © 1999-2019 ImageMagick Studio LLC
|
||||
License: https://imagemagick.org/script/license.php
|
||||
@@ -17,18 +16,18 @@ Delegates (built-in): freetype jng jpeg ltdl png tiff zlib
|
||||
|
||||
|
||||
```bash
|
||||
$ identify /volume1/web/IMG_0636.HEIC
|
||||
identify /volume1/web/IMG_0636.HEIC
|
||||
|
||||
identify: NoDecodeDelegateForThisImageFormat `HEIC' @ error/constitute.c/ReadImage/562.
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Paquet SynoCommunity
|
||||
### Paquet SynoCommunity
|
||||
|
||||
Formats supportés:
|
||||
```bash title="Formats supportés"
|
||||
/usr/local/bin/magick --version
|
||||
|
||||
```bash
|
||||
$ /usr/local/bin/magick --version
|
||||
Version: ImageMagick 7.0.11-6 Q16 x86_64 2021-03-28 https://imagemagick.org
|
||||
Copyright: (C) 1999-2021 ImageMagick Studio LLC
|
||||
License: https://imagemagick.org/script/license.php
|
||||
@@ -39,7 +38,8 @@ Delegates (built-in): bzlib fontconfig freetype heic jng jp2 jpeg lcms ltdl lzma
|
||||
|
||||
|
||||
```bash
|
||||
$ /usr/local/bin/identify /volume1/web/IMG_0636.HEIC
|
||||
/usr/local/bin/identify /volume1/web/IMG_0636.HEIC
|
||||
|
||||
identify: UnableToOpenModuleFile '/var/services/homes/bruno/.config/ImageMagick/heic.la': No such file or directory @ warning/module.c/GetMagickModulePath/823.
|
||||
identify: NoDecodeDelegateForThisImageFormat `HEIC' @ error/constitute.c/ReadImage/572.
|
||||
```
|
||||
@@ -47,24 +47,38 @@ identify: NoDecodeDelegateForThisImageFormat `HEIC' @ error/constitute.c/ReadIma
|
||||
|
||||
|
||||
```bash
|
||||
$ identify /volume1/web/IMG_0636.HEIC
|
||||
identify /volume1/web/IMG_0636.HEIC
|
||||
|
||||
identify: DecoderNotActivated `/volume1/web/IMG_0636.HEIC' @ error/heic.c/ReadHEICImage/186.
|
||||
```
|
||||
|
||||
https://unix.stackexchange.com/questions/96004/imagemagick-on-open-wrt-router-unabletoopenconfigurefile
|
||||
|
||||
```bash
|
||||
$ /usr/local/bin/identify -list format
|
||||
/usr/local/bin/identify -list format
|
||||
|
||||
Format Module Mode Description
|
||||
-------------------------------------------------------------------------------
|
||||
3FR DNG r-- Hasselblad CFV/H3D39II
|
||||
3G2 VIDEO r-- Media Container
|
||||
.../...
|
||||
YCbCrA* YCbCr rw+ Raw Y, Cb, Cr, and alpha samples
|
||||
YUV* YUV rw- CCIR 601 4:1:1 or 4:2:2
|
||||
|
||||
* native blob support
|
||||
r read support
|
||||
w write support
|
||||
+ support for multiple images
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Debug
|
||||
### Debug
|
||||
|
||||
$ identify -debug configure -list configure
|
||||
`identify -debug configure -list configure`
|
||||
|
||||
```bash
|
||||
$ /usr/local/bin/identify -debug configure -list configure
|
||||
/usr/local/bin/identify -debug configure -list configure
|
||||
2021-07-10T09:22:23+00:00 0:00.001 0.000u 7.0.11 Configure identify[6366]: utility.c/ExpandFilenames/971/Configure
|
||||
Command line: /usr/local/bin/identify {-debug} {configure} {-list} {configure}
|
||||
2021-07-10T09:22:23+00:00 0:00.001 0.000u 7.0.11 Configure identify[6366]: configure.c/GetConfigureOptions/675/Configure
|
||||
@@ -90,24 +104,16 @@ QuantumDepth Q16
|
||||
identify: UnableToOpenConfigureFile `configure.xml' @ warning/configure.c/GetConfigureOptions/702.
|
||||
```
|
||||
|
||||
|
||||
|
||||
Fichiers xml
|
||||
|
||||
```bash
|
||||
```bash title="Fichiers xml"
|
||||
/var/packages/imagemagick/target/etc/ImageMagick-7
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Mac / Homebrew
|
||||
|
||||
|
||||
|
||||
|
||||
Homebrew
|
||||
|
||||
```
|
||||
#/var/packages/imagemagick/target/lib/ImageMagick-7.0.11/modules-Q16HDRI/coders
|
||||
```bash title="Homebrew"
|
||||
# /var/packages/imagemagick/target/lib/ImageMagick-7.0.11/modules-Q16HDRI/coders
|
||||
/usr/local/Cellar/imagemagick/7.1.0-2_1/lib/ImageMagick/modules-Q16HDRI
|
||||
-rwxr-xr-x 1 bruno staff 1352 Jul 7 07:26 heic.la
|
||||
-r--r--r-- 1 bruno staff 73432 Jul 7 07:26 heic.so
|
||||
|
||||
@@ -37,7 +37,7 @@ root:x:0:0:root:/root:/bin/bash
|
||||
!!! attention "Attention, une m-à-j Synology peut supprimer /opt/bin/bash."
|
||||
Aussi, il est préférable de garder ash pour se logger et de démarrer bash ensuite.
|
||||
|
||||
On va éditer le fichier .profile
|
||||
On va éditer le fichier `.profile`:
|
||||
|
||||
```bash
|
||||
DiskStation$> nano .profile
|
||||
@@ -53,13 +53,15 @@ fi
|
||||
|
||||
------
|
||||
|
||||
Pour configurer bash, on va créer un fichier .bashrc
|
||||
### Configurer bash:
|
||||
|
||||
On va créer un fichier .bashrc:
|
||||
|
||||
```bash
|
||||
DiskStation$> nano .bashrc
|
||||
```
|
||||
|
||||
et y ajouter
|
||||
et y ajouter:
|
||||
|
||||
```bash
|
||||
#prompt
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
|
||||
|
||||
|
||||
Ouvrir la crontab:
|
||||
|
||||
```bash
|
||||
```bash title="Connexion en root"
|
||||
bruno@DS916:~ $ sudo -i
|
||||
Password:
|
||||
root@DS916:~# nano /etc/crontab
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
Redémarrer le service cron:
|
||||
```bash title="Ouvrir la crontab"
|
||||
root@DS916:~# nano /etc/crontab
|
||||
```
|
||||
|
||||
```bash
|
||||
|
||||
|
||||
```bash title="Redémarrer le service cron"
|
||||
root@DS916:~# synoservice -restart crond
|
||||
```
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ DS414> synoservicecfg --restart syslog-acc
|
||||
|
||||
```bash
|
||||
# echec pour un problème de signature
|
||||
$ sudo dpkg -i nano_2.7.4-1_i386.deb
|
||||
sudo dpkg -i nano_2.7.4-1_i386.deb
|
||||
Password:
|
||||
Authenticating nano_2.7.4-1_i386.deb ...
|
||||
debsig: Origin Signature check failed. This deb might not be signed.
|
||||
@@ -134,7 +134,7 @@ Errors were encountered while processing:
|
||||
nano_2.7.4-1_i386.deb
|
||||
|
||||
# option --force-bad-verify
|
||||
$ sudo dpkg -i --force-bad-verify nano_2.7.4-1_amd64.deb
|
||||
sudo dpkg -i --force-bad-verify nano_2.7.4-1_amd64.deb
|
||||
Authenticating nano_2.7.4-1_amd64.deb ...
|
||||
debsig: Origin Signature check failed. This deb might not be signed.
|
||||
|
||||
@@ -144,7 +144,7 @@ Selecting previously unselected package nano.
|
||||
Unpacking nano (from nano_2.7.4-1_amd64.deb) ...
|
||||
|
||||
# supprimer le paquet debsig-verify
|
||||
$ dpkg --purge dpkg-verify
|
||||
dpkg --purge dpkg-verify
|
||||
```
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ $ dpkg --purge dpkg-verify
|
||||
### Installer manuellement un paquet .spk
|
||||
|
||||
```bash
|
||||
$ sudo synopkg install <package.spk>
|
||||
sudo synopkg install <package.spk>
|
||||
```
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@ service [pkgctl-Apache2.2] restart failed, synoerr=[0x2000]
|
||||
#### Liste des modules Apache:
|
||||
|
||||
```bash
|
||||
$ httpd22 -M
|
||||
httpd22 -M
|
||||
Loaded Modules:
|
||||
core_module (static)
|
||||
mpm_worker_module (static)
|
||||
@@ -208,7 +208,7 @@ Loaded Modules:
|
||||
### php7.0
|
||||
|
||||
```bash
|
||||
$ php70 --ini
|
||||
php70 --ini
|
||||
Configuration File (php.ini) Path: /usr/local/etc/php70
|
||||
Loaded Configuration File: /usr/local/etc/php70/php.ini
|
||||
Scan for additional .ini files in: /usr/local/etc/php70/conf.d
|
||||
@@ -230,7 +230,7 @@ Web Station -> Paramètres PHP-> Paramètres Avancés -> Coeur -> error_log
|
||||
#### Connaitre les extensions chargées par PHP CLI:
|
||||
|
||||
```bash
|
||||
$ php -m
|
||||
php -m
|
||||
[PHP Modules]
|
||||
apcu
|
||||
bz2
|
||||
@@ -327,15 +327,15 @@ Pour Apache, c'est la version choisie dans WebStation qui est active.
|
||||
<u>En ligne de commande, par défaut, c'est la version Busybox qui est active:</u>
|
||||
|
||||
```bash
|
||||
$ which php
|
||||
which php
|
||||
/bin/php
|
||||
|
||||
$ /bin/php -v
|
||||
/bin/php -v
|
||||
PHP 7.3.16 (cli) (built: Sep 14 2020 18:32:16) ( NTS )
|
||||
Copyright (c) 1997-2018 The PHP Group
|
||||
Zend Engine v3.3.16, Copyright (c) 1998-2018 Zend Technologies
|
||||
|
||||
$ /bin/php --ini
|
||||
/bin/php --ini
|
||||
Configuration File (php.ini) Path: /usr/local/etc/php73/cli
|
||||
Loaded Configuration File: /usr/local/etc/php73/cli/php.ini
|
||||
Scan for additional .ini files in: /usr/local/etc/php73/cli/conf.d
|
||||
@@ -343,76 +343,80 @@ Additional .ini files parsed: /usr/local/etc/php73/cli/conf.d/extension.ini
|
||||
/usr/local/etc/php73/cli/conf.d/timezone.ini
|
||||
```
|
||||
|
||||
Les 2 autres versions sont néanmoins disponibles:
|
||||
D'autres versions sont néanmoins disponibles:
|
||||
|
||||
```bash
|
||||
$ which php70
|
||||
```bash title="PHP 7.0"
|
||||
which php70
|
||||
/usr/local/bin/php70
|
||||
|
||||
$ php70 -v
|
||||
php70 -v
|
||||
PHP 7.0.33 (cli) (built: Dec 13 2018 12:30:20) ( NTS )
|
||||
Copyright (c) 1997-2017 The PHP Group
|
||||
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
|
||||
with Zend OPcache v7.0.33, Copyright (c) 1999-2017, by Zend Technologies
|
||||
|
||||
$ php70 --ini
|
||||
php70 --ini
|
||||
Configuration File (php.ini) Path: /usr/local/etc/php70
|
||||
Loaded Configuration File: /usr/local/etc/php70/php.ini
|
||||
Scan for additional .ini files in: /usr/local/etc/php70/conf.d
|
||||
Additional .ini files parsed: /usr/local/etc/php70/conf.d/SYNO.SDS.PhotoStation.ini
|
||||
```
|
||||
|
||||
|
||||
$ which php72
|
||||
```bash title="PHP 7.2"
|
||||
which php72
|
||||
/usr/local/bin/php72
|
||||
|
||||
$ php72 -v
|
||||
php72 -v
|
||||
PHP 7.2.29 (cli) (built: Jun 5 2020 14:21:39) ( NTS )
|
||||
Copyright (c) 1997-2018 The PHP Group
|
||||
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
|
||||
|
||||
$ php72 --ini
|
||||
php72 --ini
|
||||
Configuration File (php.ini) Path: /usr/local/etc/php72/cli
|
||||
Loaded Configuration File: /usr/local/etc/php72/cli/php.ini
|
||||
Scan for additional .ini files in: /usr/local/etc/php72/cli/conf.d
|
||||
Additional .ini files parsed: /usr/local/etc/php72/cli/conf.d/extension.ini,
|
||||
/usr/local/etc/php72/cli/conf.d/phpMyAdmin.ini,
|
||||
/usr/local/etc/php72/cli/conf.d/timezone.ini
|
||||
```
|
||||
|
||||
|
||||
$ which php73
|
||||
```bash title="PHP 7.3"
|
||||
which php73
|
||||
/usr/local/bin/php73
|
||||
|
||||
$ php73 -v
|
||||
php73 -v
|
||||
PHP 7.3.16 (cli) (built: Sep 14 2020 18:32:16) ( NTS )
|
||||
Copyright (c) 1997-2018 The PHP Group
|
||||
Zend Engine v3.3.16, Copyright (c) 1998-2018 Zend Technologies
|
||||
|
||||
$ php73 --ini
|
||||
php73 --ini
|
||||
Configuration File (php.ini) Path: /usr/local/etc/php73/cli
|
||||
Loaded Configuration File: /usr/local/etc/php73/cli/php.ini
|
||||
Scan for additional .ini files in: /usr/local/etc/php73/cli/conf.d
|
||||
Additional .ini files parsed: /usr/local/etc/php73/cli/conf.d/extension.ini,
|
||||
/usr/local/etc/php73/cli/conf.d/timezone.ini
|
||||
```
|
||||
|
||||
|
||||
$ which php74
|
||||
```bash title="PHP 7.3"
|
||||
which php74
|
||||
/usr/local/bin/php74
|
||||
|
||||
$ php74 -v
|
||||
php74 -v
|
||||
PHP 7.4.9 (cli) (built: Oct 14 2020 15:15:33) ( NTS )
|
||||
Copyright (c) The PHP Group
|
||||
Zend Engine v3.4.0, Copyright (c) Zend Technologies
|
||||
|
||||
$ php74 --ini
|
||||
php74 --ini
|
||||
Configuration File (php.ini) Path: /usr/local/etc/php74/cli
|
||||
Loaded Configuration File: /usr/local/etc/php74/cli/php.ini
|
||||
Scan for additional .ini files in: /usr/local/etc/php74/cli/conf.d
|
||||
Additional .ini files parsed: /usr/local/etc/php74/cli/conf.d/extension.ini,
|
||||
/usr/local/etc/php74/cli/conf.d/timezone.ini
|
||||
|
||||
```
|
||||
|
||||
Mettre PHP70 par défaut en CLI:
|
||||
|
||||
|
||||
#### Mettre PHP70 par défaut en CLI:
|
||||
|
||||
```bash
|
||||
# On renomme PHP Busybox
|
||||
|
||||
@@ -2,17 +2,16 @@
|
||||
|
||||
|
||||
|
||||
Version:
|
||||
```bash title="Version"
|
||||
httpd24 -v
|
||||
|
||||
```bash
|
||||
$ httpd24 -v
|
||||
Server version: Apache/2.4.46 (Unix)
|
||||
Server built: Apr 19 2021 14:41:36
|
||||
```
|
||||
|
||||
Log:
|
||||
|
||||
```bash
|
||||
|
||||
```bash title="Voir les logs"
|
||||
cd /var/log/httpd/
|
||||
|
||||
-rw-rw---- 1 system log 383317 Aug 25 14:21 apache24-error_log
|
||||
|
||||
@@ -10,10 +10,11 @@ https://github.com/SynoCommunity/spksrc/issues/4524
|
||||
|
||||
|
||||
|
||||
#### ffmpeg (SynoCommunity)
|
||||
### ffmpeg (SynoCommunity)
|
||||
|
||||
```bash
|
||||
$ /var/packages/ffmpeg/target/bin/ffmpeg -version
|
||||
/var/packages/ffmpeg/target/bin/ffmpeg -version
|
||||
|
||||
ffmpeg version 4.3.2 Copyright (c) 2000-2021 the FFmpeg developers
|
||||
built with gcc 7.3.0 (crosstool-NG crosstool-ng-1.23.0-306-g04d910b)
|
||||
configuration: --target-os=linux --cross-prefix=/home/spksrc/all-supported-fix/spksrc/toolchain/syno-x64-7.0/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu- --prefix=/var/packages/ffmpeg/target --extra-cflags=-I/home/spksrc/all-supported-fix/spksrc/spk/ffmpeg/work-x64-7.0/install/var/packages/ffmpeg/target/include --extra-ldflags=-L/home/spksrc/all-supported-fix/spksrc/spk/ffmpeg/work-x64-7.0/install/var/packages/ffmpeg/target/lib --extra-libs='-lxml2 -ldl' --pkg-config=/usr/bin/pkg-config --ranlib=/home/spksrc/all-supported-fix/spksrc/toolchain/syno-x64-7.0/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ranlib --enable-cross-compile --enable-rpath --enable-pic --enable-shared --enable-gpl --enable-version3 --enable-fontconfig --enable-avresample --disable-debug --disable-doc --disable-static --enable-debug=1 --extra-cflags=-DSYNO_VIDEOSTATION --extra-cflags=-fno-if-conversion --extra-cflags=-O3 --extra-cflags=-Wno-deprecated-declarations --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libbluray --enable-libspeex --enable-libtheora --enable-libvorbis --enable-gnutls --enable-libopus --enable-libsoxr --enable-libx264 --enable-libx265 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvpx --enable-libzmq --enable-libshine --enable-libfdk-aac --enable-nonfree --enable-libaom --enable-libsvtav1 --enable-libsvthevc --arch=x86_64 --enable-vaapi --enable-libmfx
|
||||
@@ -28,13 +29,17 @@ ffmpeg version 4.3.2 Copyright (c) 2000-2021 the FFmpeg developers
|
||||
libpostproc 55. 7.100 / 55. 7.100
|
||||
```
|
||||
|
||||
#### ffmpeg (dsm7)
|
||||
|
||||
```bash
|
||||
$ which ffmpeg
|
||||
|
||||
### ffmpeg (dsm7)
|
||||
|
||||
```bash title="Exécutable ffmpeg"
|
||||
which ffmpeg
|
||||
/bin/ffmpeg
|
||||
```
|
||||
|
||||
$ ffmpeg -version
|
||||
```bash title="Version"
|
||||
ffmpeg -version
|
||||
ffmpeg version 4.1.6 Copyright (c) 2000-2020 the FFmpeg developers
|
||||
built with gcc 7.5.0 (GCC)
|
||||
configuration: --prefix=/usr --incdir='${prefix}/include/ffmpeg' --arch=i686 --target-os=linux --cross-prefix=/usr/local/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu- --enable-cross-compile --enable-optimizations --enable-pic --enable-gpl --enable-shared --disable-static --disable-stripping --enable-version3 --enable-encoders --enable-pthreads --disable-protocols --disable-protocol=rtp --enable-protocol=file --enable-protocol=pipe --disable-muxer=image2 --disable-muxer=image2pipe --disable-swscale-alpha --disable-ffplay --disable-ffprobe --disable-doc --disable-devices --disable-bzlib --disable-altivec --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libmp3lame --disable-vaapi --disable-cuvid --disable-nvenc --disable-decoder=amrnb --disable-decoder=ac3 --disable-decoder=ac3_fixed --disable-encoder=zmbv --disable-encoder=dca --disable-decoder=dca --disable-encoder=ac3 --disable-encoder=ac3_fixed --disable-encoder=eac3 --disable-decoder=eac3 --disable-encoder=truehd --disable-decoder=truehd --disable-encoder=hevc_vaapi --disable-decoder=hevc --disable-muxer=hevc --disable-demuxer=hevc --disable-parser=hevc --disable-bsf=hevc_mp4toannexb --x86asmexe=yasm --cc=/usr/local/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-wrap-gcc --enable-yasm --enable-libx264 --enable-encoder=libx264
|
||||
@@ -54,33 +59,41 @@ ffmpeg version 4.1.6 Copyright (c) 2000-2020 the FFmpeg developers
|
||||
|
||||
#### php
|
||||
|
||||
```bash
|
||||
$ which php
|
||||
```bash title="Exécutable PHP"
|
||||
which php
|
||||
/bin/php
|
||||
```
|
||||
|
||||
$ php -v
|
||||
```bash title="Version"
|
||||
php -v
|
||||
PHP 7.3.3 (cli) (built: Dec 18 2020 10:30:19) ( NTS )
|
||||
Copyright (c) 1997-2018 The PHP Group
|
||||
Zend Engine v3.3.3, Copyright (c) 1998-2018 Zend Technologies
|
||||
```
|
||||
|
||||
```bash
|
||||
$ which php74
|
||||
#### php7.4
|
||||
|
||||
```bash title="Exécutable PHP"
|
||||
which php74
|
||||
/usr/local/bin/php74
|
||||
$ php74 -v
|
||||
```
|
||||
|
||||
```bash title="Version"
|
||||
php74 -v
|
||||
PHP 7.4.9 (cli) (built: Apr 22 2021 16:12:43) ( NTS )
|
||||
Copyright (c) The PHP Group
|
||||
Zend Engine v3.4.0, Copyright (c) Zend Technologies
|
||||
```
|
||||
|
||||
Paramètres:
|
||||
##### Paramètres:
|
||||
|
||||
```bash
|
||||
```bash title="Dossier extensions"
|
||||
extension_dir = /usr/local/lib/php74/modules
|
||||
```
|
||||
|
||||
```bash
|
||||
$ php74 --ini
|
||||
```bash title="Fichiers configuration"
|
||||
php74 --ini
|
||||
|
||||
Configuration File (php.ini) Path: /usr/local/etc/php74/cli
|
||||
Loaded Configuration File: /usr/local/etc/php74/cli/php.ini
|
||||
Scan for additional .ini files in: /usr/local/etc/php74/cli/conf.d
|
||||
@@ -88,10 +101,9 @@ Additional .ini files parsed: /usr/local/etc/php74/cli/conf.d/extension.ini
|
||||
/usr/local/etc/php74/cli/conf.d/timezone.ini
|
||||
```
|
||||
|
||||
```bash
|
||||
# PHP info
|
||||
```bash title="PHP info"
|
||||
php74 -i
|
||||
|
||||
$ php74 -i
|
||||
phpinfo()
|
||||
PHP Version => 7.4.9
|
||||
|
||||
@@ -114,7 +126,7 @@ PHP Extension Build => API20190902,NTS
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
```bash title="php.ini"
|
||||
/usr/local/etc/php74/cli $ ls
|
||||
drwxr-xr-x 2 root root 4096 Jun 30 14:43 conf.d
|
||||
# Paramètres PHP (Web Station -> Paramètres du language de script -> Modifier un profil PHP -> Coeur)
|
||||
@@ -126,9 +138,9 @@ drwxr-xr-x 2 root root 4096 Jun 30 14:43 conf.d
|
||||
-rw-r--r-- 1 root root 33 Jun 30 14:43 timezone.ini
|
||||
```
|
||||
|
||||
Logs:
|
||||
##### Logs:
|
||||
|
||||
```bash
|
||||
```bash title="Log PHP"
|
||||
sudo tail -f /var/log/php73-fpm.log
|
||||
```
|
||||
|
||||
@@ -136,25 +148,19 @@ sudo tail -f /var/log/php73-fpm.log
|
||||
|
||||
#### nginx
|
||||
|
||||
Version:
|
||||
|
||||
```bash
|
||||
$ nginx -V
|
||||
```bash title="Version"
|
||||
nginx -V
|
||||
nginx version: nginx/1.17.10
|
||||
TLS SNI support enabled
|
||||
```
|
||||
|
||||
Fichiers html:
|
||||
|
||||
```bash
|
||||
```bash title="Document root"
|
||||
/usr/share/nginx/html $ ls
|
||||
-rw-r--r-- 1 root root 494 Jan 28 10:59 50x.html
|
||||
-rw-r--r-- 1 root root 612 Jan 28 10:59 index.html
|
||||
```
|
||||
|
||||
Paramètres:
|
||||
|
||||
```bash
|
||||
```bash title="Configuration"
|
||||
/etc/nginx $ ls
|
||||
rw-r--r-- 1 root root 16863 Jul 11 16:45 nginx.conf
|
||||
lrwxrwxrwx 1 root root 34 Jun 30 14:06 sites-enabled -> /usr/local/etc/nginx/sites-enabled
|
||||
@@ -168,7 +174,7 @@ lrwxrwxrwx 1 root root 80 Jul 7 13:45 synowstransfer-nginx.conf -> /usr/local
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
```bash title="Configuration"
|
||||
/usr/local/etc/nginx $ ls
|
||||
drwxr-xr-x 2 root root 4096 Jul 10 20:45 conf.d
|
||||
drwxr-xr-x 2 root root 4096 Jul 10 20:45 conf.d-available
|
||||
@@ -182,10 +188,9 @@ lrwxrwxrwx 1 root root 80 Jul 7 13:46 server.webstation-vhost.conf -> /usr/lo
|
||||
lrwxrwxrwx 1 root root 80 Jul 7 13:45 synowstransfer-nginx.conf -> /usr/local/etc/nginx/sites-available/6e75aa1e-afa3-475c-8391-d980fd3c7a1f.w3conf
|
||||
```
|
||||
|
||||
Logs:
|
||||
```bash title="Logs nginx"
|
||||
sudo -i
|
||||
|
||||
```bash
|
||||
$ sudo -i
|
||||
bash-5.1# cd /var/log/nginx
|
||||
bash-5.1# ls -la
|
||||
-rw-r--r-- 1 root root 5433 Jul 10 20:47 error_default.log
|
||||
@@ -193,46 +198,60 @@ bash-5.1# ls -la
|
||||
-rw-rw---- 1 system log 70396 Jul 9 23:47 error.log.1.xz
|
||||
-rw-rw---- 1 system log 70440 Jul 7 09:00 error.log.2.xz
|
||||
-rw-rw---- 1 system log 70268 Jul 4 19:35 error.log.3.xz
|
||||
|
||||
```
|
||||
|
||||
Tester la configuration:
|
||||
##### Tester la configuration:
|
||||
|
||||
```bash
|
||||
$ sudo nginx -t
|
||||
sudo nginx -t
|
||||
Password:
|
||||
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
|
||||
nginx: configuration file /etc/nginx/nginx.conf test is successful
|
||||
```
|
||||
|
||||
Recharger le serveur nginx (après un changement de configuration:
|
||||
##### Recharger le serveur nginx:
|
||||
|
||||
```bash
|
||||
$ sudo nginx -s reload
|
||||
```bash title="après un changement de configuration"
|
||||
sudo nginx -s reload
|
||||
```
|
||||
|
||||
Autres commandes:
|
||||
##### Autres commandes:
|
||||
|
||||
```bash
|
||||
# quitter nginx immédiatement.
|
||||
$ sudo nginx -s stop
|
||||
```bash title="Quitter nginx immédiatement"
|
||||
sudo nginx -s stop
|
||||
```
|
||||
|
||||
# quitter nginx après que toutes les requêtes actives ont obtenu une réponse.
|
||||
$ sudo nginx -s quit
|
||||
```bash title="Quitter nginx après que toutes les requêtes actives ont obtenu une réponse"
|
||||
sudo nginx -s quit
|
||||
```
|
||||
|
||||
# les Log-Files sont relancés.
|
||||
$ sudo nginx -s reopen
|
||||
```bash title="Les Log-Files sont relancés"
|
||||
sudo nginx -s reopen
|
||||
```
|
||||
|
||||
# lancer nginx
|
||||
$ sudo service nginx start
|
||||
|
||||
# Redémarrer le serveur nginx:
|
||||
$ synosystemctl restart nginx
|
||||
```bash title="Démarrer nginx"
|
||||
sudo service nginx start
|
||||
```
|
||||
|
||||
```bash title="Redémarrer le serveur nginx"
|
||||
synosystemctl restart nginx
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Liens
|
||||
|
||||
[nginx.md](../nginx.md)
|
||||
[nginx.md](../nginx.md)
|
||||
|
||||
|
||||
|
||||
#### deb packages:
|
||||
|
||||
Installer un paquet debian:
|
||||
|
||||
```bash
|
||||
$ sudo dpkg -i bat_0.18.3_amd64.deb
|
||||
|
||||
$ sudo dpkg -i --force-bad-verify bat_0.18.3_amd64.deb
|
||||
```
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ GITEA_WORK_DIR=/var/lib/gitea/ /usr/local/bin/gitea web -c /etc/gitea/app.ini
|
||||
|
||||
|
||||
|
||||
DSM -> Portail des applications -> Proxy inversé
|
||||
DSM :material-arrow-right: Portail des applications :material-arrow-right: Proxy inversé
|
||||
|
||||
| | Source | Destination |
|
||||
| ---------- | -------------------- | ----------- |
|
||||
@@ -69,9 +69,11 @@ DSM -> Portail des applications -> Proxy inversé
|
||||
| Nom d'hôte | clicclac.synology.me | localhost |
|
||||
| Port | 3001 | 3000 |
|
||||
|
||||
Apache:
|
||||
|
||||
```bash
|
||||
|
||||
##### Configurer les Virtual Host:
|
||||
|
||||
```bash title="Apache"
|
||||
<VirtualHost *:80>
|
||||
ProxyPreserveHost On
|
||||
ProxyRequests off
|
||||
@@ -80,9 +82,7 @@ Apache:
|
||||
</VirtualHost>
|
||||
```
|
||||
|
||||
Nginx:
|
||||
|
||||
```bash
|
||||
```bash title="Nginx"
|
||||
server {
|
||||
listen 80;
|
||||
server_name git.example.com;
|
||||
@@ -97,9 +97,8 @@ server {
|
||||
|
||||
#### Configuration:
|
||||
|
||||
Base: sqlite3 (impossible de se connecter à mariadb)
|
||||
|
||||
PATH: = /var/services/homes/bruno/gitea/data/gitea.db
|
||||
1. <u>Base:</u> sqlite3 (impossible de se connecter à mariadb)
|
||||
2. <u>PATH:</u> `= /var/services/homes/bruno/gitea/data/gitea.db`
|
||||
|
||||
|
||||
|
||||
@@ -129,7 +128,7 @@ ROOT_PATH = /var/services/homes/bruno/gitea/log
|
||||
On peut lancer gitea depuis un script:
|
||||
|
||||
```bash
|
||||
$ /usr/local/bin/gitea web -c /etc/gitea/app.ini
|
||||
/usr/local/bin/gitea web -c /etc/gitea/app.ini
|
||||
```
|
||||
|
||||
ou depuis un service.
|
||||
@@ -140,7 +139,7 @@ ou depuis un service.
|
||||
|
||||
A installer dans `/etc/systemd/system`:
|
||||
|
||||
```ini
|
||||
```ini title="gitea.service"
|
||||
[Unit]
|
||||
Description=Gitea (Git with a cup of tea)
|
||||
After=syslog.target
|
||||
@@ -229,30 +228,20 @@ WantedBy=multi-user.target
|
||||
|
||||
|
||||
|
||||
Activer le service gitea au démarrage:
|
||||
|
||||
```bash
|
||||
$ sudo systemctl enable gitea
|
||||
```bash title="Activer le service gitea au démarrage"
|
||||
sudo systemctl enable gitea
|
||||
```
|
||||
|
||||
|
||||
|
||||
Démarrer le service gitea:
|
||||
|
||||
```bash
|
||||
$ sudo systemctl start gitea
|
||||
```bash title="Démarrer le service gitea"
|
||||
sudo systemctl start gitea
|
||||
```
|
||||
|
||||
|
||||
|
||||
Vérifier le status de gitea:
|
||||
|
||||
```bash
|
||||
$ sudo systemctl status -l gitea
|
||||
```bash title="Status de gitea"
|
||||
sudo systemctl status -l gitea
|
||||
```
|
||||
|
||||
```bash
|
||||
$ ps auxw | grep gitea
|
||||
```bash title="Status de gitea"
|
||||
ps auxw | grep gitea
|
||||
bruno 8220 0.8 6.2 2038820 122672 ? Ssl 20:26 0:02 /usr/local/bin/gitea web --config /etc/gitea/app.ini
|
||||
bruno 9790 0.0 0.0 2860 184 pts/1 D+ 20:32 0:00 grep gitea
|
||||
```
|
||||
@@ -261,9 +250,9 @@ bruno 9790 0.0 0.0 2860 184 pts/1 D+ 20:32 0:00 grep gitea
|
||||
|
||||
### Mise-à-jour
|
||||
|
||||
Depuis un script `dsm7-gitea-update.sh`:
|
||||
Depuis un script:
|
||||
|
||||
```bash
|
||||
```bash title="dsm7-gitea-update.sh"
|
||||
#!/bin/bash
|
||||
|
||||
GITEA_BIN=`which gitea`
|
||||
|
||||
@@ -6,11 +6,7 @@ https://blog.viking-studios.net/en/nextcloud-hub-optimization-on-a-synology-disk
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
config.php
|
||||
|
||||
```
|
||||
```php title="config.php"
|
||||
'memcache.local' => '\OC\Memcache\APCu',
|
||||
'memcache.distributed' => '\\OC\\Memcache\\Redis',
|
||||
'redis' =>
|
||||
@@ -25,9 +21,7 @@ config.php
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
```
|
||||
```ini title="php.ini"
|
||||
[apc]
|
||||
apc.enable_cli=1
|
||||
```
|
||||
|
||||
@@ -2,44 +2,43 @@
|
||||
|
||||
|
||||
|
||||
#### Installer nvm
|
||||
### Installer nvm
|
||||
|
||||
```bash
|
||||
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
|
||||
```
|
||||
|
||||
Installer node=lts/fermium (ou mettre-à-jour)
|
||||
|
||||
```bash
|
||||
$ nvm install --lts=fermium
|
||||
nvm install --lts=fermium
|
||||
```
|
||||
|
||||
Mettre-à-jour npm
|
||||
Mettre-à-jour npm:
|
||||
|
||||
```bash
|
||||
$ npm -g install npm
|
||||
npm -g install npm
|
||||
```
|
||||
|
||||
Réinstaller les paquets d'une ancienne version après une mise-à jour:
|
||||
|
||||
```bash
|
||||
# update 14.17.3 depuis 14.17.0
|
||||
$ nvm reinstall-packages 14.17.0
|
||||
```bash title="Update 14.17.3 depuis 14.17.0"
|
||||
nvm reinstall-packages 14.17.0
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Installer thumbsup
|
||||
### Installer thumbsup
|
||||
|
||||
```bash
|
||||
$ npm -g install thumbsup
|
||||
npm -g install thumbsup
|
||||
|
||||
$ which thumbsup
|
||||
which thumbsup
|
||||
/var/services/homes/bruno/.nvm/versions/node/v14.17.3/bin/thumbsup
|
||||
```
|
||||
|
||||
```bash
|
||||
$ cd /volume1/photo/thumbsup
|
||||
cd /volume1/photo/thumbsup
|
||||
total 32
|
||||
drwxrwxrwx+ 1 bruno 138862 286 Mar 15 10:56 .
|
||||
drwxrwxrwx+ 1 138862 138862 588 Aug 9 08:35 ..
|
||||
@@ -57,11 +56,17 @@ drwxrwxrwx+ 1 bruno users 122 Nov 29 2020 theme-flow-bruno
|
||||
-rwxrwxrwx+ 1 bruno users 365 Mar 15 10:11 thumbsup_update.sh
|
||||
```
|
||||
|
||||
```bash
|
||||
$ nano config.json
|
||||
|
||||
|
||||
### Configurer thumsup
|
||||
|
||||
https://thumbsup.github.io/docs/3-configuration/usage/
|
||||
|
||||
```bash title="Configurer Thumsup"
|
||||
nano config.json
|
||||
```
|
||||
|
||||
```json
|
||||
```json title="config.json"
|
||||
{
|
||||
"input": "/input/Flore",
|
||||
"output": "/output/gallery",
|
||||
@@ -85,7 +90,7 @@ $ nano config.json
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
$ thumbsup --config config.json
|
||||
```bash title="Lancer Thumbsup"
|
||||
thumbsup --config config.json
|
||||
```
|
||||
|
||||
|
||||
28
docs/Synology/dsm7/piwigo.md
Normal file
28
docs/Synology/dsm7/piwigo.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# Piwigo
|
||||
|
||||
https://fr.piwigo.org
|
||||
|
||||
|
||||
|
||||
```mysql title="Créer la base MySQL"
|
||||
MariaDB [(none)]> CREATE DATABASE piwigo_db;
|
||||
MariaDB [(none)]> CREATE USER 'piwigo_db_user'@'localhost' IDENTIFIED BY 'the-password123!';
|
||||
MariaDB [(none)]> GRANT ALL ON piwigo_db.* TO 'piwigo_db_user'@'localhost';
|
||||
MariaDB [(none)]> FLUSH PRIVILEGES;
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash title="Erreur lors de la mise-à-jour des thèmes et plugins"
|
||||
sudo chown -R http:http plugins/
|
||||
|
||||
sudo chown -R http:http themes/
|
||||
```
|
||||
|
||||
|
||||
|
||||
[Aide à la création d'un thème](https://fr.piwigo.org/doc/doku.php?id=projet:developpement:themes)
|
||||
|
||||
[How to make a child theme](https://piwigo.org/forum/viewtopic.php?pid=131778)
|
||||
|
||||
[Modus: how to clone ?](https://piwigo.org/forum/viewtopic.php?pid=173570#p173570)
|
||||
@@ -4,9 +4,9 @@
|
||||
|
||||
|
||||
|
||||
Python 3 est installé par défaut:
|
||||
#### Python 3 est installé par défaut:
|
||||
|
||||
```bash
|
||||
```bash title="Python3"
|
||||
$ python -V
|
||||
Python 3.8.8
|
||||
|
||||
@@ -22,9 +22,9 @@ $ find / -iname "site-packages" -type d -print 2>/dev/null
|
||||
|
||||
|
||||
|
||||
Python 2 est aussi installé:
|
||||
#### Python 2 est aussi installé:
|
||||
|
||||
```bash
|
||||
```bash title="Python2"
|
||||
$ python2 -V
|
||||
Python 2.7.18
|
||||
|
||||
@@ -37,12 +37,12 @@ $ which python2
|
||||
|
||||
|
||||
|
||||
<u>pip n'est pas installé par défaut</u>
|
||||
!!!warning "pip n'est pas installé par défaut"
|
||||
|
||||
```bash
|
||||
$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
||||
```bash title="Installer pip"
|
||||
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
||||
|
||||
$ $ python3 get-pip.py
|
||||
python3 get-pip.py
|
||||
Defaulting to user installation because normal site-packages is not writeable
|
||||
Collecting pip
|
||||
Using cached pip-21.1.3-py3-none-any.whl (1.5 MB)
|
||||
@@ -58,10 +58,8 @@ Successfully installed pip-21.1.3
|
||||
|
||||
|
||||
|
||||
Local installation:
|
||||
|
||||
```bash
|
||||
$ which pip3
|
||||
```bash title="Chemins en installation locale"
|
||||
which pip3
|
||||
/var/services/homes/bruno/.local/bin/pip3
|
||||
|
||||
bruno@DS916:~/.local/bin $ pip --version
|
||||
@@ -71,25 +69,30 @@ pip 21.1.3 from /var/services/homes/bruno/.local/lib/python3.8/site-packages/pip
|
||||
|
||||
|
||||
|
||||
Mieux vaut créer un environnement virtuel:
|
||||
#### Mieux vaut créer un environnement virtuel:
|
||||
|
||||
```bash
|
||||
# Création de l'environnement virtuel
|
||||
```bash title="Création de l'environnement virtuel"
|
||||
bruno@DS916:~/venv $ python3 -m venv mkdocs
|
||||
```
|
||||
|
||||
# Activation
|
||||
```bash title="Activation"
|
||||
bruno@DS916:~/venv $ source mkdocs/bin/activate
|
||||
```
|
||||
|
||||
# Mise-à-jour de pip et setuptools
|
||||
```bash title="Mise-à-jour de pip et setuptools"
|
||||
(mkdocs) bruno@DS916:~/venv $ pip3 install -U pip setuptools
|
||||
```
|
||||
|
||||
# Installation de mkdocs
|
||||
```bash title="Installation de mkdocs"
|
||||
(mkdocs) bruno@DS916:~/venv $ pip3 install -U mkdocs
|
||||
```
|
||||
|
||||
# Dé-activation
|
||||
```bash title="Dé-activation"
|
||||
(mkdocs) bruno@DS916:~/venv $ deactivate
|
||||
```
|
||||
|
||||
$ /var/services/homes/bruno/venv/mkdocs/bin/mkdocs --version
|
||||
```bash title="Version de mkdocs"
|
||||
/var/services/homes/bruno/venv/mkdocs/bin/mkdocs --version
|
||||
mkdocs, version 1.2.1 from /volume1/homes/bruno/venv/mkdocs/lib/python3.8/site-packages/mkdocs (Python 3.8)
|
||||
```
|
||||
|
||||
|
||||
@@ -6,14 +6,16 @@ https://digitalboxweb.wordpress.com/2020/02/01/redis-sur-nas-synology/
|
||||
|
||||
|
||||
|
||||
1. Ajouter le repo DigitalBox comme source de paquets (http://digital.box.free.fr/sspks)
|
||||
### Installation:
|
||||
|
||||
2. Depuis le Centre de paquets, installer le paquet Redis.
|
||||
1. Ajouter le repo **DigitalBox** comme source de paquets (http://digital.box.free.fr/sspks)
|
||||
|
||||
3. Vérifier que Redis est correctement installé:
|
||||
2. Depuis le Centre de paquets, installer le paquet **Redis**.
|
||||
|
||||
3. Vérifier que **Redis** est correctement installé:
|
||||
|
||||
```bash
|
||||
$ cd /var/packages/redis/target/bin
|
||||
cd /var/packages/redis/target/bin
|
||||
total 3676
|
||||
drwxr-xr-x 1 sc-redis sc-redis 160 Jul 26 09:43 .
|
||||
drwxr-xr-x 1 sc-redis sc-redis 18 Nov 10 09:21 ..
|
||||
@@ -23,36 +25,43 @@ https://digitalboxweb.wordpress.com/2020/02/01/redis-sur-nas-synology/
|
||||
-rwxr-xr-x 1 sc-redis sc-redis 835832 Jul 26 09:43 redis-cli
|
||||
lrwxrwxrwx 1 sc-redis sc-redis 12 Jul 26 09:43 redis-sentinel -> redis-server
|
||||
-rwxr-xr-x 1 sc-redis sc-redis 2018008 Jul 26 09:43 redis-server
|
||||
|
||||
$ ./redis-cli
|
||||
```
|
||||
```bash title="Tester l'installation de redis"
|
||||
./redis-cli
|
||||
127.0.0.1:6379> ping
|
||||
PONG
|
||||
```
|
||||
|
||||
4. Activer Redis dans PHP:
|
||||
|
||||
Redis n'est pas proposé dans les extensions, bien que le module soit présent..
|
||||
|
||||
```bash
|
||||
$ ls /volume1/@appstore/PHP7.3/usr/local/lib/php73/modules/redis.so
|
||||
/volume1/@appstore/PHP7.3/usr/local/lib/php73/modules/redis.so
|
||||
```
|
||||
### Configuration:
|
||||
|
||||
```bash
|
||||
sudo nano /usr/local/etc/php73/cli/conf.d/extension.ini
|
||||
|
||||
# Ajouter la ligne extension = redis.so juste après posix.po
|
||||
```
|
||||
Activer **Redis** dans PHP:
|
||||
|
||||
```bash
|
||||
sudo nano /volume1/@appstore/PHP7.3/misc/extension_list.json
|
||||
|
||||
# Ajouter le bloc suivant après le bloc posix
|
||||
"redis": {
|
||||
"enable_default": true,
|
||||
"desc": "The phpredis extension provides an API for communicating with the Redis key-value store."
|
||||
},
|
||||
```
|
||||
Redis n'est pas proposé dans les extensions, bien que le module soit présent..
|
||||
|
||||
5. Redis est maintenant disponible dans les extensions PHP. On l'active.
|
||||
```bash
|
||||
ls /volume1/@appstore/PHP7.3/usr/local/lib/php73/modules/redis.so
|
||||
/volume1/@appstore/PHP7.3/usr/local/lib/php73/modules/redis.so
|
||||
```
|
||||
|
||||
```bash title="Editer le fichier extension.ini"
|
||||
sudo nano /usr/local/etc/php73/cli/conf.d/extension.ini
|
||||
|
||||
# Ajouter la ligne extension = redis.so juste après posix.po
|
||||
```
|
||||
|
||||
```bash title="Editer le fichier extension_list.json"
|
||||
sudo nano /volume1/@appstore/PHP7.3/misc/extension_list.json
|
||||
|
||||
# Ajouter le bloc suivant après le bloc posix
|
||||
"redis": {
|
||||
"enable_default": true,
|
||||
"desc": "The phpredis extension provides an API for communicating with the Redis key-value store."
|
||||
},
|
||||
```
|
||||
|
||||
|
||||
|
||||
**Redis** est maintenant disponible dans les extensions PHP. On l'active.
|
||||
|
||||
|
||||
@@ -2,23 +2,23 @@
|
||||
|
||||
|
||||
|
||||
#### Installer WordPress:
|
||||
### Installer WordPress:
|
||||
|
||||
Téléchargement:
|
||||
####
|
||||
|
||||
```bash
|
||||
$ cd /volume1/web
|
||||
$ wget https://wordpress.org/latest.tar.gz
|
||||
$ tar -xzvf latest.tar.gz
|
||||
```bash title="Télécharger Wordpress"
|
||||
cd /volume1/web
|
||||
wget https://wordpress.org/latest.tar.gz
|
||||
tar -xzvf latest.tar.gz
|
||||
```
|
||||
|
||||
Régler les permissions:
|
||||
|
||||
```bash
|
||||
$ sudo chown -R http:http wordpress
|
||||
$ sudo chmod -R 755 /volume1/web/wordpress/
|
||||
$ sudo find /volume1/web/wordpress/ -type d -exec chmod 755 {} \;
|
||||
$ sudo find /volume1/web/wordpress/ -type f -exec chmod 644 {} \;
|
||||
|
||||
```bash title="Régler les permissions"
|
||||
sudo chown -R http:http wordpress
|
||||
sudo chmod -R 755 /volume1/web/wordpress/
|
||||
sudo find /volume1/web/wordpress/ -type d -exec chmod 755 {} \;
|
||||
sudo find /volume1/web/wordpress/ -type f -exec chmod 644 {} \;
|
||||
```
|
||||
|
||||
|
||||
@@ -41,11 +41,11 @@ DSM ajustera les permissions pour les fichiers WordPress.
|
||||
|
||||
#### Créer une base MariaDB:
|
||||
|
||||
```bash
|
||||
$ sudo mysql -u root -p
|
||||
```bash title="Se connecter à MySQL"
|
||||
sudo mysql -u root -p
|
||||
```
|
||||
|
||||
```mariadb
|
||||
```mysql title="Créer une base"
|
||||
# Supprimer une ancienne base:
|
||||
# DROP DATABASE wordpress;
|
||||
|
||||
@@ -70,9 +70,9 @@ MariaDB > GRANT ALL PRIVILEGES ON wordpress . * TO 'adm_wp'@'localhost';
|
||||
MariaDB > FLUSH PRIVILEGES;
|
||||
```
|
||||
|
||||
Vérifier la base créee:
|
||||
|
||||
```mariadb
|
||||
|
||||
```mariadb title="Vérifier la base créée"
|
||||
MariaDB > SHOW DATABASES;
|
||||
+--------------------+
|
||||
| Database |
|
||||
@@ -121,7 +121,7 @@ Aller à https://clicclac.synology.me/wordpress dans Firefox.
|
||||
Identification du dossier *réceptacle*:
|
||||
|
||||
```bash
|
||||
$ sudo nano /usr/local/etc/nginx/sites-enabled/server.webstation-vhost.conf
|
||||
sudo nano /usr/local/etc/nginx/sites-enabled/server.webstation-vhost.conf
|
||||
```
|
||||
|
||||
```nginx
|
||||
@@ -138,7 +138,7 @@ Création du fichier:
|
||||
cd /usr/local/etc/nginx/conf.d/2bbf5ec3-353e-48c2-8564-f5ad432bb05e/
|
||||
|
||||
# Créer un fichier de configuration nginx pour gérer les permaliens
|
||||
$ sudo nano user.conf.wordpress-permalink
|
||||
sudo nano user.conf.wordpress-permalink
|
||||
```
|
||||
|
||||
```nginx
|
||||
@@ -147,12 +147,14 @@ location /{
|
||||
}
|
||||
```
|
||||
|
||||
Tester la configuration et recharger nginx:
|
||||
|
||||
```bash
|
||||
$ sudo nginx -t
|
||||
|
||||
$ sudo systemctl reload nginx
|
||||
```bash title="Tester la configuration"
|
||||
sudo nginx -t
|
||||
```
|
||||
|
||||
```bash title="Recharger nginx"
|
||||
sudo systemctl reload nginx
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# Trouver et supprimer les répertoires @eaDir
|
||||
|
||||
|
||||
|
||||
### Désactiver les services qui créent ces dossiers:
|
||||
|
||||
Se connecter sous root en ssh, puis:
|
||||
|
||||
@@ -7,18 +7,18 @@
|
||||
Création d'un certificat ssl self-signed:
|
||||
|
||||
```bash
|
||||
$ sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.crt
|
||||
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.crt
|
||||
# => /etc/ssl/certs/nginx-selfsigned.crt
|
||||
|
||||
$ sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048
|
||||
sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048
|
||||
# => /etc/ssl/certs/dhparam.pem
|
||||
|
||||
$ sudo nano /etc/nginx/snippets/self-signed.conf
|
||||
sudo nano /etc/nginx/snippets/self-signed.conf
|
||||
# ajouter:
|
||||
ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;
|
||||
ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;
|
||||
|
||||
$ sudo nano /etc/nginx/snippets/ssl-params.conf
|
||||
sudo nano /etc/nginx/snippets/ssl-params.conf
|
||||
# ajouter:
|
||||
# from https://cipherli.st/
|
||||
# and https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html
|
||||
@@ -46,8 +46,8 @@ ssl_dhparam /etc/ssl/certs/dhparam.pem;
|
||||
Configurer nginx pour qu'il utilise SSL:
|
||||
|
||||
```bash
|
||||
$ sudo cp /etc/nginx/sites-available/default /etc/nginx/sites-available/default.bak
|
||||
$ sudo nano /etc/nginx/sites-available/default
|
||||
sudo cp /etc/nginx/sites-available/default /etc/nginx/sites-available/default.bak
|
||||
sudo nano /etc/nginx/sites-available/default
|
||||
```
|
||||
|
||||
```nginx
|
||||
@@ -110,23 +110,27 @@ server {
|
||||
}
|
||||
```
|
||||
|
||||
Tester la configuration et redémarrer nginx:
|
||||
Tester la configuration:
|
||||
|
||||
```bash
|
||||
# message normal pour certificat auto-signé
|
||||
|
||||
$ sudo /usr/sbin/nginx -t
|
||||
sudo /usr/sbin/nginx -t
|
||||
nginx: [warn] "ssl_stapling" ignored, issuer certificate not found for certificate "/etc/ssl/certs/nginx-selfsigned.crt"
|
||||
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
|
||||
nginx: configuration file /etc/nginx/nginx.conf test is successful
|
||||
nginx: configuration file /etc/nginx/nginx.conf test is success
|
||||
```
|
||||
|
||||
$ sudo systemctl restart nginx
|
||||
Et redémarrer nginx:
|
||||
|
||||
```bash
|
||||
sudo systemctl restart nginx
|
||||
```
|
||||
|
||||
Vérifier le status de nginx:
|
||||
|
||||
```bash
|
||||
$ systemctl status nginx
|
||||
systemctl status nginx
|
||||
● nginx.service - A high performance web server and a reverse proxy server
|
||||
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
|
||||
Active: active (running) since Tue 2021-07-13 09:30:48 CEST; 2min 58s ago
|
||||
@@ -153,7 +157,7 @@ $ systemctl status nginx
|
||||
-rw-r----- 1 www-data adm 3252 juil. 13 11:51 error.log
|
||||
```
|
||||
```bash
|
||||
$ nano /etc/nginx/nginx.conf
|
||||
nano /etc/nginx/nginx.conf
|
||||
```
|
||||
|
||||
```nginx
|
||||
@@ -171,33 +175,42 @@ $ nano /etc/nginx/nginx.conf
|
||||
|
||||
On commande nginx avec SystemD (Debian 8+, ubuntu 16+, CentOS):
|
||||
|
||||
```bash
|
||||
$ systemctl stop nginx.service
|
||||
|
||||
$ systemctl start nginx.service
|
||||
|
||||
$ systemctl restart nginx
|
||||
|
||||
$ systemctl reload nginx
|
||||
|
||||
$ systemctl disable nginx
|
||||
|
||||
$ systemctl enable nginx
|
||||
|
||||
```bash title="Arrêter nginx"
|
||||
systemctl stop nginx.service
|
||||
```
|
||||
|
||||
```bash title="Démarrer nginx"
|
||||
systemctl start nginx.service
|
||||
```
|
||||
|
||||
```bash title="Redémarrer nginx"
|
||||
systemctl restart nginx
|
||||
```
|
||||
|
||||
```bash title="Recharger nginx"
|
||||
systemctl reload nginx
|
||||
```
|
||||
|
||||
```bash title="Désactiver nginx"
|
||||
systemctl disable nginx
|
||||
```
|
||||
|
||||
```bash title="Activer nginx"
|
||||
systemctl enable nginx
|
||||
```
|
||||
|
||||
|
||||
|
||||
On peut controller directement nginx avec les signals:
|
||||
|
||||
```bash
|
||||
# Relancer nginx
|
||||
|
||||
$ sudo /usr/sbin/nginx -s reload
|
||||
```bash title="Relancer nginx"
|
||||
sudo /usr/sbin/nginx -s reload
|
||||
```
|
||||
|
||||
Aide:
|
||||
|
||||
```bash
|
||||
$ sudo /usr/sbin/nginx -h
|
||||
sudo /usr/sbin/nginx -h
|
||||
nginx version: nginx/1.14.2
|
||||
Usage: nginx [-?hvVtTq] [-s signal] [-c filename] [-p prefix] [-g directives]
|
||||
|
||||
@@ -217,7 +230,7 @@ Options:
|
||||
Tester la configuration:
|
||||
|
||||
```bash
|
||||
$ sudo /usr/sbin/nginx -t
|
||||
sudo /usr/sbin/nginx -t
|
||||
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
|
||||
nginx: configuration file /etc/nginx/nginx.conf test is successful
|
||||
```
|
||||
@@ -225,7 +238,7 @@ nginx: configuration file /etc/nginx/nginx.conf test is successful
|
||||
Tester la configuration et l'afficher:
|
||||
|
||||
```nginx
|
||||
$ sudo /usr/sbin/nginx -T
|
||||
sudo /usr/sbin/nginx -T
|
||||
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
|
||||
nginx: configuration file /etc/nginx/nginx.conf test is successful
|
||||
# configuration file /etc/nginx/nginx.conf:
|
||||
|
||||
@@ -70,9 +70,7 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:
|
||||
|
||||
### Configuration de nail:
|
||||
|
||||
Editer le fichier /opt/etc/nail.rc:
|
||||
|
||||
```bash
|
||||
```bash title="Editer le fichier /opt/etc/nail.rc"
|
||||
set from="bruno@funnymac.com"
|
||||
set smtp=smtp://smtp.funnymac.com
|
||||
#set smtp-use-starttls
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# iPKG (DSM 6)
|
||||
|
||||
|
||||
|
||||
### Installer iPKG:
|
||||
|
||||
Se connecter en root:
|
||||
@@ -11,11 +13,13 @@ bruno@DS916:~ $ sudo -i
|
||||
root@DS916:~#
|
||||
```
|
||||
|
||||
Télécharger et installer le bootstrap correspondant au processeur du NAS.
|
||||
Télécharger et installer le bootstrap correspondant au processeur du NAS:
|
||||
|
||||
Pour le DS414 → MARVELL Armada XP MV78230 → processeur ARM v7 avec FPU → ARMv7 EABI hardfloat
|
||||
- Pour le DS414 → MARVELL Armada XP MV78230 → processeur ARM v7 avec FPU → ARMv7 EABI hardfloat
|
||||
|
||||
|
||||
- Pour le DS916 → INTEL Pentium N3710
|
||||
|
||||
Pour le DS916 → INTEL Pentium N3710
|
||||
|
||||
[Optware-ng](https://github.com/Optware/Optware-ng)
|
||||
|
||||
@@ -58,17 +62,15 @@ Bootstraping done
|
||||
Installing glibc-locale package to generate needed /opt/lib/locale/locale-archive
|
||||
```
|
||||
|
||||
Une fois l'installation terminée, mettre à jour la liste des packages
|
||||
Une fois l'installation terminée:
|
||||
|
||||
```
|
||||
```bash title="Mettre à jour la liste des packages"
|
||||
DiskStation> /opt/bin/ipkg update
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Nettoyer le dossier d'installation:
|
||||
|
||||
```bash
|
||||
```bash title="Nettoyer le dossier d'installation"
|
||||
DiskStation> cd /volume1/@tmp
|
||||
DiskStation> rm buildroot-armeabihf-bootstrap.sh
|
||||
```
|
||||
@@ -77,47 +79,39 @@ DiskStation> rm buildroot-armeabihf-bootstrap.sh
|
||||
|
||||
### Principales commandes
|
||||
|
||||
Afficher la liste des packages
|
||||
|
||||
```bash
|
||||
DiskStation> /opt/bin/ipkg list
|
||||
|
||||
```bash title="Afficher la liste des packages"
|
||||
/opt/bin/ipkg list
|
||||
```
|
||||
|
||||
Afficher la liste des packages installés
|
||||
|
||||
```bash
|
||||
DiskStation> /opt/bin/ipkg list-installed
|
||||
```bash title="Afficher la liste des packages installés"
|
||||
/opt/bin/ipkg list-installed
|
||||
```
|
||||
|
||||
Installer une application
|
||||
|
||||
```bash
|
||||
DiskStation> /opt/bin/ipkg install pkg
|
||||
```bash title="Installer une application"
|
||||
/opt/bin/ipkg install pkg
|
||||
```
|
||||
|
||||
Mettre à jour les packages
|
||||
|
||||
```bash
|
||||
DiskStation> /opt/bin/ipkg upgrade
|
||||
```bash title="Mettre à jour les packages"
|
||||
/opt/bin/ipkg upgrade
|
||||
```
|
||||
|
||||
Supprimer un package
|
||||
|
||||
```bash
|
||||
DiskStation> /opt/bin/ipkg remove pkg
|
||||
```bash title="Supprimer un package"
|
||||
/opt/bin/ipkg remove pkg
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Mettre à jour iPKG:
|
||||
|
||||
Se connecter sous un compte admin
|
||||
Se connecter sous un compte admin:
|
||||
|
||||
```bash
|
||||
ssh bruno@192.168.0.8
|
||||
```
|
||||
|
||||
Mettre à jour les paquets installés
|
||||
Mettre à jour les paquets installés:
|
||||
|
||||
```bash
|
||||
DiskStation> /opt/bin/ipkg update
|
||||
|
||||
@@ -204,9 +204,9 @@ Installed-Time: 1536489744
|
||||
|
||||
##### Options:
|
||||
|
||||
-V --verbosity <niveau> mode bavard
|
||||
- -V --verbosity <niveau> : mode bavard
|
||||
|
||||
-A tous les paquets (pas seulement ceux installés)
|
||||
- -A : tous les paquets (pas seulement ceux installés)
|
||||
|
||||
|
||||
|
||||
@@ -286,7 +286,7 @@ lsof - 4.94.0-1 - LiSt Open Files - a diagnostic tool
|
||||
|
||||
|
||||
|
||||
#### Compiler dcraw.
|
||||
### Compiler dcraw.
|
||||
|
||||
Télécharger les [sources](https://sourceforge.net/projects/dsgpl/files/Synology%20NAS%20GPL%20Source/24922branch/evansport-source/), puis:
|
||||
|
||||
|
||||
@@ -2,27 +2,25 @@
|
||||
|
||||
|
||||
|
||||
#### Copier un fichier sur le NAS
|
||||
#### Copier un fichier sur le NAS:
|
||||
|
||||
```bash
|
||||
$ scp -P42666 wsgi.py bruno@192.168.1.7:/var/services/homes/bruno/scripts/
|
||||
scp -P42666 wsgi.py bruno@192.168.1.7:/var/services/homes/bruno/scripts/
|
||||
|
||||
$ scp -P42666 httpd_vhost.conf bruno@clicclac.synology.me:/var/services/homes/bruno/
|
||||
scp -P42666 httpd_vhost.conf bruno@clicclac.synology.me:/var/services/homes/bruno/
|
||||
```
|
||||
|
||||
#### Réception d'un fichier depuis le NAS
|
||||
#### Réception d'un fichier depuis le NAS:
|
||||
|
||||
```bash
|
||||
$ scp -P42666 bruno@clicclac.synology.me:/var/services/homes/bruno/httpd-vhost.conf /Users/bruno/Desktop
|
||||
scp -P42666 bruno@clicclac.synology.me:/var/services/homes/bruno/httpd-vhost.conf /Users/bruno/Desktop
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### wget: not an http or ftp url:
|
||||
|
||||
Sur le NAS, `wget` ne gère pas les URLs https. Il faut passer `curl`.
|
||||
Sur le NAS, `wget` ne gère pas les URLs https. Il faut passer par `curl`.
|
||||
|
||||
```bash
|
||||
$ curl -L -O https://github.com/go-gitea/gitea/releases/download/v1.11.4/gitea-1.11.4-linux-amd64
|
||||
curl -L -O https://github.com/go-gitea/gitea/releases/download/v1.11.4/gitea-1.11.4-linux-amd64
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user