

# 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 title="Exécutable ffmpeg"
which ffmpeg
/bin/ffmpeg
```

```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
  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 title="Exécutable PHP"
which php
/bin/php
```

```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
```

#### php7.4

```bash title="Exécutable PHP"
which php74
/usr/local/bin/php74
```

```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:

```bash title="Dossier extensions"
extension_dir = /usr/local/lib/php74/modules
```

```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
Additional .ini files parsed:      /usr/local/etc/php74/cli/conf.d/extension.ini,
/usr/local/etc/php74/cli/conf.d/timezone.ini
```

```bash title="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 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)
-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 title="Log PHP"
sudo tail -f /var/log/php73-fpm.log
```



#### nginx

```bash title="Version"
nginx -V
nginx version: nginx/1.17.10
TLS SNI support enabled
```

```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
```

```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

/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 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
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
```

```bash title="Logs nginx"
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:

```bash title="après un changement de configuration"
sudo nginx -s reload
```

##### Autres commandes:

```bash title="Quitter nginx immédiatement"
sudo nginx -s stop
```

```bash title="Quitter nginx après que toutes les requêtes actives ont obtenu une réponse"
sudo nginx -s quit
```

```bash title="Les Log-Files sont relancés"
sudo nginx -s reopen
```

```bash title="Démarrer nginx"
sudo service nginx start
```

```bash title="Redémarrer le serveur nginx"
synosystemctl restart nginx
```



#### Certificat Let's Encrypt

Si on utilise le certificat pour le domaine synology , il n'y a pas besoin d'ouvrir les ports.

Pour un domaine, il faut ouvrir le port 80.



#### Liens

 [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
```

Désinstaller un paquet debian:

```bash
$ sudo dpkg -r bat
```

Statut d'un paquet:

```bash
$ sudo dpkg -l '*bat*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-==================================
ii  bat            0.19.0       amd64        cat(1) clone with wings.
un  bat-musl       <none>       <none>       (no description available)
```

ii dans la 1ere colonne: correctement installé



#### Synology Photos:

dossier ~/Photos: Synology Photos -> espace personnel



#### ping

```bash
$ ping 8.8.8.8
ping: socket: Operation not permitted
```

```bash
$ $ ping 8.8.8.8
# ou
$ sudo setcap 'cap_net_raw+ep' "$(which ping)"
```

