Install sur un serveur en service

:fr: ### Mon serveur YunoHost

Matériel: Autre carte ARM A20 …
Version de YunoHost: en cours
J’ai accès à mon serveur : En SSH
Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : n oui
Si oui, expliquer:
le serveur tourne avec Debian 4.19.171-2 (2021-01-30) armv7l derrière ma freebox (nom de domaine xxxx.freeboxos.fr

nginx ; mariadb; php

: j’ai sué de nombreuses heures pour installer le serveur. Il me reste à configurer l’accès sécusé https

Et je découvre yunohost qui propose une install simplifiée qui m’a convaincue.
puis-je l’installer via ssh + téléchatgement via curl…
Que va - t- il se passer sur mon serveur, aurai-je des choses détruites et comment ?
Merci de vos conseils

Daniel

:end:

Bonjour, et bienvenue. Ma Francais n’est pas bon, j’ecris en Englais.

So, you got your server running Debian; which version? Debian 10 (Buster) is standard, Debian 11 (Bullseye) is early beta (many things work, some rough edges). Debian 10 is best for starting at the moment.

When you apt install yunohost on top of Debian:

  • Some supporting binaries and configuration for Yunohost is downloaded
  • Some security settings are enforced (SSH-access for root is disabled, user admin is added with sudo-permission)
  • After installation via curl, you have to run yunohost postinstall, to bring the server up to taste (adding a user, domain, some basics).
  • After postinstall, have a look at diagnosis, to check if anything needs attention.

You mention nginx, mariadb, php. What do you mean?

1 Like

Thank you for your reply.
My server is already running Debian Buster ; nginx version: 1.14.2 ; PHP 7.3.31-1~deb10u1 (cli) (built: Oct 24 2021 15:18:08) : mariadb Ver 15.1 Distrib 10.3.31-MariaDB, for debian-linux-gnueabihf (armv7l)
How will installing yunohost change the server configuration?
Thanks

This is a simple question with a complex answer … Basically Yunohost will “take over” all configuration for nginx, php, mariadb, postfix, etc…

You could browse this code to get an overview of what it does: https://github.com/YunoHost/yunohost/tree/buster/data/templates , but considering it does many things and there are many many details in there, it would take an entire week explaining everything that’s in there …

The philosophy of Yunohost is that it shouldn’t matter to you what the configuration is, because the philosophy of Yunohost is that stuff should just work (and ideally you should not even ever have to use the command line) and you should be able to focus on what you actually want to do in real life rather than spending entire days worrying about manually configuring stuff.

1 Like

One important thing to add:

… and be secure, which will always be a point of attention, but in my view is a strong point of Yunohost (and for sure better than when following an average howto found online).

L’installation a échoué
INFO] Running apt_update

[INFO] Running register_debconf

[INFO] Running workarounds_because_sysadmin_sucks

[INFO] Workaround for avahi : creating avahi user with uid 504

[INFO] Running install_yunohost_packages

[FAIL] Installation of Yunohost packages failed

[INFO] Installation logs are available in /var/log/yunohost-installation_20220124_210820.log

En regardant le fichier .log c’est la config nginx qui a planté

Le serveur est sur ssd
Merci pour l’aide

Dans ce cas il faut déplanter la config nginx, mais on ne peut pas magiquement deviner si tu ne nous donne pas le message d’erreur correspondant …

voici le fichier log (partie avec erreur)
Get:249 Index of /debian buster/main armhf sntp armhf 1:4.2.8p12+dfsg-4 [161 kB]
Get:250 Index of /debian buster/main armhf unattended-upgrades all 1.11.2 [79.0 kB]
Preconfiguring packages …
/tmp/resolvconf.config.tXci69: 13: /tmp/resolvconf.config.tXci69: ifquery: not found
/tmp/resolvconf.config.tXci69: 13: /tmp/resolvconf.config.tXci69: ifquery: not found
Fetched 111 MB in 16s (6,830 kB/s)

dpkg: nginx-full: dependency problems, but removing anyway as you requested:
nginx depends on nginx-full (<< 1.14.2-2+deb10u4.1~) | nginx-light (<< 1.14.2-2+deb10u4.1~) | nginx-extras (<< 1.14.2-2+deb10u4.1~); however:
Package nginx-full is to be removed.
Package nginx-light is not installed.
Package nginx-extras is not installed.
nginx depends on nginx-full (>= 1.14.2-2+deb10u4) | nginx-light (>= 1.14.2-2+deb10u4) | nginx-extras (>= 1.14.2-2+deb10u4); however:
Package nginx-full is to be removed.
Package nginx-light is not installed.
Package nginx-extras is not installed.
nginx depends on nginx-full (<< 1.14.2-2+deb10u4.1~) | nginx-light (<< 1.14.2-2+deb10u4.1~) | nginx-extras (<< 1.14.2-2+deb10u4.1~); however:
Package nginx-full is to be removed.
Package nginx-light is not installed.
Package nginx-extras is not installed.
nginx depends on nginx-full (>= 1.14.2-2+deb10u4) | nginx-light (>= 1.14.2-2+deb10u4) | nginx-extras (>= 1.14.2-2+deb10u4); however:
Package nginx-full is to be removed.
Package nginx-light is not installed.
Package nginx-extras is not installed.

Job for dnsmasq.service failed because the control process exited with error code.
See “systemctl status dnsmasq.service” and “journalctl -xe” for details.
invoke-rc.d: initscript dnsmasq, action “start” failed.
e[0;1;31m●e[0m dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (e]8;;file://box/lib/systemd/system/dnsmasq.servicea/lib/systemd/system/dnsmasq.servicee]8;;a; enabled; vendor preset: enabled)
Active: e[0;1;31mfailede[0m (Result: exit-code) since Mon 2022-01-24 21:27:18 UTC; 68ms ago
Process: 403 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS)
Process: 404 ExecStart=/etc/init.d/dnsmasq systemd-exec e[0;1;31m(code=exited, status=2)e[0m

Jan 24 21:27:18 box systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server…
Jan 24 21:27:18 box dnsmasq[403]: dnsmasq: syntax check OK.
Jan 24 21:27:18 box dnsmasq[404]: dnsmasq: failed to create listening socket for port 53: Address already in use
Jan 24 21:27:18 box dnsmasq[404]: e[0;1;31me[0;1;39me[0;1;31mfailed to create listening socket for port 53: Address already in usee[0m
Jan 24 21:27:18 box dnsmasq[404]: e[0;1;31me[0;1;39me[0;1;31mFAILED to start upe[0m
Jan 24 21:27:18 box systemd[1]: e[0;1;39me[0;1;31me[0;1;39mdnsmasq.service: Control process exited, code=exited, status=2/INVALIDARGUMENTe[0m
Jan 24 21:27:18 box systemd[1]: e[0;1;39me[0;1;31me[0;1;39mdnsmasq.service: Failed with result ‘exit-code’.e[0m
Jan 24 21:27:18 box systemd[1]: e[0;1;31me[0;1;39me[0;1;31mFailed to start dnsmasq - A lightweight DHCP and caching DNS server.e[0m
Selecting previously unselected package ifupdown.

Job for dnsmasq.service failed because the control process exited with error code.
See “systemctl status dnsmasq.service” and “journalctl -xe” for details.
invoke-rc.d: initscript dnsmasq, action “restart” failed.
e[0;1;31m●e[0m dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (e]8;;file://box/lib/systemd/system/dnsmasq.servicea/lib/systemd/system/dnsmasq.servicee]8;;a; enabled; vendor preset: enabled)
Active: e[0;1;31mfailede[0m (Result: exit-code) since Mon 2022-01-24 21:27:36 UTC; 69ms ago
Process: 667 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS)
Process: 668 ExecStart=/etc/init.d/dnsmasq systemd-exec e[0;1;31m(code=exited, status=2)e[0m

Jan 24 21:27:36 box systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server…
Jan 24 21:27:36 box dnsmasq[667]: dnsmasq: syntax check OK.
Jan 24 21:27:36 box dnsmasq[668]: dnsmasq: failed to create listening socket for port 53: Address already in use
Jan 24 21:27:36 box dnsmasq[668]: e[0;1;31me[0;1;39me[0;1;31mfailed to create listening socket for port 53: Address already in usee[0m
Jan 24 21:27:36 box dnsmasq[668]: e[0;1;31me[0;1;39me[0;1;31mFAILED to start upe[0m
Jan 24 21:27:36 box systemd[1]: e[0;1;39me[0;1;31me[0;1;39mdnsmasq.service: Control process exited, code=exited, status=2/INVALIDARGUMENTe[0m
Jan 24 21:27:36 box systemd[1]: e[0;1;39me[0;1;31me[0;1;39mdnsmasq.service: Failed with result ‘exit-code’.e[0m
Jan 24 21:27:36 box systemd[1]: e[0;1;31me[0;1;39me[0;1;31mFailed to start dnsmasq - A lightweight DHCP and caching DNS server.e[0m
Selecting previously unselected package ssl-cert.

est-ce normal :slight_smile: j’accédais à mon serveur avec :dmlkmoy.freeboxos.fr !
et
setting myhostname: localhost.dmlkmoy.freeboxos.fe
setting alias maps
setting alias database
mailname is not a fully qualified domain name. Not changing /etc/mailname.
setting destinations: $myhostname, /etc/mailname, localhost.dmlkmoy.freeboxos.fe, localhost.dmlkmoy.freeboxos.fe, localhost
setting relayhost:

WARNING: /etc/aliases exists, but does not have a root alias

update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults

Setting up yunohost (4.3.6.2) …
Backing up /etc/ldap/slapd.d in /var/backups/slapd-2.4.47+dfsg-3+deb10u6… done.
Moving old database directory to /var/backups:

  • directory unknown… done.
    Creating initial configuration… done.
    Creating LDAP directory… done.
    Initializing LDAP with YunoHost DB structure
    nginx: [emerg] “server_names_hash_bucket_size” directive is duplicate in /etc/nginx/conf.d/ssowat.conf:3
    nginx: configuration file /etc/nginx/nginx.conf test failed
    dpkg: error processing package yunohost (–configure):
    installed yunohost package post-installation script subprocess returned error exit status 1
    Errors were encountered while processing:
    yunohost
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    [e[1me[31mFAILe[0m] Installation of Yunohost packages failed
    [e[1me[34mINFOe[0m] Installation logs are available in /var/log/yunohost-installation_20220124_210820.log

c’est ce que j’ai repéré.
Merci pour l’aide
Daniel

SUITE :
systemctl status nginx.service
nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2022-01-25 16:00:05 UTC; 22s ago
Docs: man:nginx(8)
Process: 6647 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)

quand j’essaye :

sudo apt-get install nginx-extras ssowat yunohost

il renvoie :

Reading package lists… Done
Building dependency tree
Reading state information… Done
nginx-extras is already the newest version (1.14.2-2+deb10u4).
nginx-extras set to manually installed.
ssowat is already the newest version (4.3.3.1).
ssowat set to manually installed.
yunohost is already the newest version (4.3.6.2).
The following package was automatically installed and is no longer required:
linux-image-4.19.0-11-armmp-lpae
Use ‘sudo apt autoremove’ to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up yunohost (4.3.6.2) …
Backing up /etc/ldap/slapd.d in /var/backups/slapd-2.4.47+dfsg-3+deb10u6… done.
Moving old database directory to /var/backups:

  • directory unknown… done.
    Creating initial configuration… done.
    Creating LDAP directory… done.
    Initializing LDAP with YunoHost DB structure
    nginx: [emerg] “server_names_hash_bucket_size” directive is duplicate in /etc/nginx/conf.d/ssowat.conf:3
    nginx: configuration file /etc/nginx/nginx.conf test failed
    dpkg: error processing package yunohost (–configure):
    installed yunohost package post-installation script subprocess returned error exit status 1
    Errors were encountered while processing:
    yunohost
    E: Sub-process /usr/bin/dpkg returned an error code (1)

That is not what is supposed to do, pity it gives you trouble!

Which board do you run, and which Debian installation did you use? Standard Debian, Armbian, or something else?

Does the installation get corrected when you run apt reinstall yunohost ?

Which lines are in your /etc/apt/sources.list, and are there more repositories in /etc/apt/sources.list.d?

Let’s run netstat -tulpn | grep 53 (as root) to check what program is conflicting …

You can check grep -nr server_names_hash_bucket_size /etc/nginx to find what’s conflicting

Merci de s’intéresser à mon problème

Linux box 4.19.0-18-armmp-lpae #1 SMP Debian 4.19.208-1 (2021-09-29) armv7l

the board is

a20 olinuxino
Static hostname: box
Icon name: computer
Machine ID: 4afb0e932090487781f8bce75ab243bf
Boot ID: 7ffcdd894a9e4efaa3eb32fea44d1b2d
Operating System: Debian GNU/Linux 10 (buster)
Kernel: Linux 4.19.0-18-armmp-lpae
Architecture: arm

/etc/apt/sources/list
deb Index of /debian buster main
deb Index of /debian buster-updates main
deb Index of /debian-security buster/updates main

/etc/apt/sources.list.d: no file exist

sudo apt-get install net-tools

Reading package lists… Done
Building dependency tree
Reading state information… Done
The following package was automatically installed and is no longer required:
linux-image-4.19.0-11-armmp-lpae
Use ‘sudo apt autoremove’ to remove it.
The following NEW packages will be installed:
net-tools
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 233 kB of archives.
After this operation, 786 kB of additional disk space will be used.
Get:1 Index of /debian buster/main armhf net-tools armhf 1.60+git20180626.aebd88e-1 [233 kB]
Fetched 233 kB in 0s (1,220 kB/s)
Setting up yunohost (4.3.6.2) …
Backing up /etc/ldap/slapd.d in /var/backups/slapd-2.4.47+dfsg-3+deb10u6… done.
Moving old database directory to /var/backups:

  • directory unknown… done.
    Creating initial configuration… done.
    Creating LDAP directory… done.
    Initializing LDAP with YunoHost DB structure
    nginx: [emerg] “server_names_hash_bucket_size” directive is duplicate in /etc/nginx/conf.d/ssowat.conf:3
    nginx: configuration file /etc/nginx/nginx.conf test failed
    dpkg: error processing package yunohost (–configure):
    installed yunohost package post-installation script subprocess returned error exit status 1
    Errors were encountered while processing:
    yunohost
    E: Sub-process /usr/bin/dpkg returned an error code (1)

grep -nr server_names_hash_bucket_size /etc/nginx

/etc/nginx/nginx.conf:27: server_names_hash_bucket_size 64;
/etc/nginx/conf.d/ssowat.conf:3:server_names_hash_bucket_size 128;

sudo apt reinstall yunohost

Reading package lists… Done
Building dependency tree
Reading state information… Done
The following package was automatically installed and is no longer required:
linux-image-4.19.0-11-armmp-lpae
Use ‘sudo apt autoremove’ to remove it.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for yunohost:armhf

sudo apt autoremove
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages will be REMOVED:
linux-image-4.19.0-11-armmp-lpae
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 158 MB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.

Conflict with my Linux box 4.19.0-18-armmp-lpae ?

Thank’s for help

^^^

Can’t run ; can’t install !

~# netstat -tulpn | grep 53
-bash: netstat: command not found

~# apt install net-tools
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following package was automatically installed and is no longer required:
linux-image-4.19.0-11-armmp-lpae
Use ‘apt autoremove’ to remove it.
The following NEW packages will be installed:
net-tools
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/233 kB of archives.
After this operation, 786 kB of additional disk space will be used.
Setting up yunohost (4.3.6.2) …
Backing up /etc/ldap/slapd.d in /var/backups/slapd-2.4.47+dfsg-3+deb10u6… done.
Moving old database directory to /var/backups:

  • directory unknown… done.
    Creating initial configuration… done.
    Creating LDAP directory… done.
    Initializing LDAP with YunoHost DB structure
    nginx: [emerg] “server_names_hash_bucket_size” directive is duplicate in /etc/nginx/conf.d/ssowat.conf:3
    nginx: configuration file /etc/nginx/nginx.conf test failed
    dpkg: error processing package yunohost (–configure):
    installed yunohost package post-installation script subprocess returned error exit status 1
    Errors were encountered while processing:
    yunohost
    E: Sub-process /usr/bin/dpkg returned an error code (1)

Thank’s for reply

I commented this line in nginx.conf …and the net-tools installation could be done!
Here is what the command does

netstat -tulpn | grep 53

tcp 0 0 0.0.0.0:5355 0.0.0.0:* LISTEN 333/systemd-resolve
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 333/systemd-resolve
tcp6 0 0 :::5355 :::* LISTEN 333/systemd-resolve
udp 0 0 127.0.0.53:53 0.0.0.0:* 333/systemd-resolve
udp 0 0 192.168.1.55:5353 0.0.0.0:* 24231/python3
udp 0 0 0.0.0.0:5353 0.0.0.0:* 24231/python3
udp 0 0 0.0.0.0:5353 0.0.0.0:* 333/systemd-resolve
udp 0 0 0.0.0.0:5355 0.0.0.0:* 333/systemd-resolve
udp6 0 0 :::5353 :::* 333/systemd-resolve
udp6 0 0 :::5355 :::* 333/systemd-resolve

je ne sais pas l’analyser
Merci
Daniel

I run
apt reinstall yunohost
the install go to the first end !
Copy of end of install :
Moving old database directory to /var/backups:

  • directory unknown… done.
    Creating initial configuration… done.
    Creating LDAP directory… done.
    Initializing LDAP with YunoHost DB structure
    Failed to disable unit: Unit file avahi-daemon.socket does not exist.
    Failed to disable unit: Unit file avahi-daemon.service does not exist.
    yunohost-firewall.service is a disabled or a static unit, not starting it.
    Processing triggers for man-db (2.8.5-2) …

with mozilla :slight_smile: https://dmlkmoy.freeboxos.fr/yunohost/admin/ say
404 Not Found

Wouldn’t it be better to uninstall nginx and its configuration files with
apt-get remove --purge nginx

and then reinstall yunohost ? with apt reinstall yunohost ?

It’s difficult to say, we don’t have any idea of what you did on the server before installing Yunohost …

I make
apt-get remove --purge nginx
and
apt reinstall yunohost

the same error 404

i see the error log in /var/log/nginx/error.log :

“/usr/share/yunohost/admin/index,html” is not found (2 : No such file or directory)

???