25-07-2021
This commit is contained in:
119
docs/Synology/Docker/joplin.md
Normal file
119
docs/Synology/Docker/joplin.md
Normal file
@@ -0,0 +1,119 @@
|
||||
# Joplin
|
||||
|
||||
|
||||
|
||||
### Serveur Joplin:
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
#### Créer le fichier `docker-compose.yml` dans `/volume1/docker/joplin`:
|
||||
|
||||
```bash
|
||||
$ nano docker-compose.yml
|
||||
```
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres:13.1
|
||||
ports:
|
||||
- "5432:5432"
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /volume1/docker/joplin/data:/var/lib/postgresql/data
|
||||
environment:
|
||||
- APP_PORT=22300
|
||||
- POSTGRES_PASSWORD=joplin
|
||||
- POSTGRES_USER=joplin
|
||||
- POSTGRES_DB=joplin
|
||||
app:
|
||||
image: joplin/server:latest
|
||||
depends_on:
|
||||
- db
|
||||
ports:
|
||||
- "22300:22300"
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- APP_BASE_URL=https://clicclac.synology.me:22301
|
||||
- DB_CLIENT=pg
|
||||
- POSTGRES_PASSWORD=joplin
|
||||
- POSTGRES_DATABASE=joplin
|
||||
- POSTGRES_USER=joplin
|
||||
- POSTGRES_PORT=5432
|
||||
- POSTGRES_HOST=db
|
||||
|
||||
```
|
||||
|
||||
#### Créer le container:
|
||||
|
||||
```bash
|
||||
$ sudo docker-compose up -d
|
||||
Creating network "joplin_default" with the default driver
|
||||
Pulling app (joplin/server:latest)...
|
||||
latest: Pulling from joplin/server
|
||||
...
|
||||
Digest: sha256:5c4cd651d4dae4ce85e252efc9262856d07dd8e0cf9a9a2c077a36c9631883cb
|
||||
Status: Downloaded newer image for joplin/server:latest
|
||||
Creating joplin_db_1 ... done
|
||||
Creating joplin_app_1 ... done
|
||||
```
|
||||
|
||||
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:
|
||||
|
||||
Source:
|
||||
|
||||
- Protocole: HTTPS
|
||||
- Nom d'hôte: clicclac.synology.me
|
||||
- Port: 22301
|
||||
- Activer HTTP/2
|
||||
|
||||
Destination:
|
||||
|
||||
- Protocole: HTTP
|
||||
- Nom d'hôte: localhost
|
||||
- Port: 22300
|
||||
|
||||
Le serveur est disponible depuis l'extérieur sur: https://clicclac.synology.me:22301
|
||||
|
||||
On se connecte à https://clicclac.synology.me:22301/login en administrateur avec l'utilisateur **admin@localhost** et le mot-de-passe **admin**, puis on change l'émail et la password. On peut un utilisateur non-admin juste pour la synchro avec les clients Joplin.
|
||||
|
||||
#### Voir les logs:
|
||||
|
||||
```bash
|
||||
$ 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
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Application Joplin
|
||||
|
||||
Préférences -> Synchronisation:
|
||||
|
||||
Cible de la synchronisation: Joplin Server
|
||||
|
||||
Serveur Joplin:
|
||||
|
||||
- URL: https://clicclac.synology.me:22301
|
||||
- Dossier: home
|
||||
- Utilisateur: bruno@xxx.info
|
||||
- Mot de passe: xxxxx
|
||||
|
||||
|
||||
|
||||
136
docs/Synology/ImageMagick.md
Normal file
136
docs/Synology/ImageMagick.md
Normal file
@@ -0,0 +1,136 @@
|
||||
|
||||
|
||||
#### Paquet opkg
|
||||
|
||||
Formats supportés:
|
||||
|
||||
```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
|
||||
Features: DPC Modules
|
||||
Delegates (built-in): freetype jng jpeg ltdl png tiff zlib
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
$ identify /volume1/web/IMG_0636.HEIC
|
||||
identify: NoDecodeDelegateForThisImageFormat `HEIC' @ error/constitute.c/ReadImage/562.
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Paquet SynoCommunity
|
||||
|
||||
Formats supportés:
|
||||
|
||||
```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
|
||||
Features: Cipher DPC HDRI Modules OpenMP(4.5)
|
||||
Delegates (built-in): bzlib fontconfig freetype heic jng jp2 jpeg lcms ltdl lzma png tiff webp wmf xml zlib
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
$ /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.
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
$ 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
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Debug
|
||||
|
||||
$ identify -debug configure -list configure
|
||||
|
||||
```bash
|
||||
$ /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
|
||||
Searching for configure file: "/usr/local/etc/ImageMagick-7/configure.xml"
|
||||
2021-07-10T09:22:23+00:00 0:00.001 0.000u 7.0.11 Configure identify[6366]: configure.c/GetConfigureOptions/675/Configure
|
||||
Searching for configure file: "/usr/local/share/ImageMagick-7/configure.xml"
|
||||
2021-07-10T09:22:23+00:00 0:00.001 0.000u 7.0.11 Configure identify[6366]: configure.c/GetConfigureOptions/675/Configure
|
||||
Searching for configure file: "/var/packages/imagemagick/target/lib/ImageMagick-7.0.11//config-Q16HDRI/configure.xml"
|
||||
2021-07-10T09:22:23+00:00 0:00.001 0.000u 7.0.11 Configure identify[6366]: configure.c/GetConfigureOptions/675/Configure
|
||||
Searching for configure file: "configure.xml"
|
||||
2021-07-10T09:22:23+00:00 0:00.001 0.000u 7.0.11 Configure identify[6366]: configure.c/GetConfigureOptions/675/Configure
|
||||
Searching for configure file: "/var/services/homes/bruno/.config/ImageMagick/configure.xml"
|
||||
|
||||
Path: [built-in]
|
||||
|
||||
Name Value
|
||||
-------------------------------------------------------------------------------
|
||||
DELEGATES bzlib fontconfig freetype heic jng jp2 jpeg lcms ltdl lzma png tiff webp wmf xml zlib
|
||||
FEATURES Cipher DPC HDRI Modules OpenMP(4.5)
|
||||
MAGICK_TEMPORARY_PATH /var/services/homes/bruno/tmp
|
||||
NAME ImageMagick
|
||||
QuantumDepth Q16
|
||||
identify: UnableToOpenConfigureFile `configure.xml' @ warning/configure.c/GetConfigureOptions/702.
|
||||
```
|
||||
|
||||
|
||||
|
||||
Fichiers xml
|
||||
|
||||
```bash
|
||||
/var/packages/imagemagick/target/etc/ImageMagick-7
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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
|
||||
|
||||
#
|
||||
/usr/local/Cellar/imagemagick/7.1.0-2_1/lib/ImageMagick/config-Q16HDRI
|
||||
-r--r--r-- 1 bruno staff 6557 Jul 7 07:26 configure.xml
|
||||
|
||||
# /var/packages/imagemagick/target/etc/ImageMagick-7
|
||||
/usr/local/Cellar/imagemagick/7.1.0-2_1/etc/ImageMagick-7
|
||||
-rw-r--r-- 1 bruno staff 1383 Jun 25 13:22 colors.xml
|
||||
-rw-r--r-- 1 bruno staff 13804 Jun 25 13:22 delegates.xml
|
||||
-rw-r--r-- 1 bruno staff 1642 Jun 25 13:22 log.xml
|
||||
-rw-r--r-- 1 bruno staff 134319 Jul 7 07:26 mime.xml
|
||||
-rw-r--r-- 1 bruno staff 3773 Jun 25 13:22 policy.xml
|
||||
-rw-r--r-- 1 bruno staff 2369 Jun 25 13:22 quantization-table.xml
|
||||
-rw-r--r-- 1 bruno staff 11453 Jun 25 13:22 thresholds.xml
|
||||
-rw-r--r-- 1 bruno staff 29218 Jun 25 13:22 type-apple.xml
|
||||
-rw-r--r-- 1 bruno staff 8490 Jun 25 13:22 type-dejavu.xml
|
||||
-rw-r--r-- 1 bruno staff 9952 Jul 7 07:26 type-ghostscript.xml
|
||||
-rw-r--r-- 1 bruno staff 8162 Jun 25 13:22 type-urw-base35.xml
|
||||
-rw-r--r-- 1 bruno staff 13706 Jun 25 13:22 type-windows.xml
|
||||
-rw-r--r-- 1 bruno staff 612 Jun 25 13:22 type.xml
|
||||
|
||||
```
|
||||
|
||||
@@ -319,6 +319,8 @@ root@DS916:/volume1/@appstore/PHP7.0/misc# nano extension_list.json
|
||||
/usr/local/bin/php56
|
||||
- PHP 7.3 (Package PHP 7)
|
||||
/usr/local/bin/php73
|
||||
- PHP 7.4 (Package PHP 7)
|
||||
/usr/local/bin/php74
|
||||
|
||||
Pour Apache, c'est la version choisie dans WebStation qui est active.
|
||||
|
||||
@@ -328,51 +330,86 @@ Pour Apache, c'est la version choisie dans WebStation qui est active.
|
||||
$ which php
|
||||
/bin/php
|
||||
|
||||
$ php -v
|
||||
PHP 5.6.11 (cli) (built: Jun 8 2018 15:13:30)
|
||||
Copyright (c) 1997-2015 The PHP Group
|
||||
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
|
||||
$ /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
|
||||
|
||||
$ php --ini
|
||||
Configuration File (php.ini) Path: /etc/php
|
||||
Loaded Configuration File: /etc/php/php.ini
|
||||
Scan for additional .ini files in: (none)
|
||||
Additional .ini files parsed: (none)
|
||||
$ /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
|
||||
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:
|
||||
|
||||
```bash
|
||||
$ which php56
|
||||
/usr/local/bin/php56
|
||||
|
||||
$ php56 -v
|
||||
PHP 5.6.36 (cli) (built: May 2 2018 16:13:10)
|
||||
Copyright (c) 1997-2016 The PHP Group
|
||||
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
|
||||
|
||||
$ php56 --ini
|
||||
Configuration File (php.ini) Path: /usr/local/etc/php56
|
||||
Loaded Configuration File: /usr/local/etc/php56/php.ini
|
||||
Scan for additional .ini files in: /usr/local/etc/php56/conf.d
|
||||
Additional .ini files parsed: /usr/local/etc/php56/conf.d/phpMyAdmin.ini,
|
||||
/usr/local/etc/php56/conf.d/webstation-extensions.ini
|
||||
|
||||
|
||||
$ which php70
|
||||
/usr/local/bin/php70
|
||||
|
||||
$ php70 -v
|
||||
PHP 7.0.30 (cli) (built: May 2 2018 16:29:25) ( NTS )
|
||||
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.30, Copyright (c) 1999-2017, by Zend Technologies
|
||||
with Zend OPcache v7.0.33, Copyright (c) 1999-2017, by Zend Technologies
|
||||
|
||||
$ 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
|
||||
/usr/local/bin/php72
|
||||
|
||||
$ 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
|
||||
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
|
||||
/usr/local/bin/php73
|
||||
|
||||
$ 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
|
||||
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
|
||||
/usr/local/bin/php74
|
||||
|
||||
$ 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
|
||||
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:
|
||||
@@ -421,6 +458,8 @@ PHP 7.3.16 (cli) (built: Jun 2 2020 11:39:19) ( NTS )
|
||||
Copyright (c) 1997-2018 The PHP Group
|
||||
Zend Engine v3.3.16, Copyright (c) 1998-2018 Zend Technologies
|
||||
|
||||
lrwxrwxrwx 1 root root 45 Sep 17 10:26 php -> /volume1/@appstore/PHP7.3/usr/local/bin/php73
|
||||
|
||||
```
|
||||
|
||||
|
||||
238
docs/Synology/dsm7/dsm7.md
Normal file
238
docs/Synology/dsm7/dsm7.md
Normal file
@@ -0,0 +1,238 @@
|
||||
|
||||
|
||||
# DSM 7
|
||||
|
||||
|
||||
|
||||
Status paquets SynoCommunity:
|
||||
|
||||
https://github.com/SynoCommunity/spksrc/issues/4524
|
||||
|
||||
|
||||
|
||||
#### ffmpeg (SynoCommunity)
|
||||
|
||||
```bash
|
||||
$ /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
|
||||
libavutil 56. 51.100 / 56. 51.100
|
||||
libavcodec 58. 91.100 / 58. 91.100
|
||||
libavformat 58. 45.100 / 58. 45.100
|
||||
libavdevice 58. 10.100 / 58. 10.100
|
||||
libavfilter 7. 85.100 / 7. 85.100
|
||||
libavresample 4. 0. 0 / 4. 0. 0
|
||||
libswscale 5. 7.100 / 5. 7.100
|
||||
libswresample 3. 7.100 / 3. 7.100
|
||||
libpostproc 55. 7.100 / 55. 7.100
|
||||
```
|
||||
|
||||
#### ffmpeg (dsm7)
|
||||
|
||||
```bash
|
||||
$ which ffmpeg
|
||||
/bin/ffmpeg
|
||||
|
||||
$ 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
|
||||
libavutil 56. 22.100 / 56. 22.100
|
||||
libavcodec 58. 35.100 / 58. 35.100
|
||||
libavformat 58. 20.100 / 58. 20.100
|
||||
libavdevice 58. 5.100 / 58. 5.100
|
||||
libavfilter 7. 40.101 / 7. 40.101
|
||||
libswscale 5. 3.100 / 5. 3.100
|
||||
libswresample 3. 3.100 / 3. 3.100
|
||||
libpostproc 55. 3.100 / 55. 3.100
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Web Station
|
||||
|
||||
#### php
|
||||
|
||||
```bash
|
||||
$ which php
|
||||
/bin/php
|
||||
|
||||
$ 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
|
||||
/usr/local/bin/php74
|
||||
$ 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:
|
||||
|
||||
```bash
|
||||
extension_dir = /usr/local/lib/php74/modules
|
||||
```
|
||||
|
||||
```bash
|
||||
$ 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
|
||||
```
|
||||
|
||||
```bash
|
||||
# PHP info
|
||||
|
||||
$ php74 -i
|
||||
phpinfo()
|
||||
PHP Version => 7.4.9
|
||||
|
||||
System => Linux DS916 3.10.108 #41890 SMP Fri Jun 25 02:39:26 CST 2021 x86_64
|
||||
Build Date => Apr 22 2021 16:12:31
|
||||
Server API => Command Line Interface
|
||||
Virtual Directory Support => disabled
|
||||
Configuration File (php.ini) Path => /usr/local/etc/php74/cli
|
||||
Loaded Configuration File => /usr/local/etc/php74/cli/php.ini
|
||||
Scan this dir for additional .ini files => /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
|
||||
|
||||
PHP API => 20190902
|
||||
PHP Extension => 20190902
|
||||
Zend Extension => 320190902
|
||||
Zend Extension Build => API320190902,NTS
|
||||
PHP Extension Build => API20190902,NTS
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
/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)
|
||||
-rw-r--r-- 1 root root 8275 Jun 30 14:43 php.ini
|
||||
|
||||
/usr/local/etc/php74/cli/conf.d $ ls
|
||||
# Liste des extensions disponibles (Web Station -> Paramètres du language de script)
|
||||
-rw-r--r-- 1 root root 795 Jun 30 14:43 extension.ini
|
||||
-rw-r--r-- 1 root root 33 Jun 30 14:43 timezone.ini
|
||||
```
|
||||
|
||||
Logs:
|
||||
|
||||
```bash
|
||||
sudo tail -f /var/log/php73-fpm.log
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### nginx
|
||||
|
||||
Version:
|
||||
|
||||
```bash
|
||||
$ nginx -V
|
||||
nginx version: nginx/1.17.10
|
||||
TLS SNI support enabled
|
||||
```
|
||||
|
||||
Fichiers html:
|
||||
|
||||
```bash
|
||||
/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
|
||||
/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
|
||||
|
||||
/etc/nginx/sites-enabled $ ls
|
||||
lrwxrwxrwx 1 root root 80 Jul 7 12:41 server.ReverseProxy.conf -> /usr/local/etc/nginx/sites-available/65fb5bd7-8b91-4bd5-a1bf-ef37a0ff48ca.w3conf
|
||||
lrwxrwxrwx 1 root root 80 Jul 7 13:46 server.webstation.conf -> /usr/local/etc/nginx/sites-available/869ece58-e587-47ca-acf4-39c0e870f53f.w3conf
|
||||
lrwxrwxrwx 1 root root 80 Jul 7 13:46 server.webstation-vhost.conf -> /usr/local/etc/nginx/sites-available/155c718b-0ebe-47dc-81d0-8c22baace8e5.w3conf
|
||||
lrwxrwxrwx 1 root root 80 Jul 7 13:45 synowstransfer-nginx.conf -> /usr/local/etc/nginx/sites-available/6e75aa1e-afa3-475c-8391-d980fd3c7a1f.w3conf
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
/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
|
||||
drwxr-xr-x 2 root root 4096 Jul 7 13:45 sites-available
|
||||
drwxr-xr-x 2 root root 4096 Jul 7 13:46 sites-enabled
|
||||
|
||||
/usr/local/etc/nginx/sites-enabled $ l
|
||||
lrwxrwxrwx 1 root root 80 Jul 7 12:41 server.ReverseProxy.conf -> /usr/local/etc/nginx/sites-available/65fb5bd7-8b91-4bd5-a1bf-ef37a0ff48ca.w3conf
|
||||
lrwxrwxrwx 1 root root 80 Jul 7 13:46 server.webstation.conf -> /usr/local/etc/nginx/sites-available/869ece58-e587-47ca-acf4-39c0e870f53f.w3conf
|
||||
lrwxrwxrwx 1 root root 80 Jul 7 13:46 server.webstation-vhost.conf -> /usr/local/etc/nginx/sites-available/155c718b-0ebe-47dc-81d0-8c22baace8e5.w3conf
|
||||
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
|
||||
$ 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
|
||||
-rw-rw---- 1 system log 642376 Jul 11 08:12 error.log
|
||||
-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:
|
||||
|
||||
```bash
|
||||
$ 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:
|
||||
|
||||
```bash
|
||||
$ sudo nginx -s reload
|
||||
```
|
||||
|
||||
Autres commandes:
|
||||
|
||||
```bash
|
||||
# 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
|
||||
|
||||
# les Log-Files sont relancés.
|
||||
$ sudo nginx -s reopen
|
||||
|
||||
# lancer nginx
|
||||
$ sudo service nginx start
|
||||
|
||||
# Redémarrer le serveur nginx:
|
||||
$ synosystemctl restart nginx
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Liens
|
||||
|
||||
[nginx.md](../nginx.md)
|
||||
40
docs/Synology/dsm7/node.md
Normal file
40
docs/Synology/dsm7/node.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# Node.js
|
||||
|
||||
|
||||
|
||||
Installer nvm
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
Mettre-à-jour npm
|
||||
|
||||
```bash
|
||||
$ 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
|
||||
```
|
||||
|
||||
|
||||
|
||||
Installer thumbsup
|
||||
|
||||
```bash
|
||||
$ npm -g install thumbsup
|
||||
|
||||
$ which thumbsup
|
||||
/var/services/homes/bruno/.nvm/versions/node/v14.17.3/bin/thumbsup
|
||||
```
|
||||
|
||||
70
docs/Synology/dsm7/python.md
Normal file
70
docs/Synology/dsm7/python.md
Normal file
@@ -0,0 +1,70 @@
|
||||
|
||||
|
||||
# Python
|
||||
|
||||
|
||||
|
||||
Python 3 est installé par défaut:
|
||||
|
||||
```bash
|
||||
$ python -V
|
||||
Python 3.8.8
|
||||
|
||||
$ which python
|
||||
/bin/python
|
||||
```
|
||||
|
||||
|
||||
|
||||
<u>pip n'est pas installé par défaut</u>
|
||||
|
||||
```bash
|
||||
$ curl https://bootstrap.pypa.io/get-pip.py -o 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)
|
||||
Installing collected packages: pip
|
||||
WARNING: The scripts pip, pip3 and pip3.8 are installed in '/var/services/homes/bruno/.local/bin' which is not on PATH.
|
||||
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
|
||||
Successfully installed pip-21.1.3
|
||||
|
||||
# Ajouter /volume1/homes/bruno/.local/bin au $PATH
|
||||
|
||||
# Utiliser sudo pour une install globale
|
||||
```
|
||||
|
||||
|
||||
|
||||
Local installation:
|
||||
|
||||
```bash
|
||||
$ which pip3
|
||||
/var/services/homes/bruno/.local/bin/pip3
|
||||
```
|
||||
|
||||
|
||||
|
||||
Mieux vaut créer un environnement virtuel:
|
||||
|
||||
```bash
|
||||
# Création de l'environnement virtuel
|
||||
bruno@DS916:~/venv $ python3 -m venv mkdocs
|
||||
|
||||
# Activation
|
||||
bruno@DS916:~/venv $ source mkdocs/bin/activate
|
||||
|
||||
# Mise-à-jour de pip et setuptools
|
||||
(mkdocs) bruno@DS916:~/venv $ pip3 install -U pip setuptools
|
||||
|
||||
# Installation de mkdocs
|
||||
(mkdocs) bruno@DS916:~/venv $ pip3 install -U mkdocs
|
||||
|
||||
# Dé-activation
|
||||
(mkdocs) bruno@DS916:~/venv $ deactivate
|
||||
|
||||
$ /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)
|
||||
```
|
||||
|
||||
181
docs/Synology/dsm7/wordpress.md
Normal file
181
docs/Synology/dsm7/wordpress.md
Normal file
@@ -0,0 +1,181 @@
|
||||
# WordPress
|
||||
|
||||
|
||||
|
||||
#### Installer WordPress:
|
||||
|
||||
Téléchargement:
|
||||
|
||||
```bash
|
||||
$ 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 {} \;
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Créer un Virtual Host:
|
||||
|
||||
- Aller dans **Web Station** -> **Portail de services Web** -> Créer -> **Créer un portail de service**
|
||||
- Sélectionner **Virtual Host**
|
||||
- Configurer un **hôte virtuel**:
|
||||
-Nom d'hôte:
|
||||
-Port: cocher 80/443
|
||||
-Racine du document: web/wordpress
|
||||
-Paramètres HTTPS: cocher HSTS
|
||||
-Serveur principal HTTP: Nginx
|
||||
-PHP: PHP 7.4
|
||||
|
||||
DSM ajustera les permissions pour les fichiers WordPress.
|
||||
|
||||
|
||||
|
||||
#### Créer une base MariaDB:
|
||||
|
||||
```bash
|
||||
$ sudo mysql -u root -p
|
||||
```
|
||||
|
||||
```mariadb
|
||||
# Supprimer une ancienne base:
|
||||
# DROP DATABASE wordpress;
|
||||
|
||||
MariaDB > CREATE DATABASE wordpress;
|
||||
|
||||
# Créer un utilisateur autorisé à se connecter uniquement depuis le NAS
|
||||
MariaDB > CREATE USER 'adm_wp'@'localhost' IDENTIFIED BY 'DB_password';
|
||||
|
||||
# Créer un utilisateur autorisé à se connecter uniquement depuis une IP fixe (interne/externe)
|
||||
# CREATE USER 'adm_wp'@'192.168.1.123' IDENTIFIED BY 'DB_password';
|
||||
# Créer un utilisateur autorisé à se connecter uniquement depuis le réseau local
|
||||
# CREATE USER 'adm_wp'@'192.168.1.%' IDENTIFIED BY 'DB_password';
|
||||
# Créer un utilisateur autorisé à se connecter uniquement depuis ln'importe où
|
||||
# CREATE USER 'adm_wp'@'%' IDENTIFIED BY 'DB_password';
|
||||
|
||||
# Donner tousles droits à l'utilisateur admin_wp sur la base wordpress depuis le NAS
|
||||
MariaDB > GRANT ALL PRIVILEGES ON wordpress . * TO 'adm_wp'@'localhost';
|
||||
|
||||
# On peut regrouper les 2 dernières commandes
|
||||
# GRANT ALL ON wordpress.* TO 'adm_wp'@'localhost' IDENTIFIED BY 'Kpm!65YU$q';
|
||||
|
||||
MariaDB > FLUSH PRIVILEGES;
|
||||
```
|
||||
|
||||
Vérifier la base créee:
|
||||
|
||||
```mariadb
|
||||
MariaDB > SHOW DATABASES;
|
||||
+--------------------+
|
||||
| Database |
|
||||
+--------------------+
|
||||
| admin_gitea |
|
||||
| information_schema |
|
||||
| mysql |
|
||||
| nextcloud |
|
||||
| performance_schema |
|
||||
| wordpress |
|
||||
+--------------------+
|
||||
|
||||
MariaDB > SELECT User, Host FROM mysql.user;
|
||||
+-----------------+-----------+
|
||||
| User | Host |
|
||||
+-----------------+-----------+
|
||||
| adm_gitea | % |
|
||||
| admin_nextcloud | % |
|
||||
| root | 127.0.0.1 |
|
||||
| root | ::1 |
|
||||
| adm_wp | localhost |
|
||||
| root | localhost |
|
||||
+-----------------+-----------+
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Finaliser l'installation:
|
||||
|
||||
Aller à https://clicclac.synology.me/wordpress dans Firefox.
|
||||
|
||||
|
||||
|
||||
#### Permaliens:
|
||||
|
||||
|
||||
|
||||
```php
|
||||
# Note : avec DSM7, le chemin d'accès du fichier server.ReverseProxy.conf a changé
|
||||
# DSM6.2 = /etc/nginx/app.d/server.ReverseProxy.conf
|
||||
# DSM7 = /etc/nginx/sites-enabled/server.ReverseProxy.conf
|
||||
```
|
||||
|
||||
|
||||
|
||||
Identification du dossier *réceptacle*:
|
||||
|
||||
```bash
|
||||
$ sudo nano /usr/local/etc/nginx/sites-enabled/server.webstation-vhost.conf
|
||||
```
|
||||
|
||||
```nginx
|
||||
...
|
||||
|
||||
include /usr/local/etc/nginx/conf.d/2bbf5ec3-353e-48c2-8564-f5ad432bb05e/user.conf*;
|
||||
|
||||
...
|
||||
```
|
||||
|
||||
Création du fichier:
|
||||
|
||||
```bash
|
||||
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
|
||||
```
|
||||
|
||||
```nginx
|
||||
location /{
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
```
|
||||
|
||||
Tester la configuration et recharger nginx:
|
||||
|
||||
```bash
|
||||
$ sudo nginx -t
|
||||
|
||||
$ sudo systemctl reload nginx
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Mises-à-jour
|
||||
|
||||
Configurer le fichier <u>config.php</u> comme suit:
|
||||
|
||||
```php
|
||||
define( 'FS_METHOD', 'ftpext' );
|
||||
define( 'FTP_PASS', 'nas_password' );
|
||||
define( 'FTP_USER', 'bruno' );
|
||||
define( 'FTP_HOST', 'clicclac.synology.me:21' );
|
||||
```
|
||||
|
||||
ou plus simplement:
|
||||
|
||||
```php
|
||||
define( 'FS_METHOD', 'direct' );
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Liens:
|
||||
|
||||
[Installer WordPress sur Debian / nginx](../../Divers/wordpress.md)
|
||||
@@ -1,28 +1,48 @@
|
||||
# Synology
|
||||
|
||||
|
||||
|
||||
### Packages manager:
|
||||
|
||||
[Installer ipkg et ses packages (DSM5)](opkg/iPKG5.md)
|
||||
|
||||
[Installer ipkg et ses packages (DSM6)](opkg/iPKG6.md)
|
||||
|
||||
[Installer oPKG](opkg/oPKG.md) (Entware)
|
||||
|
||||
[Installer le shell bash](bash.md)
|
||||
|
||||
[Installer Gitea](gitea.md)
|
||||
|
||||
Installer ownCloud (depuis paquet)
|
||||
### DSM
|
||||
|
||||
[Installer ownCloud (depuis archive) (DSM6)](owncloud.md)
|
||||
|
||||
[Dossiers @eaDir](eadir.md)
|
||||
|
||||
[DSM 6](dsm6.md)
|
||||
|
||||
[Scripts](scripts.md)
|
||||
- [crontab](crontab.md)
|
||||
- [Installer le shell bash](bash.md)
|
||||
- [Dossiers @eaDir](eadir.md)
|
||||
- [Scripts](scripts.md)
|
||||
- [WordPress](wordpress.md)
|
||||
|
||||
|
||||
|
||||
#### Liens:
|
||||
### DSM7
|
||||
|
||||
- [DSM 7](dsm7/dsm7.md)
|
||||
- [Node.js](dsm7/node.md)
|
||||
- [Python](dsm7/python.md)
|
||||
|
||||
|
||||
|
||||
### DSM6
|
||||
|
||||
- [DSM 6](dsm6/dsm6.md)
|
||||
- [Installer Gitea](dsm6/gitea.md)
|
||||
- [Installer ownCloud (depuis archive)](dsm6/owncloud.md)
|
||||
- [Installer Nextcloud](dsm6/nextcloud.md)
|
||||
- [PHP](dsm6/php.md)
|
||||
- [Python](dsm6/python)
|
||||
- [Services](dsm6/services.md)
|
||||
|
||||
|
||||
|
||||
### Liens:
|
||||
|
||||
[DS916+ Guide d'installation rapide](syno_qig_ds916_fra.pdf)
|
||||
|
||||
|
||||
460
docs/Synology/nginx.md
Normal file
460
docs/Synology/nginx.md
Normal file
@@ -0,0 +1,460 @@
|
||||
# nginx
|
||||
|
||||
|
||||
|
||||
#### SSL
|
||||
|
||||
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
|
||||
# => /etc/ssl/certs/nginx-selfsigned.crt
|
||||
|
||||
$ sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048
|
||||
# => /etc/ssl/certs/dhparam.pem
|
||||
|
||||
$ 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
|
||||
# ajouter:
|
||||
# from https://cipherli.st/
|
||||
# and https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html
|
||||
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||
ssl_prefer_server_ciphers on;
|
||||
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
|
||||
ssl_ecdh_curve secp384r1;
|
||||
ssl_session_cache shared:SSL:10m;
|
||||
ssl_session_tickets off;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
resolver 8.8.8.8 8.8.4.4 valid=300s;
|
||||
resolver_timeout 5s;
|
||||
# Disable preloading HSTS for now. You can use the commented out header line that includes
|
||||
# the "preload" directive if you understand the implications.
|
||||
#add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
|
||||
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains";
|
||||
add_header X-Frame-Options DENY;
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
```nginx
|
||||
# 1. Redirection http vers https
|
||||
# /etc/nginx/sites-available/default
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
root /var/www/debian/html;
|
||||
|
||||
index index.html index.htm index.php index.nginx-debian.html;
|
||||
|
||||
server_name localhost;
|
||||
# redirection temporaire (302), permanente (301)
|
||||
return 302 https://$server_name$request_uri;
|
||||
|
||||
location / {
|
||||
# First attempt to serve request as file, then
|
||||
# as directory, then fall back to displaying a 404.
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
# SSL configuration
|
||||
|
||||
listen 443 ssl http2 default_server;
|
||||
listen [::]:443 ssl http2 default_server;
|
||||
include snippets/self-signed.conf;
|
||||
include snippets/ssl-params.conf;
|
||||
}
|
||||
```
|
||||
|
||||
```nginx
|
||||
# 2. Autoriser http et https
|
||||
# /etc/nginx/sites-available/default
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
listen 443 ssl http2 default_server;
|
||||
listen [::]:443 ssl http2 default_server;
|
||||
|
||||
root /var/www/debian/html;
|
||||
|
||||
index index.html index.htm index.php index.nginx-debian.html;
|
||||
|
||||
server_name localhost;
|
||||
return 302 https://$server_name$request_uri;
|
||||
|
||||
location / {
|
||||
# First attempt to serve request as file, then
|
||||
# as directory, then fall back to displaying a 404.
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
include snippets/self-signed.conf;
|
||||
include snippets/ssl-params.conf;
|
||||
}
|
||||
```
|
||||
|
||||
Tester la configuration et redémarrer nginx:
|
||||
|
||||
```bash
|
||||
# message normal pour certificat auto-signé
|
||||
|
||||
$ 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
|
||||
|
||||
$ sudo systemctl restart nginx
|
||||
```
|
||||
|
||||
Vérifier le status de nginx:
|
||||
|
||||
```bash
|
||||
$ 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
|
||||
Docs: man:nginx(8)
|
||||
Process: 14769 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, sta
|
||||
Process: 14770 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUC
|
||||
Main PID: 14771 (nginx)
|
||||
Tasks: 5 (limit: 4682)
|
||||
Memory: 5.7M
|
||||
CGroup: /system.slice/nginx.service
|
||||
├─14771 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
|
||||
├─14772 nginx: worker process
|
||||
├─14773 nginx: worker process
|
||||
├─14774 nginx: worker process
|
||||
└─14775 nginx: worker process
|
||||
|
||||
```
|
||||
|
||||
#### Logs
|
||||
|
||||
```bash
|
||||
/var/log/nginx$ ls -la
|
||||
-rw-r----- 1 www-data adm 2812 juil. 13 12:00 access.log
|
||||
-rw-r----- 1 www-data adm 3252 juil. 13 11:51 error.log
|
||||
```
|
||||
```bash
|
||||
$ nano /etc/nginx/nginx.conf
|
||||
```
|
||||
|
||||
```nginx
|
||||
##
|
||||
# Logging Settings
|
||||
##
|
||||
|
||||
access_log /var/log/nginx/access.log;
|
||||
error_log /var/log/nginx/error.log;
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Utilisation
|
||||
|
||||
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
|
||||
|
||||
```
|
||||
|
||||
On peut controller directement nginx avec les signals:
|
||||
|
||||
```bash
|
||||
# Relancer nginx
|
||||
|
||||
$ sudo /usr/sbin/nginx -s reload
|
||||
```
|
||||
|
||||
Aide:
|
||||
|
||||
```bash
|
||||
$ sudo /usr/sbin/nginx -h
|
||||
nginx version: nginx/1.14.2
|
||||
Usage: nginx [-?hvVtTq] [-s signal] [-c filename] [-p prefix] [-g directives]
|
||||
|
||||
Options:
|
||||
-?,-h : this help
|
||||
-v : show version and exit
|
||||
-V : show version and configure options then exit
|
||||
-t : test configuration and exit
|
||||
-T : test configuration, dump it and exit
|
||||
-q : suppress non-error messages during configuration testing
|
||||
-s signal : send signal to a master process: stop, quit, reopen, reload
|
||||
-p prefix : set prefix path (default: /usr/share/nginx/)
|
||||
-c filename : set configuration file (default: /etc/nginx/nginx.conf)
|
||||
-g directives : set global directives out of configuration file
|
||||
```
|
||||
|
||||
Tester la configuration:
|
||||
|
||||
```bash
|
||||
$ 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
|
||||
```
|
||||
|
||||
Tester la configuration et l'afficher:
|
||||
|
||||
```nginx
|
||||
$ 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:
|
||||
user www-data;
|
||||
worker_processes auto;
|
||||
pid /run/nginx.pid;
|
||||
include /etc/nginx/modules-enabled/*.conf;
|
||||
|
||||
events {
|
||||
worker_connections 768;
|
||||
# multi_accept on;
|
||||
}
|
||||
|
||||
http {
|
||||
##
|
||||
# Basic Settings
|
||||
##
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
keepalive_timeout 65;
|
||||
types_hash_max_size 2048;
|
||||
# server_tokens off;
|
||||
|
||||
.../...
|
||||
}
|
||||
|
||||
# configuration file /etc/nginx/modules-enabled/50-mod-http-auth-pam.conf:
|
||||
load_module modules/ngx_http_auth_pam_module.so;
|
||||
|
||||
# configuration file /etc/nginx/modules-enabled/50-mod-http-dav-ext.conf:
|
||||
load_module modules/ngx_http_dav_ext_module.so;
|
||||
|
||||
.../...
|
||||
|
||||
# configuration file /etc/nginx/mime.types:
|
||||
|
||||
types {
|
||||
text/html html htm shtml;
|
||||
text/css css;
|
||||
.../...
|
||||
}
|
||||
|
||||
# configuration file /etc/nginx/sites-enabled/default:
|
||||
##
|
||||
# You should look at the following URL's in order to grasp a solid understanding
|
||||
# of Nginx configuration files in order to fully unleash the power of Nginx.
|
||||
# https://www.nginx.com/resources/wiki/start/
|
||||
# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
|
||||
# https://wiki.debian.org/Nginx/DirectoryStructure
|
||||
#
|
||||
# In most cases, administrators will remove this file from sites-enabled/ and
|
||||
# leave it as reference inside of sites-available where it will continue to be
|
||||
# updated by the nginx packaging team.
|
||||
#
|
||||
# This file will automatically load configuration files provided by other
|
||||
# applications, such as Drupal or Wordpress. These applications will be made
|
||||
# available underneath a path with that package name, such as /drupal8.
|
||||
#
|
||||
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
|
||||
##
|
||||
|
||||
# Default server configuration
|
||||
#
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
.../...
|
||||
|
||||
root /var/www/html;
|
||||
|
||||
# Add index.php to the list if you are using PHP
|
||||
index index.html index.htm index.nginx-debian.html;
|
||||
|
||||
server_name _;
|
||||
|
||||
location / {
|
||||
# First attempt to serve request as file, then
|
||||
# as directory, then fall back to displaying a 404.
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
# pass PHP scripts to FastCGI server
|
||||
#
|
||||
#location ~ \.php$ {
|
||||
# include snippets/fastcgi-php.conf;
|
||||
#
|
||||
# # With php-fpm (or other unix sockets):
|
||||
# fastcgi_pass unix:/run/php/php7.3-fpm.sock;
|
||||
# # With php-cgi (or other tcp sockets):
|
||||
# fastcgi_pass 127.0.0.1:9000;
|
||||
#}
|
||||
|
||||
}
|
||||
|
||||
|
||||
# Virtual Host configuration for example.com
|
||||
#
|
||||
# You can move that to a different file under sites-available/ and symlink that
|
||||
# to sites-enabled/ to enable it.
|
||||
#
|
||||
#server {
|
||||
# listen 80;
|
||||
# listen [::]:80;
|
||||
#
|
||||
# server_name example.com;
|
||||
#
|
||||
# root /var/www/example.com;
|
||||
# index index.html;
|
||||
#
|
||||
# location / {
|
||||
# try_files $uri $uri/ =404;
|
||||
# }
|
||||
#}
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
```nginx
|
||||
http {
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
root /var/service/web;
|
||||
index index.html index.htm index.php;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
|
||||
access_log /var/log/nginx/myexample.access.http.log;
|
||||
error_log /var/log/nginx/myexample.error.http.log;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443;
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
root /var/service/web;
|
||||
index index.html index.htm index.php;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
|
||||
access_log /var/log/nginx/myexample.access.https.log;
|
||||
error_log /var/log/nginx/myexample.error.https.log;
|
||||
|
||||
ssl on;
|
||||
ssl_certificate /etc/nginx/ssl/server.crt;
|
||||
ssl_certificate_key /etc/nginx/ssl/server.key;
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
Site accessible via HTTP et HTTPS:
|
||||
|
||||
```nginx
|
||||
server {
|
||||
listen 80;
|
||||
root /var/www/html;
|
||||
index index.html index.htm index.php;
|
||||
server_name example.com example;
|
||||
access_log /var/log/nginx/myexample.access.http.log;
|
||||
error_log /var/log/nginx/myexample.error.http.log;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443;
|
||||
root /var/www/html;
|
||||
index index.html index.htm index.php;
|
||||
server_name example.com example;
|
||||
access_log /var/log/nginx/myexample.access.https.log;
|
||||
error_log /var/log/nginx/myexample.error.https.log;
|
||||
ssl on;
|
||||
ssl_certificate /etc/nginx/ssl/server.crt;
|
||||
ssl_certificate_key /etc/nginx/ssl/server.key;
|
||||
}
|
||||
```
|
||||
|
||||
Reverse proxy:
|
||||
|
||||
```nginx
|
||||
upstream mysite {
|
||||
server localhost:8080;
|
||||
}
|
||||
server {
|
||||
server_name mysite.local;
|
||||
location / {
|
||||
proxy_pass http://mysite.local;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
PHP:
|
||||
|
||||
```nginx
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
fastcgi_pass unix:/var/run/php5-fpm.sock;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
```
|
||||
|
||||
Redirige les www. vers la version sans www
|
||||
|
||||
```nginx
|
||||
server {
|
||||
listen 80;
|
||||
server_name www.monsupersite.fr;
|
||||
return 301 http://monsupersite.fr$request_uri;
|
||||
}
|
||||
```
|
||||
|
||||
@@ -275,11 +275,75 @@ bruno@silverbook:~$ ssh dsm916 ./kymsu/kymsu2.sh
|
||||
|
||||
|
||||
|
||||
#### Paquets opkg
|
||||
|
||||
```bash
|
||||
$ sudo opkg find '*lsof*'
|
||||
lsof - 4.94.0-1 - LiSt Open Files - a diagnostic tool
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Compiler dcraw.
|
||||
|
||||
Télécharger les [sources](https://sourceforge.net/projects/dsgpl/files/Synology%20NAS%20GPL%20Source/24922branch/evansport-source/), puis:
|
||||
|
||||
```bash
|
||||
$ gcc -o dcraw -O4 dcraw.c -lm -DNO_JPEG -DNODEP
|
||||
$ gcc -o dcraw -O4 dcraw.c -lm -DNO_JPEG -DNODEPS
|
||||
|
||||
$ gcc -o dcraw -O4 dcraw.c -lm -DNODEPS
|
||||
```
|
||||
Identifier sans décoder (-i)
|
||||
|
||||
```bash
|
||||
$ dcraw -i 2006-08-25_Brocard_0370.CR2
|
||||
2006-08-25_Brocard_0370.CR2 is a Canon EOS 20D image.
|
||||
```
|
||||
Identifier sans décoder (+mode verbose) (-i -v)
|
||||
|
||||
```bash
|
||||
$ dcraw -i -v 2020-10-16_Brocard_3606.CR3
|
||||
|
||||
Filename: 2020-10-16_Brocard_3606.CR3
|
||||
Timestamp: Fri Oct 16 18:38:17 2020
|
||||
Camera make: Canon
|
||||
Camera model: EOS 90D
|
||||
Owner: @Bruno Pesenti
|
||||
ISO speed: 1600
|
||||
Shutter: 1/49.4 sec
|
||||
Aperture: f/4.0
|
||||
Focal length: 500.0 mm
|
||||
Embedded ICC profile: no
|
||||
Number of raw images: 1
|
||||
Thumb size: 6960 x 4640
|
||||
Full size: 7128 x 4732
|
||||
Image size: 7128 x 4732
|
||||
Output size: 7128 x 4732
|
||||
Raw colors: 3
|
||||
Filter pattern: RG/GB
|
||||
Daylight multipliers: 1.000000 1.000000 1.000000
|
||||
```
|
||||
|
||||
Convertir dans l'espace sRGB (-o 1)
|
||||
|
||||
```bash
|
||||
$ dcraw -o 1 -v 2020-10-16_Brocard_3606.CR3
|
||||
Loading Canon EOS 90D image from 2020-10-16_Brocard_3606.CR3 ...
|
||||
Scaling with darkness 0, saturation 255, and
|
||||
multipliers 1.000000 1.000000 1.000000 1.000000
|
||||
AHD interpolation...
|
||||
Building histograms...
|
||||
Writing data to 2020-10-16_Brocard_3606.ppm ...
|
||||
```
|
||||
|
||||
Use the cameras White Balance (WB) (-w) et crér un fichier TIFF (-t)
|
||||
|
||||
```bash
|
||||
$ dcraw -o 1 -w -T 2016-09-28_Brocard_7953.CR2
|
||||
```
|
||||
|
||||
|
||||
|
||||
https://gist.github.com/darencard/500eca3d09e32283d5fe6377270fd9e8
|
||||
|
||||
Reference in New Issue
Block a user