Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
elearning:workbooks:redhat:rh134:l105 [2024/10/24 03:44] – created admin | elearning:workbooks:redhat:rh134:l105 [2024/10/24 09:58] (Version actuelle) – admin | ||
---|---|---|---|
Ligne 5: | Ligne 5: | ||
Dernière mise-à-jour : ~~LASTMOD~~ | Dernière mise-à-jour : ~~LASTMOD~~ | ||
- | ======RH13405 | + | ======RH13406 |
=====Contenu du Module===== | =====Contenu du Module===== | ||
- | * **RH13405 | + | * **RH13406 |
* Contenu du Module | * Contenu du Module | ||
* Présentation | * Présentation | ||
Ligne 48: | Ligne 48: | ||
* 4.1 - Contrôler les dépendances d'une Cible | * 4.1 - Contrôler les dépendances d'une Cible | ||
* 4.2 - La Cible par Défaut | * 4.2 - La Cible par Défaut | ||
- | * LAB #5 - Gestion des Services | ||
- | * 5.1 - Gestion des Instances Uniques | ||
- | * 5.2 - Gestion d' | ||
- | * 5.3 - Interdire la Modification du Statut d'un Service | ||
* Arrêt Système du Système | * Arrêt Système du Système | ||
* La Commande shutdown | * La Commande shutdown | ||
Ligne 132: | Ligne 128: | ||
< | < | ||
- | [root@centos8 | + | [root@redhat9 |
# | # | ||
# DO NOT EDIT THIS FILE | # DO NOT EDIT THIS FILE | ||
Ligne 209: | Ligne 205: | ||
set tuned_initrd="" | set tuned_initrd="" | ||
### END / | ### END / | ||
- | |||
- | ### BEGIN / | ||
- | if [ " | ||
- | set last_boot_ok=1 | ||
- | else | ||
- | set last_boot_ok=0 | ||
- | fi | ||
- | |||
- | # Reset boot_indeterminate after a successful boot | ||
- | if [ " | ||
- | set boot_indeterminate=0 | ||
- | # Avoid boot_indeterminate causing the menu to be hidden more then once | ||
- | elif [ " | ||
- | set boot_indeterminate=2 | ||
- | fi | ||
- | set boot_success=0 | ||
- | save_env boot_success boot_indeterminate | ||
- | |||
- | if [ x$feature_timeout_style = xy ] ; then | ||
- | if [ " | ||
- | unset menu_show_once | ||
- | save_env menu_show_once | ||
- | set timeout_style=menu | ||
- | set timeout=60 | ||
- | elif [ " | ||
- | set orig_timeout_style=${timeout_style} | ||
- | set orig_timeout=${timeout} | ||
- | if [ " | ||
- | # timeout_style=menu + timeout=0 avoids the countdown code keypress check | ||
- | set timeout_style=menu | ||
- | set timeout=0 | ||
- | else | ||
- | set timeout_style=hidden | ||
- | set timeout=1 | ||
- | fi | ||
- | fi | ||
- | fi | ||
- | ### END / | ||
### BEGIN / | ### BEGIN / | ||
Ligne 258: | Ligne 216: | ||
fi | fi | ||
### END / | ### END / | ||
+ | |||
+ | ### BEGIN / | ||
+ | insmod increment | ||
+ | # Check if boot_counter exists and boot_success=0 to activate this behaviour. | ||
+ | if [ -n " | ||
+ | # if countdown has ended, choose to boot rollback deployment, | ||
+ | # i.e. default=1 on OSTree-based systems. | ||
+ | if [ " | ||
+ | set default=1 | ||
+ | set boot_counter=-1 | ||
+ | # otherwise decrement boot_counter | ||
+ | else | ||
+ | decrement boot_counter | ||
+ | fi | ||
+ | save_env boot_counter | ||
+ | fi | ||
+ | ### END / | ||
### BEGIN / | ### BEGIN / | ||
insmod part_msdos | insmod part_msdos | ||
- | insmod | + | insmod |
set root=' | set root=' | ||
if [ x$feature_platform_search_hint = xy ]; then | if [ x$feature_platform_search_hint = xy ]; then | ||
- | search --no-floppy --fs-uuid --set=root --hint-bios=hd0, | + | search --no-floppy --fs-uuid --set=root --hint-bios=hd0, |
else | else | ||
- | search --no-floppy --fs-uuid --set=root | + | search --no-floppy --fs-uuid --set=root |
fi | fi | ||
insmod part_msdos | insmod part_msdos | ||
- | insmod | + | insmod |
set boot=' | set boot=' | ||
if [ x$feature_platform_search_hint = xy ]; then | if [ x$feature_platform_search_hint = xy ]; then | ||
- | search --no-floppy --fs-uuid --set=boot --hint-bios=hd0, | + | search --no-floppy --fs-uuid --set=boot --hint-bios=hd0, |
else | else | ||
- | search --no-floppy --fs-uuid --set=boot | + | search --no-floppy --fs-uuid --set=boot |
fi | fi | ||
Ligne 282: | Ligne 257: | ||
# The blscfg command parses the BootLoaderSpec files stored in / | # The blscfg command parses the BootLoaderSpec files stored in / | ||
# populates the boot menu. Please refer to the Boot Loader Specification documentation | # populates the boot menu. Please refer to the Boot Loader Specification documentation | ||
- | # for the files format: https://www.freedesktop.org/ | + | # for the files format: https://systemd.io/BOOT_LOADER_SPECIFICATION/. |
- | set default_kernelopts=" | + | # The kernelopts variable should be defined in the grubenv file. But to ensure that menu |
+ | # entries populated from BootLoaderSpec files that use this variable work correctly even | ||
+ | # without a grubenv file, define a fallback kernelopts variable if this has not been set. | ||
+ | # | ||
+ | # The kernelopts variable in the grubenv file can be modified using the grubby tool or by | ||
+ | # executing the grub2-mkconfig tool. For the latter, the values of the GRUB_CMDLINE_LINUX | ||
+ | # and GRUB_CMDLINE_LINUX_DEFAULT options from / | ||
+ | # the kernelopts variable in the grubenv file and the fallback kernelopts variable. | ||
+ | if [ -z " | ||
+ | set kernelopts=" | ||
+ | fi | ||
insmod blscfg | insmod blscfg | ||
blscfg | blscfg | ||
### END / | ### END / | ||
+ | |||
+ | ### BEGIN / | ||
+ | # Hiding the menu is ok if last boot was ok or if this is a first boot attempt to boot the entry | ||
+ | if [ " | ||
+ | set menu_hide_ok=1 | ||
+ | else | ||
+ | set menu_hide_ok=0 | ||
+ | fi | ||
+ | # Reset boot_indeterminate after a successful boot | ||
+ | if [ " | ||
+ | set boot_indeterminate=0 | ||
+ | # Avoid boot_indeterminate causing the menu to be hidden more than once | ||
+ | elif [ " | ||
+ | set boot_indeterminate=2 | ||
+ | fi | ||
+ | # Reset boot_success for current boot | ||
+ | set boot_success=0 | ||
+ | save_env boot_success boot_indeterminate | ||
+ | ### END / | ||
+ | |||
+ | ### BEGIN / | ||
+ | if [ x$feature_timeout_style = xy ] ; then | ||
+ | if [ " | ||
+ | unset menu_show_once | ||
+ | save_env menu_show_once | ||
+ | set timeout_style=menu | ||
+ | set timeout=60 | ||
+ | elif [ " | ||
+ | set orig_timeout_style=${timeout_style} | ||
+ | set orig_timeout=${timeout} | ||
+ | if [ " | ||
+ | # timeout_style=menu + timeout=0 avoids the countdown code keypress check | ||
+ | set timeout_style=menu | ||
+ | set timeout=0 | ||
+ | else | ||
+ | set timeout_style=hidden | ||
+ | set timeout=1 | ||
+ | fi | ||
+ | fi | ||
+ | fi | ||
+ | ### END / | ||
+ | |||
+ | ### BEGIN / | ||
+ | if [ x$feature_timeout_style = xy ]; then | ||
+ | if [ " | ||
+ | set timeout_style=menu | ||
+ | set timeout=" | ||
+ | unset menu_show_once_timeout | ||
+ | save_env menu_show_once_timeout | ||
+ | fi | ||
+ | fi | ||
+ | ### END / | ||
### BEGIN / | ### BEGIN / | ||
Ligne 300: | Ligne 337: | ||
### BEGIN / | ### BEGIN / | ||
+ | if [ " | ||
+ | menuentry 'UEFI Firmware Settings' | ||
+ | fwsetup | ||
+ | } | ||
+ | fi | ||
### END / | ### END / | ||
+ | |||
+ | ### BEGIN / | ||
+ | ### END / | ||
### BEGIN / | ### BEGIN / | ||
Ligne 312: | Ligne 357: | ||
source ${config_directory}/ | source ${config_directory}/ | ||
elif [ -z " | elif [ -z " | ||
- | source $prefix/ | + | source $prefix/ |
fi | fi | ||
### END / | ### END / | ||
Ligne 327: | Ligne 372: | ||
< | < | ||
- | [root@centos8 | + | [root@redhat9 |
# this device map was generated by anaconda | # this device map was generated by anaconda | ||
(hd0) /dev/sda | (hd0) /dev/sda | ||
- | (hd1) /dev/sda | ||
</ | </ | ||
Ligne 338: | Ligne 382: | ||
< | < | ||
- | [root@centos8 | + | [root@redhat9 |
GRUB_TIMEOUT=5 | GRUB_TIMEOUT=5 | ||
GRUB_DISTRIBUTOR=" | GRUB_DISTRIBUTOR=" | ||
Ligne 344: | Ligne 388: | ||
GRUB_DISABLE_SUBMENU=true | GRUB_DISABLE_SUBMENU=true | ||
GRUB_TERMINAL_OUTPUT=" | GRUB_TERMINAL_OUTPUT=" | ||
- | GRUB_CMDLINE_LINUX=" | + | GRUB_CMDLINE_LINUX=" |
GRUB_DISABLE_RECOVERY=" | GRUB_DISABLE_RECOVERY=" | ||
GRUB_ENABLE_BLSCFG=true | GRUB_ENABLE_BLSCFG=true | ||
Ligne 370: | Ligne 414: | ||
< | < | ||
- | [root@centos8 | + | [root@redhat9 |
- | total 92 | + | total 108 |
- | -rwxr-xr-x. 1 root root | + | -rwxr-xr-x. 1 root root |
- | -rwxr-xr-x. 1 root root | + | -rwxr-xr-x. 1 root root |
- | -rwxr-xr-x. 1 root root 232 Mar 2 15:51 01_users | + | -rwxr-xr-x. 1 root root 236 Jun 27 12:12 01_users |
- | -rwxr-xr-x. 1 root root 832 Mar 2 15:51 08_fallback_counting | + | -rwxr-xr-x. 1 root root 835 Jun 27 12:12 08_fallback_counting |
- | -rwxr-xr-x. 1 root root 14088 Mar 2 15:51 10_linux | + | -rwxr-xr-x. 1 root root 19665 Jun 27 12:12 10_linux |
- | -rwxr-xr-x. 1 root root 830 Mar 2 15:51 10_reset_boot_success | + | -rwxr-xr-x. 1 root root 833 Jun 27 12:12 10_reset_boot_success |
- | -rwxr-xr-x. 1 root root 889 Mar 2 15:51 12_menu_auto_hide | + | -rwxr-xr-x. 1 root root 892 Jun 27 12:12 12_menu_auto_hide |
- | -rwxr-xr-x. 1 root root 11696 Mar 2 15:51 20_linux_xen | + | -rwxr-xr-x. 1 root root 410 Jun 27 12:12 14_menu_show_once |
- | -rwxr-xr-x. 1 root root | + | -rwxr-xr-x. 1 root root 13613 Jun 27 12:12 20_linux_xen |
- | -rwxr-xr-x. 1 root root 10670 Mar 2 15:51 30_os-prober | + | -rwxr-xr-x. 1 root root |
- | -rwxr-xr-x. 1 root root | + | -rwxr-xr-x. 1 root root 10869 Jun 27 12:12 30_os-prober |
- | -rwxr-xr-x. 1 root root 214 Mar 2 15:51 40_custom | + | -rwxr-xr-x. 1 root root |
- | -rwxr-xr-x. 1 root root 216 Mar 2 15:51 41_custom | + | -rwxr-xr-x. 1 root root 725 Feb 19 2024 35_fwupd |
- | -rw-r--r--. 1 root root | + | -rwxr-xr-x. 1 root root 218 Jun 27 12:12 40_custom |
+ | -rwxr-xr-x. 1 root root 219 Jun 27 12:12 41_custom | ||
+ | -rw-r--r--. 1 root root | ||
</ | </ | ||
Ligne 400: | Ligne 446: | ||
< | < | ||
- | [root@centos8 | + | [root@redhat9 |
# GRUB Environment Block | # GRUB Environment Block | ||
- | saved_entry=de79af4f226d480fa7d3fec4cabbf97a-4.18.0-240.22.1.el8_3.x86_64 | + | # WARNING: Do not edit this file by tools other than grub-editenv!!! |
- | kernelopts=root=UUID=4c0cc28c-0d59-45be-bd73-d292b80be33c ro crashkernel=auto resume=UUID=c8bb3f47-d67f-4b21-b781-766899dc83d4 rhgb quiet | + | saved_entry=5a35a3eb625c45cea1d33535723e791f-5.14.0-427.37.1.el9_4.x86_64 |
+ | menu_auto_hide=1 | ||
boot_success=1 | boot_success=1 | ||
boot_indeterminate=0 | boot_indeterminate=0 | ||
- | ########################################################################################################################################## | + | ################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################## |
- | ########################################################################################################################################## | + | |
- | ########################################################################################################################################## | + | |
- | ########################################################################################################################################## | + | |
- | ########################################################################################################################################## | + | |
- | ############################################################ | + | |
</ | </ | ||
Ligne 471: | Ligne 513: | ||
< | < | ||
- | [root@centos8 | + | [root@redhat9 |
- | [root@centos8 ~]# cd /tmp | + | |
- | [root@centos8 tmp]# ls | + | |
- | cpio.list | + | |
- | custom | + | |
- | dateref | + | |
- | incremental.tar | + | |
- | mbr.save | + | |
- | systemd-private-9af7a2f7444849578f55b306bfd9f820-chronyd.service-iQiNzF | + | |
- | tblpart.save | + | |
- | test.cpio | + | |
- | test.print | + | |
- | test.tar | + | |
- | tmp.iso | + | |
- | vg0_backup | + | |
- | [root@centos8 tmp]# mv custom custom.gz | + | [root@redhat9 ~]# cd /tmp |
- | [root@centos8 | + | [root@redhat9 |
- | + | custom | |
- | [root@centos8 tmp]# mkdir initramfs | + | |
- | + | ||
- | [root@centos8 tmp]# cd initramfs | + | |
- | + | ||
- | [root@centos8 initramfs]# cpio -cid -I ../custom | + | |
- | 216 blocks | + | |
- | [root@centos8 initramfs]# ls | + | |
- | bin dev etc init lib lib64 proc root run sbin shutdown | + | |
</ | </ | ||
Ligne 506: | Ligne 526: | ||
< | < | ||
- | [root@centos8 | + | [root@redhat9 |
- | Image: custom: | + | Image: custom: |
======================================================================== | ======================================================================== | ||
Early CPIO image | Early CPIO image | ||
======================================================================== | ======================================================================== | ||
- | drwxr-xr-x | + | drwxr-xr-x |
- | -rw-r--r-- | + | -rw-r--r-- |
- | drwxr-xr-x | + | drwxr-xr-x |
- | drwxr-xr-x | + | drwxr-xr-x |
- | drwxr-xr-x | + | drwxr-xr-x |
- | -rw-r--r-- | + | -rw-r--r-- |
======================================================================== | ======================================================================== | ||
- | Version: dracut-049-95.git20200804.el8_3.4 | + | Version: dracut-057-53.git20240104.el9 |
- | Arguments: -f --kver ' | + | Arguments: |
dracut modules: | dracut modules: | ||
Ligne 526: | Ligne 546: | ||
systemd | systemd | ||
systemd-initrd | systemd-initrd | ||
+ | systemd-sysusers | ||
nss-softokn | nss-softokn | ||
- | rngd | + | dbus-broker |
+ | dbus | ||
i18n | i18n | ||
- | network-legacy | + | network-manager |
network | network | ||
ifcfg | ifcfg | ||
Ligne 535: | Ligne 557: | ||
plymouth | plymouth | ||
prefixdevname | prefixdevname | ||
+ | dm | ||
kernel-modules | kernel-modules | ||
kernel-modules-extra | kernel-modules-extra | ||
kernel-network-modules | kernel-network-modules | ||
+ | lvm | ||
+ | qemu | ||
+ | qemu-net | ||
resume | resume | ||
rootfs-block | rootfs-block | ||
terminfo | terminfo | ||
udev-rules | udev-rules | ||
- | biosdevname | + | virtiofs |
dracut-systemd | dracut-systemd | ||
usrmount | usrmount | ||
base | base | ||
fs-lib | fs-lib | ||
- | memstrack | ||
microcode_ctl-fw_dir_override | microcode_ctl-fw_dir_override | ||
shutdown | shutdown | ||
======================================================================== | ======================================================================== | ||
- | drwxr-xr-x | + | drwxr-xr-x |
- | crw-r--r-- | + | crw-r--r-- |
- | crw-r--r-- | + | crw-r--r-- |
- | crw-r--r-- | + | crw-r--r-- |
- | crw-r--r-- | + | crw-r--r-- |
- | crw-r--r-- | + | crw-r--r-- |
- | lrwxrwxrwx | + | |
- | drwxr-xr-x | + | |
- | drwxr-xr-x | + | |
- | -rw-r--r-- | + | |
- | drwxr-xr-x | + | |
- | drwxr-xr-x | + | |
- | -rw-r--r-- | + | |
--More-- | --More-- | ||
</ | </ | ||
Ligne 569: | Ligne 587: | ||
===Le script init=== | ===Le script init=== | ||
- | RHEL/CentOS 8 utilise le système de démarrage **systemd**. Pour cette raison le script init est un lien symbolique vers **/ | + | Red Hat 9 utilise le système de démarrage **systemd**. Pour cette raison le script init est un lien symbolique vers **/ |
< | < | ||
- | [root@centos8 | + | [root@redhat9 |
- | lrwxrwxrwx | + | lrwxrwxrwx |
</ | </ | ||
Ligne 581: | Ligne 599: | ||
< | < | ||
- | [root@centos8 | + | [root@redhat9 |
include ld.so.conf.d/ | include ld.so.conf.d/ | ||
</ | </ | ||
Ligne 642: | Ligne 660: | ||
< | < | ||
- | [root@centos8 ~]# ls -l / | + | [root@redhat9 tmp]# ls -l / |
- | lrwxrwxrwx. 1 root root 15 Apr 7 16:55 / | + | lrwxrwxrwx. 1 root root 15 Jul 18 13:00 / |
- | lrwxrwxrwx. 1 root root 13 Apr 7 16:55 / | + | lrwxrwxrwx. 1 root root 13 Jul 18 13:00 / |
- | lrwxrwxrwx. 1 root root 17 Apr 7 16:55 / | + | lrwxrwxrwx. 1 root root 17 Jul 18 13:00 / |
- | lrwxrwxrwx. 1 root root 17 Apr 7 16:55 / | + | lrwxrwxrwx. 1 root root 17 Jul 18 13:00 / |
- | lrwxrwxrwx. 1 root root 17 Apr 7 16:55 / | + | lrwxrwxrwx. 1 root root 17 Jul 18 13:00 / |
- | lrwxrwxrwx. 1 root root 16 Apr 7 16:55 / | + | lrwxrwxrwx. 1 root root 16 Jul 18 13:00 / |
- | lrwxrwxrwx. 1 root root 13 Apr 7 16:55 / | + | lrwxrwxrwx. 1 root root 13 Jul 18 13:00 / |
/ | / | ||
Ligne 672: | Ligne 690: | ||
< | < | ||
- | [root@centos8 ~]# systemctl list-units | + | [root@redhat9 tmp]# systemctl list-units |
- | UNIT LOAD | + | UNIT |
- | proc-sys-fs-binfmt_misc.automount | + | proc-sys-fs-binfmt_misc.automount |
- | sys-devices-pci0000: | + | sys-devices-pci0000: |
- | sys-devices-pci0000: | + | sys-devices-pci0000: |
- | sys-devices-pci0000:00-0000:00:05.0-sound-card0.device | + | sys-devices-pci0000: |
- | sys-devices-pci0000: | + | sys-devices-pci0000: |
- | sys-devices-pci0000: | + | sys-devices-pci0000: |
- | sys-devices-pci0000: | + | sys-devices-pci0000: |
- | sys-devices-pci0000: | + | sys-devices-pci0000: |
- | sys-devices-pci0000: | + | sys-devices-pci0000: |
- | sys-devices-pci0000: | + | sys-devices-pci0000: |
- | sys-devices-pci0000: | + | sys-devices-pci0000: |
- | sys-devices-pci0000: | + | sys-devices-pci0000: |
- | sys-devices-pci0000: | + | sys-devices-pci0000: |
- | sys-devices-pci0000: | + | sys-devices-pci0000: |
- | sys-devices-pci0000: | + | sys-devices-pci0000: |
- | sys-devices-pci0000: | + | sys-devices-pci0000: |
- | sys-devices-pci0000: | + | sys-devices-pci0000: |
- | sys-devices-pci0000: | + | sys-devices-pci0000: |
- | sys-devices-pci0000: | + | sys-devices-pci0000: |
- | sys-devices-pci0000: | + | sys-devices-pci0000: |
- | sys-devices-pci0000: | + | |
- | sys-devices-platform-serial8250-tty-ttyS0.device | + | |
- | sys-devices-platform-serial8250-tty-ttyS1.device | + | sys-devices-platform-serial8250-tty-ttyS1.device |
- | sys-devices-platform-serial8250-tty-ttyS2.device | + | sys-devices-platform-serial8250-tty-ttyS2.device |
- | sys-devices-platform-serial8250-tty-ttyS3.device | + | sys-devices-platform-serial8250-tty-ttyS3.device |
- | sys-devices-virtual-block-dm\x2d0.device | + | sys-devices-virtual-block-dm\x2d0.device |
- | sys-devices-virtual-block-dm\x2d1.device | + | sys-devices-virtual-block-dm\x2d1.device |
- | sys-devices-virtual-net-virbr0.device | + | sys-devices-virtual-block-dm\x2d2.device |
- | sys-devices-virtual-net-virbr0\x2dnic.device | + | sys-devices-virtual-block-dm\x2d3.device |
- | sys-module-configfs.device | + | sys-devices-virtual-block-md1.device |
- | sys-subsystem-net-devices-enp0s3.device | + | sys-devices-virtual-misc-rfkill.device |
- | sys-subsystem-net-devices-virbr0.device | + | sys-module-configfs.device |
- | sys-subsystem-net-devices-virbr0\x2dnic.device | + | sys-module-fuse.device |
- | -.mount | + | sys-subsystem-net-devices-ens18.device |
- | boot.mount | + | -.mount |
- | dev-hugepages.mount | + | boot.mount |
- | dev-mqueue.mount | + | dev-hugepages.mount |
- | run-user-1000.mount | + | dev-mqueue.mount |
- | sys-kernel-config.mount | + | |
- | sys-kernel-debug.mount | + | run-credentials-systemd\x2dtmpfiles\x2dsetup.service.mount |
- | sys-kernel-tracing.mount | + | run-credentials-systemd\x2dtmpfiles\x2dsetup\x2ddev.service.mount |
- | var-lib-nfs-rpc_pipefs.mount | + | |
- | cups.path | + | |
- | systemd-ask-password-plymouth.path | + | |
- | systemd-ask-password-wall.path | + | sys-kernel-config.mount |
- | init.scope | + | sys-kernel-debug.mount |
- | session-96.scope | + | |
- | atd.service | + | cups.path |
- | auditd.service | + | systemd-ask-password-wall.path |
- | avahi-daemon.service | + | init.scope |
- | chronyd.service | + | session-4.scope |
- | crond.service | + | |
- | cups.service | + | |
- | dbus.service | + | atd.service |
- | dracut-shutdown.service | + | lines 1-55 |
- | firewalld.service | + | |
- | lines 1-57 | + | |
</ | </ | ||
Ligne 736: | Ligne 752: | ||
< | < | ||
- | [root@centos8 ~]# systemctl list-units --all | grep inactive | more | + | [root@redhat9 tmp]# systemctl list-units --all | grep inactive | more |
- | ● boot.automount | + | ● boot.automount |
- | | + | |
- | | + | ● home.mount |
- | sys-fs-fuse-connections.mount | + | |
- | ● sysroot.mount | + | |
- | tmp.mount | + | ● sysroot.mount |
- | var-lib-machines.mount | + | tmp.mount |
- | systemd-ask-password-console.path | + | ● var.mount |
- | ● apparmor.service | + | systemd-ask-password-console.path |
- | | + | |
- | | + | |
- | ● display-manager.service | + | |
- | dm-event.service | + | ● auto-cpufreq.service |
- | dnf-makecache.service | + | ● autofs.service |
- | dracut-cmdline.service | + | blk-availability.service |
- | dracut-initqueue.service | + | cpupower.service |
- | dracut-mount.service | + | dm-event.service |
- | dracut-pre-mount.service | + | dnf-makecache.service |
- | dracut-pre-pivot.service | + | dracut-cmdline.service |
- | dracut-pre-trigger.service | + | dracut-initqueue.service |
- | dracut-pre-udev.service | + | dracut-mount.service |
- | | + | dracut-pre-mount.service |
- | emergency.service | + | dracut-pre-pivot.service |
- | initrd-cleanup.service | + | dracut-pre-trigger.service |
- | initrd-parse-etc.service | + | dracut-pre-udev.service |
- | initrd-switch-root.service | + | |
- | initrd-udevadm-cleanup-db.service | + | ● ebtables.service |
- | ● ip6tables.service | + | emergency.service |
- | ● ipset.service | + | ● fcoe.service |
- | ● iptables.service | + | getty@tty1.service |
- | iscsi-onboot.service | + | ● httpd-init.service |
- | iscsi.service | + | initrd-cleanup.service |
- | iscsid.service | + | initrd-parse-etc.service |
- | iscsiuio.service | + | initrd-switch-root.service |
- | ldconfig.service | + | initrd-udevadm-cleanup-db.service |
- | | + | insights-client-boot.service |
- | | + | ● ip6tables.service |
- | loadmodules.service | + | ● ipset.service |
- | ● lvm2-activation.service | + | ● iptables.service |
- | lvm2-lvmpolld.service | + | iscsi-init.service |
- | | + | iscsi-onboot.service |
- | microcode.service | + | iscsi-shutdown.service |
- | ● network.service | + | iscsi-starter.service |
- | | + | iscsid.service |
- | | + | iscsiuio.service |
- | | + | ldconfig.service |
- | nfs-mountd.service | + | |
- | nfs-server.service | + | |
- | nfs-utils.service | + | ● lvm2-activation-early.service |
- | nfsdcld.service | + | lvm2-lvmpolld.service |
- | nftables.service | + | |
- | ● ntpd.service | + | microcode.service |
- | ● ntpdate.service | + | |
- | plymouth-switch-root.service | + | |
- | rc-local.service | + | |
- | rescue.service | + | |
- | rpc-gssd.service | + | |
--More-- | --More-- | ||
</ | </ | ||
Ligne 800: | Ligne 814: | ||
< | < | ||
- | [root@centos8 ~]# systemctl status | + | [root@redhat9 tmp]# systemctl status |
- | Unit ntpd.service could not be found. | + | Unit ip6tables.service could not be found. |
</ | </ | ||
Ligne 807: | Ligne 821: | ||
< | < | ||
- | [root@centos8 ~]# systemctl list-unit-files | more | + | [root@redhat9 tmp]# systemctl list-unit-files | more |
- | UNIT FILE STATE | + | UNIT FILE STATE PRESET |
- | proc-sys-fs-binfmt_misc.automount | + | proc-sys-fs-binfmt_misc.automount |
- | -.mount | + | -.mount |
- | boot.mount | + | boot.mount |
- | dev-hugepages.mount | + | dev-hugepages.mount |
- | dev-mqueue.mount | + | dev-mqueue.mount |
- | proc-fs-nfsd.mount | + | mnt-sdb12.mount |
- | proc-sys-fs-binfmt_misc.mount | + | proc-sys-fs-binfmt_misc.mount |
- | sys-fs-fuse-connections.mount | + | run-vmblock\x2dfuse.mount |
- | sys-kernel-config.mount | + | sys-fs-fuse-connections.mount |
- | sys-kernel-debug.mount | + | sys-kernel-config.mount |
- | tmp.mount | + | sys-kernel-debug.mount |
- | var-lib-machines.mount | + | sys-kernel-tracing.mount |
- | var-lib-nfs-rpc_pipefs.mount | + | tmp.mount |
- | cups.path | + | cups.path |
- | systemd-ask-password-console.path | + | insights-client-results.path |
- | systemd-ask-password-plymouth.path | + | ostree-finalize-staged.path |
- | systemd-ask-password-wall.path | + | systemd-ask-password-console.path |
- | session-96.scope | + | systemd-ask-password-plymouth.path |
- | arp-ethers.service | + | systemd-ask-password-wall.path |
- | atd.service | + | session-4.scope |
- | auditd.service | + | session-c1.scope |
- | auth-rpcgss-module.service | + | accounts-daemon.service |
- | autovt@.service | + | alsa-restore.service |
- | avahi-daemon.service | + | alsa-state.service |
- | blk-availability.service | + | arp-ethers.service |
- | chrony-dnssrv@.service | + | atd.service |
- | chrony-wait.service | + | auditd.service |
- | chronyd.service | + | autovt@.service |
- | cockpit-motd.service | + | avahi-daemon.service |
- | cockpit-wsinstance-http-redirect.service | + | bar.service |
- | cockpit-wsinstance-http.service | + | blk-availability.service |
- | cockpit-wsinstance-https-factory@.service | + | bluetooth.service |
- | cockpit-wsinstance-https@.service | + | bolt.service |
- | cockpit.service | + | brltty.service |
- | console-getty.service | + | canberra-system-bootup.service |
- | container-getty@.service | + | canberra-system-shutdown-reboot.service |
- | cpupower.service | + | canberra-system-shutdown.service |
- | crond.service | + | chrony-wait.service |
- | cups-browsed.service | + | chronyd-restricted.service |
- | cups.service | + | chronyd.service |
- | dbus-org.fedoraproject.FirewallD1.service | + | cni-dhcp.service |
- | dbus-org.freedesktop.Avahi.service | + | cockpit-motd.service |
- | dbus-org.freedesktop.hostname1.service | + | cockpit-wsinstance-http.service |
- | dbus-org.freedesktop.import1.service | + | cockpit-wsinstance-https-factory@.service |
- | dbus-org.freedesktop.locale1.service | + | cockpit-wsinstance-https@.service |
- | dbus-org.freedesktop.login1.service | + | cockpit.service |
- | dbus-org.freedesktop.machine1.service | + | colord.service |
- | dbus-org.freedesktop.nm-dispatcher.service | + | configure-printer@.service |
- | dbus-org.freedesktop.portable1.service | + | console-getty.service |
- | dbus-org.freedesktop.timedate1.service | + | container-getty@.service |
- | dbus.service | + | cpupower.service |
- | debug-shell.service | + | crond.service |
- | dm-event.service | + | cups-browsed.service |
- | dnf-makecache.service | + | cups.service |
- | dnsmasq.service | + | |
- | dracut-cmdline.service | + | |
--More-- | --More-- | ||
</ | </ | ||
Ligne 871: | Ligne 883: | ||
< | < | ||
- | [root@centos8 ~]# systemctl list-unit-files -t mount | + | [root@redhat9 tmp]# systemctl list-unit-files -t mount |
- | UNIT FILE | + | UNIT FILE |
- | -.mount | + | -.mount |
- | boot.mount | + | boot.mount |
- | dev-hugepages.mount | + | dev-hugepages.mount |
- | dev-mqueue.mount | + | dev-mqueue.mount |
- | proc-fs-nfsd.mount | + | mnt-sdb12.mount |
- | proc-sys-fs-binfmt_misc.mount | + | proc-sys-fs-binfmt_misc.mount |
- | sys-fs-fuse-connections.mount static | + | run-vmblock\x2dfuse.mount |
- | sys-kernel-config.mount | + | sys-fs-fuse-connections.mount static |
- | sys-kernel-debug.mount | + | sys-kernel-config.mount |
- | tmp.mount | + | sys-kernel-debug.mount |
- | var-lib-machines.mount | + | sys-kernel-tracing.mount |
- | var-lib-nfs-rpc_pipefs.mount | + | tmp.mount |
12 unit files listed. | 12 unit files listed. | ||
Ligne 898: | Ligne 910: | ||
< | < | ||
- | [root@centos8 ~]# ls -l / | + | [root@redhat9 tmp]# ls -l / |
- | -rwxr-xr-x. 1 root root 46096 Apr 7 16:56 / | + | -rwxr-xr-x. 1 root root 57696 Jul 18 13:01 / |
</ | </ | ||
Ligne 905: | Ligne 917: | ||
< | < | ||
- | [root@centos8 ~]# ls -l / | + | [root@redhat9 tmp]# ls -l / |
- | total 508 | + | total 396 |
- | -rwxr-xr-x. 1 root root 504 Jan 4 11:25 kdump-dep-generator.sh | + | -rwxr-xr-x. 1 root root 541 Jul 24 06:08 kdump-dep-generator.sh |
- | -r-xr-xr-x. 1 root root 134976 Aug 17 2020 lvm2-activation-generator | + | -rwxr-xr-x. 1 root root 15832 May 17 18:27 ostree-system-generator |
- | -rwxr-xr-x. 1 root root | + | lrwxrwxrwx. 1 root root 31 Aug 8 10:54 podman-system-generator |
- | -rwxr-xr-x. 1 root root | + | -rwxr-xr-x. 1 root root |
- | -rwxr-xr-x. 1 root root 743 Apr 23 2020 selinux-autorelabel-generator.sh | + | -rwxr-xr-x. 1 root root 15624 Jul 18 13:01 systemd-bless-boot-generator |
- | -rwxr-xr-x. 1 root root 33504 Apr 7 16:56 systemd-cryptsetup-generator | + | -rwxr-xr-x. 1 root root 40920 Jul 18 13:01 systemd-cryptsetup-generator |
- | -rwxr-xr-x. 1 root root 16648 Apr 7 16:56 systemd-debug-generator | + | -rwxr-xr-x. 1 root root 24312 Jul 18 13:01 systemd-debug-generator |
- | -rwxr-xr-x. 1 root root 46096 Apr 7 16:56 systemd-fstab-generator | + | -rwxr-xr-x. 1 root root 57696 Jul 18 13:01 systemd-fstab-generator |
- | -rwxr-xr-x. 1 root root 17064 Apr 7 16:56 systemd-getty-generator | + | -rwxr-xr-x. 1 root root 24096 Jul 18 13:01 systemd-getty-generator |
- | -rwxr-xr-x. 1 root root 29432 Apr 7 16:56 systemd-gpt-auto-generator | + | -rwxr-xr-x. 1 root root 36496 Jul 18 13:01 systemd-gpt-auto-generator |
- | -rwxr-xr-x. 1 root root 12568 Apr 7 16:56 systemd-hibernate-resume-generator | + | -rwxr-xr-x. 1 root root 16096 Jul 18 13:01 systemd-hibernate-resume-generator |
- | -rwxr-xr-x. 1 root root 12368 Apr 7 16:56 systemd-rc-local-generator | + | -rwxr-xr-x. 1 root root 24240 Jul 18 13:01 systemd-integritysetup-generator |
- | -rwxr-xr-x. 1 root root 12408 Apr 7 16:56 systemd-system-update-generator | + | -rwxr-xr-x. 1 root root 15632 Jul 18 13:01 systemd-rc-local-generator |
- | -rwxr-xr-x. 1 root root 33544 Apr 7 16:56 systemd-sysv-generator | + | -rwxr-xr-x. 1 root root 24296 Jul 18 13:01 systemd-run-generator |
- | -rwxr-xr-x. 1 root root 17024 Apr 7 16:56 systemd-veritysetup-generator | + | -rwxr-xr-x. 1 root root 15824 Jul 18 13:01 systemd-system-update-generator |
+ | -rwxr-xr-x. 1 root root 36424 Jul 18 13:01 systemd-sysv-generator | ||
+ | -rwxr-xr-x. 1 root root 36872 Jul 18 13:01 systemd-veritysetup-generator | ||
</ | </ | ||
Ligne 927: | Ligne 941: | ||
< | < | ||
- | [root@centos8 ~]# systemctl --help | + | [root@redhat9 tmp]# systemctl --help |
- | systemctl [OPTIONS...] | + | systemctl [OPTIONS...] COMMAND ... |
- | Query or send control commands to the systemd | + | Query or send control commands to the system |
- | -h --help | + | Unit Commands: |
- | | + | |
- | | + | |
- | | + | |
- | -H --host=[USER@]HOST | + | |
- | Operate on remote host | + | |
- | -M --machine=CONTAINER | + | |
- | | + | |
- | -t --type=TYPE | + | is-active PATTERN... Check whether units are active |
- | --state=STATE | + | is-failed |
- | -p --property=NAME | + | |
- | -a --all Show all properties/ | + | |
- | | + | |
- | the system, use the 'list-unit-files' | + | cat PATTERN... |
- | --failed | + | help PATTERN...|PID... |
- | | + | |
- | | + | or wanted by the units or by which those |
- | | + | units are required or wanted |
- | --job-mode=MODE | + | |
- | | + | stop UNIT... |
- | --show-types | + | reload UNIT... |
- | | + | |
- | -i --ignore-inhibitors | + | try-restart UNIT... |
- | When shutting down or sleeping, ignore inhibitors | + | |
- | --kill-who=WHO | + | otherwise start or restart |
- | | + | |
- | --now Start or stop unit in addition to enabling or disabling it | + | if supported, otherwise restart |
- | --dry-run | + | |
- | | + | kill UNIT... |
- | | + | clean UNIT... |
- | | + | configuration of unit |
- | --no-wall | + | |
- | | + | |
- | | + | set-property UNIT PROPERTY=VALUE... Sets one or more properties of a unit |
- | | + | bind UNIT PATH [PATH] |
- | | + | unit's namespace |
- | Do not ask for system passwords | + | mount-image UNIT PATH [PATH [OPTS]] Mount an image from the host into a |
- | | + | |
- | --runtime | + | |
- | | + | |
- | | + | reset-failed [PATTERN...] |
- | | + | |
- | | + | Unit File Commands: |
- | | + | list-unit-files [PATTERN...] |
- | | + | |
- | -n --lines=INTEGER | + | |
- | -o --output=STRING | + | |
- | | + | |
- | | + | based on preset configuration |
- | | + | |
- | | + | |
- | | + | lines 1-55 |
- | + | ||
- | lines 1-57 | + | |
</ | </ | ||
Ligne 995: | Ligne 1007: | ||
< | < | ||
- | [root@centos8 ~]# pkg-config systemd --variable=systemdsystemunitdir | + | [root@redhat9 tmp]# pkg-config systemd --variable=systemdsystemunitdir |
/ | / | ||
</ | </ | ||
< | < | ||
- | [root@centos8 ~]# ls -l / | + | [root@redhat9 tmp]# ls -l / |
- | total 1464 | + | total 1640 |
- | -rw-r--r--. 1 root root | + | -rw-r--r--. 1 root root |
- | -rw-r--r--. 1 root root | + | -rw-r--r--. 1 root root |
- | -rw-r--r--. 1 root root 1512 Apr 23 2020 auditd.service | + | -rw-r--r--. 1 root root |
- | -rw-r--r--. 1 root root | + | -rw-r--r--. 1 root root |
- | lrwxrwxrwx. 1 root root | + | -rw-r--r--. 1 root root 274 Apr 4 2022 atd.service |
- | -rw-r--r--. 1 root root 1044 Nov 16 2020 avahi-daemon.service | + | -rw-r--r--. 1 root root 1771 Nov 8 2023 auditd.service |
- | -rw-r--r--. 1 root root 870 Nov 16 2020 avahi-daemon.socket | + | lrwxrwxrwx. 1 root root |
- | -rw-r--r--. 1 root root | + | -rw-r--r--. 1 root root 1044 Nov |
- | drwxr-xr-x. 2 root root 6 Apr 7 16:55 basic.target.wants | + | -rw-r--r--. 1 root root 870 Nov |
- | -r--r--r--. 1 root root | + | -rw-r--r--. 1 root root |
- | -rw-r--r--. 1 root root | + | -rw-r--r--. 1 root root 964 Jul 18 13:00 basic.target |
- | -rw-r--r--. 1 root root | + | drwxr-xr-x. 2 root root 6 Jul 18 13:00 basic.target.wants |
- | -rw-r--r--. 1 root root | + | -r--r--r--. 1 root root |
- | -rw-r--r--. 1 root root | + | -rw-r--r--. 1 root root |
- | -rw-r--r--. 1 root root | + | -rw-r--r--. 1 root root |
- | -rw-r--r--. 1 root root | + | -rw-r--r--. 1 root root |
- | -rw-r--r--. 1 root root | + | -rw-r--r--. 1 root root |
- | -rw-r--r--. 1 root root | + | -rw-r--r--. 1 root root |
- | -rw-r--r--. 1 root root | + | -rw-r--r--. 1 root root |
- | -rw-r--r--. 1 root root | + | -rw-r--r--. 1 root root |
- | -rw-r--r--. 1 root root | + | -rw-r--r--. 1 root root |
- | -rw-r--r--. 1 root root | + | -rw-r--r--. 1 root root |
- | -rw-r--r--. 1 root root | + | -rw-r--r--. 1 root root 1811 Jan 23 2024 chronyd-restricted.service |
- | -rw-r--r--. 1 root root | + | -rw-r--r--. 1 root root 1468 Jan 23 2024 chronyd.service |
- | -rw-r--r--. 1 root root | + | -rw-r--r--. 1 root root 1082 Jan 23 2024 chrony-wait.service |
- | -rw-r--r--. 1 root root | + | -rw-r--r--. 1 root root |
- | -rw-r--r--. 1 root root | + | -rw-r--r--. 1 root root |
- | -rw-r--r--. 1 root root 1082 Apr | + | -rw-r--r--. 1 root root |
- | -rw-r--r--. 1 root root 1263 Apr | + | -rw-r--r--. 1 root root |
- | -rw-r--r--. 1 root root | + | -rw-r--r--. 1 root root |
- | -rw-r--r--. 1 root root | + | -rw-r--r--. 1 root root |
- | -rw-r--r--. 1 root root | + | -rw-r--r--. 1 root root |
- | -rw-r--r--. 1 root root | + | -rw-r--r--. 1 root root |
- | lrwxrwxrwx. 1 root root | + | -rw-r--r--. 1 root root |
- | -rw-r--r--. 1 root root | + | -rw-r--r--. 1 root root |
- | -r--r--r--. 1 root root | + | -rw-r--r--. 1 root root |
- | -r--r--r--. 1 root root 248 Jun 15 2020 cups.service | + | -rw-r--r--. 1 root root |
- | -r--r--r--. 1 root root 136 Jun 15 2020 cups.socket | + | -rw-r--r--. 1 root root |
- | lrwxrwxrwx. 1 root root 25 Apr 7 16:55 dbus-org.freedesktop.hostname1.service -> systemd-hostnamed.service | + | -rw-r--r--. 1 root root 1102 Jul 18 13:00 console-getty.service |
- | lrwxrwxrwx. 1 root root 23 Apr 7 16:55 dbus-org.freedesktop.import1.service | + | -rw-r--r--. 1 root root 1254 Jul 18 13:00 container-getty@.service |
- | lrwxrwxrwx. 1 root root 23 Apr 7 16:55 dbus-org.freedesktop.locale1.service -> systemd-localed.service | + | -rw-r--r--. 1 root root |
- | lrwxrwxrwx. 1 root root 22 Apr 7 16:55 dbus-org.freedesktop.login1.service -> systemd-logind.service | + | -rw-r--r--. 1 root root |
- | lrwxrwxrwx. 1 root root 24 Apr 7 16:55 dbus-org.freedesktop.machine1.service | + | -rw-r--r--. 1 root root |
- | lrwxrwxrwx. 1 root root 25 Apr 7 16:55 dbus-org.freedesktop.portable1.service -> systemd-portabled.service | + | -rw-r--r--. 1 root root |
- | lrwxrwxrwx. 1 root root 25 Apr 7 16:55 dbus-org.freedesktop.timedate1.service | + | lrwxrwxrwx. 1 root root 13 Jul 18 13:00 ctrl-alt-del.target |
- | -rw-r--r--. 1 root root | + | -rw-r--r--. 1 root root |
- | -rw-r--r--. 1 root root | + | -rw-r--r--. 1 root root |
- | drwxr-xr-x. 2 root root 6 Apr 7 16:55 dbus.target.wants | + | -rw-r--r--. 1 root root |
- | -rw-r--r--. 1 root root 1084 Apr 7 16:55 debug-shell.service | + | drwxr-xr-x. 2 root root 25 Sep 25 12:03 cups.service.d |
- | lrwxrwxrwx. 1 root root 16 Apr 7 16:55 default.target -> graphical.target | + | -rw-r--r--. 1 root root |
- | drwxr-xr-x. 2 root root 6 Apr 7 16:55 default.target.wants | + | -rw-r--r--. 1 root root |
- | -rw-r--r--. 1 root root | + | -rw-r--r--. 1 root root |
- | -rw-r--r--. 1 root root | + | lrwxrwxrwx. 1 root root 25 Jul 18 13:00 dbus-org.freedesktop.hostname1.service |
- | -r--r--r--. 1 root root | + | lrwxrwxrwx. 1 root root 23 Jul 18 13:00 dbus-org.freedesktop.locale1.service -> systemd-localed.service |
- | -r--r--r--. 1 root root 248 Aug 17 2020 dm-event.socket | + | |
- | -rw-r--r--. 1 root root 457 Jun 2 2020 dnf-makecache.service | + | |
--More-- | --More-- | ||
</ | </ | ||
Ligne 1064: | Ligne 1074: | ||
< | < | ||
- | [root@centos8 ~]# ls -l / | + | [root@redhat9 tmp]# ls -l / |
total 0 | total 0 | ||
</ | </ | ||
Ligne 1071: | Ligne 1081: | ||
< | < | ||
- | [root@centos8 ~]# pkg-config systemd --variable=systemduserunitdir | + | [root@redhat9 tmp]# pkg-config systemd --variable=systemduserunitdir |
/ | / | ||
</ | </ | ||
Ligne 1082: | Ligne 1092: | ||
< | < | ||
- | [root@centos8 ~]# cat / | + | [root@redhat9 tmp]# cat / |
[Unit] | [Unit] | ||
Description=OpenSSH server daemon | Description=OpenSSH server daemon | ||
Ligne 1091: | Ligne 1101: | ||
[Service] | [Service] | ||
Type=notify | Type=notify | ||
- | EnvironmentFile=-/ | ||
EnvironmentFile=-/ | EnvironmentFile=-/ | ||
- | ExecStart=/ | + | ExecStart=/ |
ExecReload=/ | ExecReload=/ | ||
KillMode=process | KillMode=process | ||
Ligne 1118: | Ligne 1127: | ||
* **Type=notify**, | * **Type=notify**, | ||
* Cette directive indique que le service informera Systemd quand son démarrage a terminé, | * Cette directive indique que le service informera Systemd quand son démarrage a terminé, | ||
- | * **ExecStart=/ | + | * **ExecStart=/ |
* Cette directive définit l' | * Cette directive définit l' | ||
* **ExecReload=/ | * **ExecReload=/ | ||
Ligne 1137: | Ligne 1146: | ||
< | < | ||
- | [root@centos8 ~]# systemctl show sshd | + | [root@redhat9 tmp]# systemctl show sshd |
Type=notify | Type=notify | ||
+ | ExitType=main | ||
Restart=on-failure | Restart=on-failure | ||
NotifyAccess=main | NotifyAccess=main | ||
Ligne 1144: | Ligne 1154: | ||
TimeoutStartUSec=1min 30s | TimeoutStartUSec=1min 30s | ||
TimeoutStopUSec=1min 30s | TimeoutStopUSec=1min 30s | ||
+ | TimeoutAbortUSec=1min 30s | ||
+ | TimeoutStartFailureMode=terminate | ||
+ | TimeoutStopFailureMode=terminate | ||
RuntimeMaxUSec=infinity | RuntimeMaxUSec=infinity | ||
+ | RuntimeRandomizedExtraUSec=0 | ||
WatchdogUSec=0 | WatchdogUSec=0 | ||
- | WatchdogTimestamp=Thu 2021-06-03 15:09:54 EDT | + | WatchdogTimestampMonotonic=0 |
- | WatchdogTimestampMonotonic=12502561 | + | |
- | PermissionsStartOnly=no | + | |
RootDirectoryStartOnly=no | RootDirectoryStartOnly=no | ||
RemainAfterExit=no | RemainAfterExit=no | ||
GuessMainPID=yes | GuessMainPID=yes | ||
- | MainPID=902 | + | MainPID=1175 |
ControlPID=0 | ControlPID=0 | ||
FileDescriptorStoreMax=0 | FileDescriptorStoreMax=0 | ||
Ligne 1158: | Ligne 1170: | ||
StatusErrno=0 | StatusErrno=0 | ||
Result=success | Result=success | ||
+ | ReloadResult=success | ||
+ | CleanResult=success | ||
UID=[not set] | UID=[not set] | ||
GID=[not set] | GID=[not set] | ||
NRestarts=0 | NRestarts=0 | ||
- | ExecMainStartTimestamp=Thu | + | OOMPolicy=stop |
- | ExecMainStartTimestampMonotonic=12446178 | + | ReloadSignal=1 |
+ | ExecMainStartTimestamp=Thu | ||
+ | ExecMainStartTimestampMonotonic=38779836 | ||
ExecMainExitTimestampMonotonic=0 | ExecMainExitTimestampMonotonic=0 | ||
- | ExecMainPID=902 | + | ExecMainPID=1175 |
ExecMainCode=0 | ExecMainCode=0 | ||
ExecMainStatus=0 | ExecMainStatus=0 | ||
- | ExecStart={ path=/ | + | ExecStart={ path=/ |
+ | ExecStartEx={ path=/ | ||
ExecReload={ path=/ | ExecReload={ path=/ | ||
+ | ExecReloadEx={ path=/ | ||
Slice=system.slice | Slice=system.slice | ||
ControlGroup=/ | ControlGroup=/ | ||
- | MemoryCurrent=6270976 | + | ControlGroupId=4041 |
- | CPUUsageNSec=[not set] | + | MemoryCurrent=5337088 |
- | EffectiveCPUs= | + | MemoryAvailable=infinity |
- | EffectiveMemoryNodes= | + | CPUUsageNSec=63348000 |
TasksCurrent=1 | TasksCurrent=1 | ||
- | IPIngressBytes=18446744073709551615 | + | IPIngressBytes=[no data] |
- | IPIngressPackets=18446744073709551615 | + | IPIngressPackets=[no data] |
- | IPEgressBytes=18446744073709551615 | + | IPEgressBytes=[no data] |
- | IPEgressPackets=18446744073709551615 | + | IPEgressPackets=[no data] |
- | Delegate=no | + | IOReadBytes=18446744073709551615 |
- | CPUAccounting=no | + | IOReadOperations=18446744073709551615 |
- | CPUWeight=[not set] | + | IOWriteBytes=18446744073709551615 |
- | StartupCPUWeight=[not set] | + | IOWriteOperations=18446744073709551615 |
- | CPUShares=[not set] | + | lines 1-55 |
- | StartupCPUShares=[not set] | + | |
- | CPUQuotaPerSecUSec=infinity | + | |
- | CPUQuotaPeriodUSec=infinity | + | |
- | AllowedCPUs= | + | |
- | AllowedMemoryNodes= | + | |
- | IOAccounting=no | + | |
- | IOWeight=[not set] | + | |
- | StartupIOWeight=[not set] | + | |
- | BlockIOAccounting=no | + | |
- | BlockIOWeight=[not set] | + | |
- | lines 1-57 | + | |
</ | </ | ||
Ligne 1201: | Ligne 1208: | ||
< | < | ||
- | [root@centos8 ~]# systemctl list-dependencies sshd.service | + | [root@redhat9 tmp]# systemctl list-dependencies sshd.service |
sshd.service | sshd.service | ||
● ├─system.slice | ● ├─system.slice | ||
● ├─sshd-keygen.target | ● ├─sshd-keygen.target | ||
- | ● │ ├─sshd-keygen@ecdsa.service | + | ○ │ ├─sshd-keygen@ecdsa.service |
- | ● │ ├─sshd-keygen@ed25519.service | + | ○ │ ├─sshd-keygen@ed25519.service |
- | ● │ └─sshd-keygen@rsa.service | + | ○ │ └─sshd-keygen@rsa.service |
● └─sysinit.target | ● └─sysinit.target | ||
● | ● | ||
● | ● | ||
● | ● | ||
- | ● ├─import-state.service | + | ○ ├─iscsi-onboot.service |
- | ● ├─iscsi-onboot.service | + | ○ ├─iscsi-starter.service |
● | ● | ||
- | ● ├─ldconfig.service | + | ○ ├─ldconfig.service |
- | ● | + | |
● | ● | ||
● | ● | ||
+ | ○ | ||
● | ● | ||
● | ● | ||
● | ● | ||
● | ● | ||
- | ● | + | ○ ├─selinux-autorelabel-mark.service |
- | ● ├─selinux-autorelabel-mark.service | + | |
● | ● | ||
● | ● | ||
● | ● | ||
- | ● | + | ● ├─sys-kernel-tracing.mount |
- | ● ├─systemd-binfmt.service | + | ○ ├─systemd-ask-password-console.path |
- | ● | + | ○ ├─systemd-binfmt.service |
- | ● ├─systemd-hwdb-update.service | + | ○ |
- | ● ├─systemd-journal-catalog-update.service | + | ● ├─systemd-boot-update.service |
+ | ○ ├─systemd-firstboot.service | ||
+ | ○ ├─systemd-hwdb-update.service | ||
+ | ○ ├─systemd-journal-catalog-update.service | ||
● | ● | ||
● | ● | ||
- | ● ├─systemd-machine-id-commit.service | + | ○ ├─systemd-machine-id-commit.service |
● | ● | ||
+ | ● | ||
+ | ○ | ||
+ | ○ | ||
+ | ○ | ||
● | ● | ||
+ | ○ | ||
● | ● | ||
- | ● ├─systemd-sysusers.service | + | ○ ├─systemd-sysusers.service |
● | ● | ||
● | ● | ||
● | ● | ||
● | ● | ||
- | ● ├─systemd-update-done.service | + | ○ ├─systemd-update-done.service |
● | ● | ||
● | ● | ||
+ | ● │ └─systemd-cryptsetup@sdb12.service | ||
+ | ● | ||
● | ● | ||
- | ● │ ├─-.mount | + | lines 1-55 |
- | ● │ ├─boot.mount | + | |
- | ● │ └─systemd-remount-fs.service | + | |
- | ● | + | |
- | ● | + | |
</ | </ | ||
Ligne 1260: | Ligne 1272: | ||
< | < | ||
- | [root@centos8 ~]# pkg-config systemd --variable=systemdsystemunitpath | + | [root@redhat9 tmp]# pkg-config systemd --variable=systemdsystemunitpath |
/ | / | ||
</ | </ | ||
< | < | ||
- | [root@centos8 ~]# ls -l / | + | [root@redhat9 tmp]# ls -l / |
- | total 4 | + | total 8 |
- | drwxr-xr-x. 2 root root 31 May 8 2020 basic.target.wants | + | drwxr-xr-x. 2 root root 65 Oct 19 2023 basic.target.wants |
- | lrwxrwxrwx. 1 root root | + | drwxr-xr-x. 2 root root 31 Oct 19 2023 bluetooth.target.wants |
- | lrwxrwxrwx. 1 root root | + | lrwxrwxrwx. 1 root root 37 Oct 19 2023 ctrl-alt-del.target -> / |
- | lrwxrwxrwx. 1 root root | + | lrwxrwxrwx. 1 root root |
- | lrwxrwxrwx. 1 root root 41 May 8 2020 dbus-org.freedesktop.timedate1.service -> / | + | lrwxrwxrwx. 1 root root 41 Oct 19 2023 |
- | lrwxrwxrwx. 1 root root 37 May 8 2020 default.target -> / | + | lrwxrwxrwx. 1 root root |
- | drwxr-xr-x. 2 root root 32 May 8 2020 getty.target.wants | + | lrwxrwxrwx. 1 root root 44 Oct 19 2023 dbus-org.freedesktop.ModemManager1.service -> / |
- | drwxr-xr-x. 2 root root 4096 Jun 3 14:02 multi-user.target.wants | + | lrwxrwxrwx. 1 root root |
- | drwxr-xr-x. 2 root root 48 May 8 2020 network-online.target.wants | + | lrwxrwxrwx. 1 root root 43 Oct 19 2023 |
- | drwxr-xr-x. 2 root root 33 Apr 19 12:07 nfs-blkmap.service.requires | + | lrwxrwxrwx. 1 root root 40 Oct 19 2023 |
- | drwxr-xr-x. 2 root root 33 Apr 19 12:07 nfs-idmapd.service.requires | + | drwxr-xr-x. 2 root root 45 Oct 19 2023 default.target.wants |
- | drwxr-xr-x. 2 root root 33 Apr 19 12:07 nfs-mountd.service.requires | + | drwxr-xr-x. 2 root root 38 Oct 19 2023 'dev-virtio\x2dports-org.qemu.guest_agent.0.device.wants' |
- | drwxr-xr-x. 2 root root 33 Apr 19 12:07 nfs-server.service.requires | + | lrwxrwxrwx. 1 root root 35 Oct 19 2023 display-manager.service -> / |
- | drwxr-xr-x. 2 root root | + | drwxr-xr-x. 2 root root 32 Oct 19 2023 getty.target.wants |
- | drwxr-xr-x. 2 root root 52 Apr 19 12:07 remote-fs.target.wants | + | drwxr-xr-x. 2 root root 181 Oct 19 |
- | drwxr-xr-x. 2 root root 33 Apr 19 12:07 rpc-gssd.service.requires | + | drwxr-xr-x. 2 root root 36 Oct 19 |
- | drwxr-xr-x. 2 root root 33 Apr 19 12:07 rpc-statd-notify.service.requires | + | drwxr-xr-x. 2 root root 4096 Oct 24 08:02 multi-user.target.wants |
- | drwxr-xr-x. 2 root root 33 Apr 19 12:07 rpc-statd.service.requires | + | drwxr-xr-x. 2 root root 48 Oct 19 |
- | drwxr-xr-x. 2 root root 260 Jun 3 14:02 sockets.target.wants | + | drwxr-xr-x. 2 root root |
- | drwxr-xr-x. 2 root root 235 Apr 19 12:07 sysinit.target.wants | + | drwxr-xr-x. 2 root root 27 Oct 19 |
- | lrwxrwxrwx. 1 root root 39 May 8 2020 syslog.service -> / | + | drwxr-xr-x. 2 root root 186 Oct 19 |
- | lrwxrwxrwx. 1 root root 9 May 11 2019 systemd-timedated.service -> /dev/null | + | drwxr-xr-x. 2 root root 4096 Sep 25 12:08 sysinit.target.wants |
- | drwxr-xr-x. 2 root root 34 May 8 2020 timers.target.wants | + | drwxr-xr-x. 2 root root 27 Oct 23 13:09 sysstat-collect.timer.d |
+ | drwxr-xr-x. 2 root root 64 Oct 23 12:58 sysstat.service.wants | ||
+ | drwxr-xr-x. 2 root root 27 Oct 21 16:32 systemd-tmpfiles-clean.timer.d | ||
+ | drwxr-xr-x. 2 root root 86 Oct 19 2023 timers.target.wants | ||
+ | drwxr-xr-x. 2 root root 29 Oct 19 2023 vmtoolsd.service.requires | ||
</ | </ | ||
Ligne 1297: | Ligne 1313: | ||
< | < | ||
- | [root@centos8 ~]# systemd-analyze | + | [root@redhat9 tmp]# systemd-analyze |
- | Startup finished in 1.665s (kernel) + 6.977s (initrd) + 8.458s (userspace) = 17.101s | + | Startup finished in 1.361s (kernel) + 4.348s (initrd) + 1min 21.082s (userspace) = 1min 26.792s |
- | multi-user.target reached after 5.528s in userspace | + | graphical.target reached after 53.162s in userspace. |
</ | </ | ||
Ligne 1305: | Ligne 1321: | ||
< | < | ||
- | [root@centos8 ~]# systemd-analyze blame | + | [root@redhat9 tmp]# systemd-analyze blame |
- | 4.080s dracut-initqueue.service | + | 44.601s kdump.service |
- | 3.257s kdump.service | + | 18.590s systemd-cryptsetup@sdb12.service |
- | 1.727s tuned.service | + | 16.592s plymouth-quit-wait.service |
- | 1.415s initrd-switch-root.service | + | 9.801s dev-sdb8.device |
- | 1.393s NetworkManager-wait-online.service | + | 9.801s dev-disk-by\x2dpath-pci\x2d0000: |
- | 1.116s systemd-machined.service | + | 9.801s sys-devices-pci0000: |
- | 1.111s dracut-cmdline.service | + | 9.801s dev-disk-by\x2dpartuuid-23a56c2e\x2d08.device |
- | 850ms sssd.service | + | 9.801s dev-disk-by\x2did-ata\x2dQEMU_HARDDISK_QM00005\x2dpart8.device |
- | 791ms vdo.service | + | 9.801s dev-disk-by\x2dpath-pci\x2d0000: |
- | 713ms firewalld.service | + | 9.800s sys-devices-pci0000: |
- | 622ms lvm2-monitor.service | + | 9.800s dev-disk-by\x2dpath-pci\x2d0000: |
- | 605ms polkit.service | + | 9.800s dev-sdb10.device |
- | 508ms chronyd.service | + | 9.800s dev-disk-by\x2dpath-pci\x2d0000: |
- | 434ms avahi-daemon.service | + | 9.800s dev-disk-by\x2did-ata\x2dQEMU_HARDDISK_QM00005\x2dpart10.device |
- | 426ms systemd-logind.service | + | 9.800s dev-disk-by\x2dpartuuid-23a56c2e\x2d0a.device |
- | 417ms netcf-transaction.service | + | 9.800s sys-devices-pci0000: |
- | 410ms dracut-pre-udev.service | + | 9.800s dev-sdb5.device |
- | 295ms libvirtd.service | + | 9.800s dev-disk-by\x2dpath-pci\x2d0000: |
- | 275ms dnf-makecache.service | + | 9.800s dev-disk-by\x2did-ata\x2dQEMU_HARDDISK_QM00005\x2dpart5.device |
- | 243ms systemd-udevd.service | + | 9.800s dev-disk-by\x2dpath-pci\x2d0000: |
- | 221ms systemd-journald.service | + | 9.799s dev-disk-by\x2dpartuuid-23a56c2e\x2d05.device |
- | 196ms systemd-tmpfiles-setup.service | + | 9.782s sys-module-fuse.device |
- | 151ms dracut-pre-pivot.service | + | 9.750s dev-ttyS3.device |
- | 139ms sysroot.mount | + | 9.750s sys-devices-platform-serial8250-tty-ttyS3.device |
- | 139ms systemd-update-utmp-runlevel.service | + | 9.749s dev-ttyS0.device |
- | 122ms systemd-vconsole-setup.service | + | |
- | 110ms lvm2-pvscan@8:25.service | + | 9.749s dev-ttyS1.device |
- | 98ms systemd-udev-trigger.service | + | 9.749s sys-devices-platform-serial8250-tty-ttyS1.device |
- | 82ms gssproxy.service | + | 9.749s dev-ttyS2.device |
- | 81ms cups.service | + | 9.749s sys-devices-platform-serial8250-tty-ttyS2.device |
- | 79ms initrd-parse-etc.service | + | 9.717s sys-devices-pci0000: |
- | 77ms NetworkManager.service | + | 9.717s sys-subsystem-net-devices-ens18.device |
- | 72ms lvm2-pvscan@8:23.service | + | 9.717s sys-module-configfs.device |
- | 69ms systemd-user-sessions.service | + | 9.680s dev-disk-by\x2did-ata\x2dQEMU_HARDDISK_QM00005\x2dpart6.device |
- | 68ms lvm2-pvscan@8:22.service | + | 9.680s sys-devices-pci0000: |
- | 67ms unbound-anchor.service | + | 9.680s dev-disk-by\x2dpartuuid-23a56c2e\x2d06.device |
- | 66ms rsyslog.service | + | 9.680s dev-disk-by\x2dpath-pci\x2d0000: |
- | 62ms boot.mount | + | 9.680s dev-sdb6.device |
- | 56ms sshd.service | + | 9.680s dev-disk-by\x2dpath-pci\x2d0000: |
- | 54ms smartd.service | + | |
- | 54ms systemd-fsck@dev-disk-by\x2duuid-2ae4c035\x2d9244\x2d458c\x2d82c5\x2da49ae169cdb6.service | + | 9.654s sys-devices-pci0000: |
- | 53ms user@1000.service | + | 9.654s dev-sda2.device |
- | 52ms auditd.service | + | 9.654s dev-disk-by\x2dpartuuid-d00dfc8a\x2d02.device |
- | 51ms plymouth-quit.service | + | 9.654s dev-disk-by\x2did-scsi\x2d0QEMU_QEMU_HARDDISK_drive\x2dscsi0\x2dpart2.device |
- | 49ms rngd-wake-threshold.service | + | 9.647s dev-disk-by\x2dpartuuid-23a56c2e\x2d09.device |
- | 46ms import-state.service | + | 9.647s sys-devices-pci0000:00-0000:00:07.0-ata3-host3-target3: |
- | 46ms systemd-tmpfiles-setup-dev.service | + | 9.647s dev-sdb9.device |
- | 43ms ksmtuned.service | + | 9.647s dev-disk-by\x2did-ata\x2dQEMU_HARDDISK_QM00005\x2dpart9.device |
- | 42ms plymouth-quit-wait.service | + | 9.647s dev-disk-by\x2dpath-pci\x2d0000: |
- | 42ms var-lib-nfs-rpc_pipefs.mount | + | 9.647s dev-disk-by\x2dpath-pci\x2d0000: |
- | 42ms rpc-statd-notify.service | + | 9.635s dev-sdb7.device |
- | 38ms plymouth-switch-root.service | + | 9.635s sys-devices-pci0000: |
- | 37ms systemd-remount-fs.service | + | 9.635s |
- | 37ms plymouth-start.service | + | 9.635s dev-disk-by\x2dpartuuid-23a56c2e\x2d07.device |
- | | + | 9.635s |
- | 33ms systemd-tmpfiles-clean.service | + | lines 1-55 |
- | | + | |
- | lines 1-57 | + | |
</ | </ | ||
Ligne 1369: | Ligne 1383: | ||
< | < | ||
- | [root@centos8 ~]# systemd-analyze critical-chain sshd.service | + | [root@redhat9 tmp]# systemd-analyze critical-chain sshd.service |
- | The time after the unit is active or started is printed after the " | + | The time when unit became |
- | The time the unit takes to start is printed after the " | + | The time the unit took to start is printed after the " |
- | sshd.service +56ms | + | sshd.service +348ms |
- | └─network.target @3.799s | + | └─network.target @33.014s |
- | └─NetworkManager.service @3.719s +77ms | + | └─wpa_supplicant.service @49.199s +119ms |
- | └─network-pre.target @3.718s | + | └─basic.target @27.729s |
- | └─firewalld.service @3.004s +713ms | + | └─dbus-broker.service @26.718s +1.007s |
- | └─polkit.service | + | └─dbus.socket |
- | └─basic.target @2.392s | + | └─sysinit.target @26.678s |
- | | + | └─systemd-update-utmp.service @26.658s +19ms |
- | └─sssd-kcm.socket @2.391s | + | └─auditd.service @26.278s +369ms |
- | └─sysinit.target @2.379s | + | └─systemd-tmpfiles-setup.service @25.954s +313ms |
- | | + | └─local-fs.target @25.942s |
- | └─auditd.service @2.317s +52ms | + | └─run-user-1000.mount @1min 19.309s |
- | └─systemd-tmpfiles-setup.service @2.118s +196ms | + | └─local-fs-pre.target @6.742s |
- | | + | └─systemd-tmpfiles-setup-dev.service @3.994s +1.040s |
- | | + | └─kmod-static-nodes.service |
- | └─boot.mount @2.006s +62ms | + | └─systemd-journald.socket |
- | └─systemd-fsck@dev-disk-by\x2duuid-2ae4c035\x2d9244\x2d458c\x2d82c5\x2da49ae169cdb6.service | + | └─system.slice |
- | └─local-fs-pre.target @1.942s | + | └─-.slice |
- | └─lvm2-monitor.service @1.319s +622ms | + | |
- | └─dm-event.socket | + | |
- | └─-.mount | + | |
- | └─system.slice | + | |
- | └─-.slice | + | |
</ | </ | ||
Ligne 1401: | Ligne 1410: | ||
< | < | ||
- | [root@centos7 ~]# systemd-analyze --help | + | [root@redhat9 tmp]# systemd-analyze --help |
- | systemd-analyze [OPTIONS...] | + | systemd-analyze [OPTIONS...] COMMAND ... |
- | Process | + | Profile |
- | + | ||
- | -h --help | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | When generating a dependency graph, filter only origins | + | |
- | or destinations, | + | |
- | | + | |
- | services, which finished TIMESPAN earlier, than the | + | |
- | latest in the branch. The unit of TIMESPAN is seconds | + | |
- | unless specified with a different unit, i.e. 50ms | + | |
- | | + | |
Commands: | Commands: | ||
- | time Print time spent in the kernel before reaching userspace | + | |
- | blame | + | blame Print list of running units ordered by |
- | critical-chain | + | time to init |
- | plot Output SVG graphic showing service initialization | + | critical-chain |
- | dot | + | of units |
- | set-log-level LEVEL Set logging threshold for systemd | + | plot |
- | dump Output state serialization of service manager | + | initialization |
+ | dot [UNIT...] | ||
+ | dump [PATTERN...] | ||
+ | manager | ||
+ | cat-config | ||
+ | unit-files | ||
+ | unit-paths | ||
+ | exit-status [STATUS...] | ||
+ | capability [CAP...] | ||
+ | syscall-filter [NAME...] | ||
+ | filesystems [NAME...] | ||
+ | condition CONDITION... | ||
+ | compare-versions VERSION1 [OP] VERSION2 | ||
+ | | ||
+ | verify FILE... | ||
+ | calendar SPEC... | ||
+ | | ||
+ | timestamp TIMESTAMP... | ||
+ | timespan SPAN... | ||
+ | security [UNIT...] | ||
+ | inspect-elf FILE... | ||
+ | |||
+ | Options: | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | of built-in one | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | with either --table or --json= | ||
+ | | ||
+ | | ||
+ | | ||
+ | -H --host=[USER@]HOST | ||
+ | -M --machine=CONTAINER | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | lines 1-55 | ||
</ | </ | ||
Ligne 1436: | Ligne 1474: | ||
< | < | ||
- | [root@centos8 ~]# cat / | + | [root@redhat9 tmp]# cat / |
- | # SPDX-License-Identifier: | + | # SPDX-License-Identifier: |
# | # | ||
# This file is part of systemd. | # This file is part of systemd. | ||
Ligne 1472: | Ligne 1510: | ||
< | < | ||
- | [root@centos8 ~]# systemctl list-dependencies multi-user.target | + | [root@redhat9 tmp]# systemctl list-dependencies multi-user.target |
multi-user.target | multi-user.target | ||
● ├─atd.service | ● ├─atd.service | ||
● ├─auditd.service | ● ├─auditd.service | ||
● ├─avahi-daemon.service | ● ├─avahi-daemon.service | ||
- | ● ├─chronyd.service | + | ● ├─bar.service |
● ├─crond.service | ● ├─crond.service | ||
● ├─cups.path | ● ├─cups.path | ||
● ├─cups.service | ● ├─cups.service | ||
- | ● ├─dbus.service | ||
- | ● ├─dnf-makecache.timer | ||
● ├─firewalld.service | ● ├─firewalld.service | ||
+ | ● ├─foo.service | ||
+ | ● ├─httpd.service | ||
+ | ○ ├─insights-client-boot.service | ||
● ├─irqbalance.service | ● ├─irqbalance.service | ||
● ├─kdump.service | ● ├─kdump.service | ||
- | ● ├─ksm.service | ||
- | ● ├─ksmtuned.service | ||
● ├─libstoragemgmt.service | ● ├─libstoragemgmt.service | ||
- | ● ├─libvirtd.service | ||
● ├─mcelog.service | ● ├─mcelog.service | ||
● ├─mdmonitor.service | ● ├─mdmonitor.service | ||
- | ● ├─netcf-transaction.service | + | ● ├─ModemManager.service |
● ├─NetworkManager.service | ● ├─NetworkManager.service | ||
+ | ○ ├─ostree-readonly-sysroot-migration.service | ||
● ├─plymouth-quit-wait.service | ● ├─plymouth-quit-wait.service | ||
- | ● ├─plymouth-quit.service | + | ○ ├─plymouth-quit.service |
- | ● ├─rpcbind.service | + | ● ├─psacct.service |
+ | ● ├─rhsmcertd.service | ||
● ├─rsyslog.service | ● ├─rsyslog.service | ||
- | ● ├─smartd.service | + | ○ ├─smartd.service |
● ├─sshd.service | ● ├─sshd.service | ||
- | ● ├─sssd.service | + | ○ ├─sssd.service |
+ | ● ├─sysstat.service | ||
● ├─systemd-ask-password-wall.path | ● ├─systemd-ask-password-wall.path | ||
● ├─systemd-logind.service | ● ├─systemd-logind.service | ||
- | ● ├─systemd-update-utmp-runlevel.service | + | ○ ├─systemd-update-utmp-runlevel.service |
● ├─systemd-user-sessions.service | ● ├─systemd-user-sessions.service | ||
- | ● ├─tuned.service | + | ○ ├─vmtoolsd.service |
- | ● ├─vdo.service | + | |
● ├─basic.target | ● ├─basic.target | ||
● │ ├─-.mount | ● │ ├─-.mount | ||
- | ● │ ├─microcode.service | + | ○ │ ├─low-memory-monitor.service |
+ | ○ │ ├─microcode.service | ||
● │ ├─paths.target | ● │ ├─paths.target | ||
● │ ├─slices.target | ● │ ├─slices.target | ||
Ligne 1521: | Ligne 1560: | ||
● │ │ ├─iscsid.socket | ● │ │ ├─iscsid.socket | ||
● │ │ ├─iscsiuio.socket | ● │ │ ├─iscsiuio.socket | ||
- | ● │ │ ├─libvirtd-ro.socket | + | ○ │ │ ├─multipathd.socket |
- | ● │ │ ├─libvirtd.socket | + | |
- | ● │ │ ├─rpcbind.socket | + | |
● │ │ ├─sssd-kcm.socket | ● │ │ ├─sssd-kcm.socket | ||
● │ │ ├─systemd-coredump.socket | ● │ │ ├─systemd-coredump.socket | ||
Ligne 1529: | Ligne 1566: | ||
● │ │ ├─systemd-journald-dev-log.socket | ● │ │ ├─systemd-journald-dev-log.socket | ||
● │ │ ├─systemd-journald.socket | ● │ │ ├─systemd-journald.socket | ||
- | ● │ │ ├─systemd-udevd-control.socket | + | lines 1-55 |
- | lines 1-57 | + | |
</ | </ | ||
Ligne 1542: | Ligne 1578: | ||
< | < | ||
- | [root@centos8 ~]# systemctl --failed | + | [root@redhat9 tmp]# systemctl --failed |
- | 0 loaded units listed. Pass --all to see loaded but inactive units, too. | + | UNIT LOAD ACTIVE SUB DESCRIPTION |
- | To show all installed unit files use ' | + | 0 loaded units listed. |
</ | </ | ||
Ligne 1550: | Ligne 1586: | ||
< | < | ||
- | [root@centos8 ~]# ls -l / | + | [root@redhat9 tmp]# ls -l / |
total 0 | total 0 | ||
- | lrwxrwxrwx. 1 root root 35 May 8 2020 atd.service -> / | + | lrwxrwxrwx. 1 root root 35 Oct 19 2023 atd.service -> / |
- | lrwxrwxrwx. 1 root root 38 May 8 2020 auditd.service -> / | + | lrwxrwxrwx. 1 root root 38 Oct 19 2023 auditd.service -> / |
- | lrwxrwxrwx. 1 root root 44 Jun 3 14:02 avahi-daemon.service -> / | + | lrwxrwxrwx. 1 root root 44 Oct 19 2023 avahi-daemon.service -> / |
- | lrwxrwxrwx. 1 root root 39 May 8 2020 chronyd.service -> / | + | lrwxrwxrwx. 1 root root 35 Oct 23 14:01 bar.service -> / |
- | lrwxrwxrwx. 1 root root 37 May 8 2020 crond.service -> / | + | lrwxrwxrwx. 1 root root 37 Oct 19 2023 crond.service -> / |
- | lrwxrwxrwx. 1 root root 33 Jun 3 14:02 cups.path -> / | + | lrwxrwxrwx. 1 root root 33 Oct 19 2023 cups.path -> / |
- | lrwxrwxrwx. 1 root root 36 Jun 3 14:02 cups.service -> / | + | lrwxrwxrwx. 1 root root 36 Oct 19 2023 cups.service -> / |
- | lrwxrwxrwx. 1 root root 43 May 8 2020 dnf-makecache.timer -> / | + | lrwxrwxrwx. 1 root root 41 Oct 19 2023 firewalld.service -> / |
- | lrwxrwxrwx. 1 root root 41 May 8 2020 firewalld.service -> / | + | lrwxrwxrwx. 1 root root 35 Oct 23 13:59 foo.service -> / |
- | lrwxrwxrwx. 1 root root 42 May 8 2020 irqbalance.service -> / | + | lrwxrwxrwx. 1 root root 37 Oct 22 10:15 httpd.service -> / |
- | lrwxrwxrwx. 1 root root 37 May 8 2020 kdump.service -> / | + | lrwxrwxrwx. 1 root root 52 Oct 19 2023 insights-client-boot.service -> / |
- | lrwxrwxrwx. 1 root root 35 Apr 19 12:07 ksm.service -> / | + | lrwxrwxrwx. 1 root root 42 Oct 19 2023 irqbalance.service -> / |
- | lrwxrwxrwx. 1 root root 40 Apr 19 12:07 ksmtuned.service -> / | + | lrwxrwxrwx. 1 root root 37 Oct 19 2023 kdump.service -> / |
- | lrwxrwxrwx. 1 root root 46 May 8 2020 libstoragemgmt.service -> / | + | lrwxrwxrwx. 1 root root 46 Oct 19 2023 libstoragemgmt.service -> / |
- | lrwxrwxrwx. 1 root root 40 Apr 19 12:07 libvirtd.service -> / | + | lrwxrwxrwx. 1 root root 38 Oct 19 2023 mcelog.service -> / |
- | lrwxrwxrwx. 1 root root 38 May 8 2020 mcelog.service -> / | + | lrwxrwxrwx. 1 root root 41 Oct 19 2023 mdmonitor.service -> / |
- | lrwxrwxrwx. 1 root root 41 May 8 2020 mdmonitor.service -> / | + | lrwxrwxrwx. 1 root root 44 Oct 19 2023 ModemManager.service -> / |
- | lrwxrwxrwx. 1 root root 49 Apr 19 12:07 netcf-transaction.service -> / | + | lrwxrwxrwx. 1 root root 46 Oct 19 2023 NetworkManager.service -> / |
- | lrwxrwxrwx. 1 root root 46 May 8 2020 NetworkManager.service -> / | + | lrwxrwxrwx. 1 root root 38 Oct 22 15:41 psacct.service |
- | lrwxrwxrwx. 1 root root 41 Apr 19 12:07 nfs-client.target | + | lrwxrwxrwx. 1 root root 40 Oct 19 2023 remote-fs.target -> / |
- | lrwxrwxrwx. 1 root root 40 May 8 2020 remote-fs.target -> / | + | lrwxrwxrwx. 1 root root 41 Oct 19 2023 rhsmcertd.service -> / |
- | lrwxrwxrwx. 1 root root 39 Apr 19 12:07 rpcbind.service -> / | + | lrwxrwxrwx. 1 root root 39 Oct 19 2023 rsyslog.service -> / |
- | lrwxrwxrwx. 1 root root 39 May 8 2020 rsyslog.service -> / | + | lrwxrwxrwx. 1 root root 38 Oct 19 2023 smartd.service -> / |
- | lrwxrwxrwx. 1 root root 38 May 8 2020 smartd.service -> / | + | lrwxrwxrwx. 1 root root 36 Oct 19 2023 sshd.service -> / |
- | lrwxrwxrwx. 1 root root 36 May 8 2020 sshd.service -> / | + | lrwxrwxrwx. 1 root root 36 Oct 19 2023 sssd.service -> / |
- | lrwxrwxrwx. 1 root root 36 May 8 2020 sssd.service -> / | + | lrwxrwxrwx. 1 root root 39 Oct 23 12:58 sysstat.service -> / |
- | lrwxrwxrwx. 1 root root 37 May 8 2020 tuned.service -> / | + | lrwxrwxrwx. 1 root root 40 Oct 19 2023 vmtoolsd.service -> / |
- | lrwxrwxrwx. 1 root root 35 May 8 2020 vdo.service -> / | + | |
- | [root@centos8 ~]# ls -l / | + | [root@redhat9 tmp]# ls -l / |
total 0 | total 0 | ||
- | lrwxrwxrwx. 1 root root 15 Apr 7 12:08 dbus.service | + | lrwxrwxrwx. 1 root root 15 Jul 18 13:00 getty.target |
- | lrwxrwxrwx. 1 root root 15 Apr 7 16:55 getty.target | + | lrwxrwxrwx. 1 root root 44 May 17 18:27 ostree-readonly-sysroot-migration.service |
- | lrwxrwxrwx. 1 root root 24 Oct 6 2020 plymouth-quit.service -> ../ | + | lrwxrwxrwx. 1 root root 24 Jul 14 2023 plymouth-quit.service -> ../ |
- | lrwxrwxrwx. 1 root root 29 Oct 6 2020 plymouth-quit-wait.service -> ../ | + | lrwxrwxrwx. 1 root root 29 Jul 14 2023 plymouth-quit-wait.service -> ../ |
- | lrwxrwxrwx. 1 root root 33 Apr 7 16:55 systemd-ask-password-wall.path -> ../ | + | lrwxrwxrwx. 1 root root 33 Jul 18 13:00 systemd-ask-password-wall.path -> ../ |
- | lrwxrwxrwx. 1 root root 25 Apr 7 16:55 systemd-logind.service -> ../ | + | lrwxrwxrwx. 1 root root 25 Jul 18 13:00 systemd-logind.service -> ../ |
- | lrwxrwxrwx. 1 root root 39 Apr 7 16:55 systemd-update-utmp-runlevel.service -> ../ | + | lrwxrwxrwx. 1 root root 39 Jul 18 13:00 systemd-update-utmp-runlevel.service -> ../ |
- | lrwxrwxrwx. 1 root root 32 Apr 7 16:55 systemd-user-sessions.service -> ../ | + | lrwxrwxrwx. 1 root root 32 Jul 18 13:00 systemd-user-sessions.service -> ../ |
</ | </ | ||
Ligne 1600: | Ligne 1635: | ||
< | < | ||
- | [root@centos8 ~]# systemctl get-default | + | [root@redhat9 tmp]# systemctl get-default |
- | multi-user.target | + | graphical.target |
</ | </ | ||
Ligne 1607: | Ligne 1642: | ||
< | < | ||
- | [root@centos8 ~]# ls -l / | + | [root@redhat9 tmp]# ls -l / |
- | lrwxrwxrwx. 1 root root 37 May 8 2020 / | + | lrwxrwxrwx. 1 root root 40 Oct 19 2023 / |
</ | </ | ||
Ligne 1616: | Ligne 1651: | ||
< | < | ||
- | [root@centos8 ~]# systemctl | + | [root@redhat9 tmp]# systemctl |
- | Removed / | + | graphical.target |
- | Created symlink / | + | |
- | [root@centos8 ~]# ls -l / | + | |
- | lrwxrwxrwx. 1 root root 40 Jun 6 08:11 / | + | |
- | [root@centos8 ~]# systemctl set-default multi-user.target | + | |
- | Removed / | + | |
- | Created symlink / | + | |
- | [root@centos8 ~]# ls -l / | + | |
- | lrwxrwxrwx. 1 root root 41 Jun 6 08:11 / | + | |
- | </ | + | |
- | ==Modifier la Cible en Cours== | + | [root@redhat9 tmp]# ls -l / |
+ | lrwxrwxrwx. 1 root root 40 Oct 19 2023 / | ||
- | Il est possible de modifier la cible actuellement en cours en utilisant la commande **systemctl | + | [root@redhat9 tmp]# systemctl |
+ | Removed "/ | ||
+ | Created symlink / | ||
- | < | + | [root@redhat9 tmp]# systemctl |
- | [root@centos8 ~]# systemctl | + | multi-user.target |
- | [root@centos8 ~]# systemctl list-units --type target | egrep " | + | |
- | rescue.target | + | |
- | [root@centos8 ~]# runlevel | + | |
- | 3 1 | + | |
- | [root@centos8 ~]# who -r | + | |
- | | + | |
- | </ | + | |
- | < | + | [root@redhat9 tmp]# ls -l / |
- | [root@centos8 ~]# systemctl isolate multi-user | + | lrwxrwxrwx. 1 root root 41 Oct 24 11:47 / |
- | [root@centos8 ~]# systemctl list-units --type | + | |
- | multi-user.target | + | |
- | [root@centos8 ~]# runlevel | + | |
- | 1 3 | + | |
- | [root@centos8 ~]# who -r | + | |
- | | + | |
- | </ | + | |
- | ====LAB | + | [root@redhat9 tmp]# systemctl set-default graphical.target |
+ | Removed "/ | ||
+ | Created symlink / | ||
- | ===5.1 | + | [root@redhat9 tmp]# systemctl get-default |
+ | graphical.target | ||
- | Commencez par installer le paquet **httpd** : | + | [root@redhat9 tmp]# ls -l / |
- | + | lrwxrwxrwx. 1 root root 40 Oct 24 11:47 / | |
- | < | + | |
- | [root@centos8 ~]# dnf install httpd | + | |
</ | </ | ||
- | Pour obtenir le détail sur un service donné, il convient d' | + | ==Modifier |
- | < | + | Il est possible de modifier la cible actuellement en cours en utilisant |
- | [root@centos8 ~]# systemctl status httpd.service | + | |
- | ● httpd.service - The Apache HTTP Server | + | |
- | | + | |
- | | + | |
- | Docs: man: | + | |
- | </ | + | |
- | + | ||
- | Dans le cas du service httpd ci-dessus, on peut constater que le statut est **disabled**. Le statut peut être une de 2 valeurs : | + | |
- | + | ||
- | * **disabled** - le service ne démarrera pas lors du prochain démarrage du système. | + | |
- | * **enabled** - le service démarrera lors du prochain démarrage du système. | + | |
- | + | ||
- | Il est possible de vérifier le statut | + | |
< | < | ||
- | [root@centos8 ~]# systemctl | + | [root@redhat9 tmp]# systemctl |
- | disabled | + | |
- | </ | + | |
- | Pour rendre le statut **enabled**, | + | [root@redhat9 tmp]# systemctl |
+ | rescue.target | ||
- | < | + | [root@redhat9 tmp]# runlevel |
- | [root@centos8 ~]# systemctl enable httpd.service | + | 5 1 |
- | Created symlink / | + | |
- | [root@centos8 ~]# systemctl is-enabled httpd.service | + | [root@redhat9 tmp]# who -r |
- | enabled | + | run-level 1 2024-10-24 11:48 |
- | + | ||
- | [root@centos8 ~]# systemctl status httpd.service | + | |
- | ● httpd.service | + | |
- | | + | |
- | | + | |
- | Docs: man:httpd.service(8) | + | |
</ | </ | ||
- | |||
- | Dans le cas du service httpd ci-dessus, on peut maintenant constater que l' | ||
- | |||
- | * **inactive (dead)** - le service est arrêté. | ||
- | * **active(running** - le service est démarré avec un ou plusieurs processus. | ||
- | * **active(exited)** - le service a terminé une configuration unique. | ||
- | * **active(waiting)** - le service est démarré mais en attente d'un évènement. | ||
- | * **activating** - le service est en cours d' | ||
- | * **deactivating** - le service est en cours de désactivation. | ||
- | * **failed** - le service a rencontré une erreur fatale. | ||
- | |||
- | Il est possible de vérifier l' | ||
< | < | ||
- | [root@centos8 ~]# systemctl | + | [root@redhat9 tmp]# systemctl |
- | inactive | + | |
- | </ | + | |
- | + | ||
- | Pour rendre l' | + | |
- | + | ||
- | < | + | |
- | [root@centos8 ~]# systemctl start httpd.service | + | |
- | </ | + | |
- | + | ||
- | Vérifiez ensuite l' | + | |
- | + | ||
- | < | + | |
- | [root@centos8 ~]# systemctl is-active httpd.service | + | |
- | active | + | |
- | + | ||
- | [root@centos8 ~]# systemctl status httpd.service | + | |
- | ● httpd.service - The Apache HTTP Server | + | |
- | | + | |
- | | + | |
- | Docs: man: | + | |
- | Main PID: 34382 (httpd) | + | |
- | | + | |
- | Tasks: 213 (limit: 23719) | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | + | ||
- | Jun 06 15:33:05 centos8.ittraining.loc systemd[1]: Starting The Apache HTTP Server... | + | |
- | Jun 06 15:33:06 centos8.ittraining.loc systemd[1]: Started The Apache HTTP Server. | + | |
- | Jun 06 15:33:06 centos8.ittraining.loc httpd[34382]: | + | |
- | </ | + | |
- | + | ||
- | Pour arrêter une Unité de service, utilisez la commande suivante : | + | |
- | + | ||
- | < | + | |
- | [root@centos8 ~]# systemctl stop httpd.service | + | |
- | [root@centos8 ~]# systemctl status httpd.service | + | |
- | ● httpd.service - The Apache HTTP Server | + | |
- | | + | |
- | | + | |
- | Docs: man: | + | |
- | Process: 34382 ExecStart=/ | + | |
- | Main PID: 34382 (code=exited, | + | |
- | | + | |
- | + | ||
- | Jun 06 15:33:05 centos8.ittraining.loc systemd[1]: Starting The Apache HTTP Server... | + | |
- | Jun 06 15:33:06 centos8.ittraining.loc systemd[1]: Started The Apache HTTP Server. | + | |
- | Jun 06 15:33:06 centos8.ittraining.loc httpd[34382]: | + | |
- | Jun 06 23:58:02 centos8.ittraining.loc systemd[1]: Stopping The Apache HTTP Server... | + | |
- | Jun 06 23:58:04 centos8.ittraining.loc systemd[1]: httpd.service: | + | |
- | Jun 06 23:58:04 centos8.ittraining.loc systemd[1]: Stopped The Apache HTTP Server. | + | |
- | </ | + | |
- | + | ||
- | Pour désactiver un service au prochain démarrage du système, utilisez l' | + | |
- | + | ||
- | < | + | |
- | [root@centos8 ~]# systemctl disable httpd.service | + | |
- | Removed / | + | |
- | [root@centos8 ~]# systemctl status httpd.service | + | |
- | ● httpd.service - The Apache HTTP Server | + | |
- | | + | |
- | | + | |
- | Docs: man: | + | |
- | + | ||
- | Jun 06 15:33:05 centos8.ittraining.loc systemd[1]: Starting The Apache HTTP Server... | + | |
- | Jun 06 15:33:06 centos8.ittraining.loc systemd[1]: Started The Apache HTTP Server. | + | |
- | Jun 06 15:33:06 centos8.ittraining.loc httpd[34382]: | + | |
- | Jun 06 23:58:02 centos8.ittraining.loc systemd[1]: Stopping The Apache HTTP Server... | + | |
- | Jun 06 23:58:04 centos8.ittraining.loc systemd[1]: httpd.service: | + | |
- | Jun 06 23:58:04 centos8.ittraining.loc systemd[1]: Stopped The Apache HTTP Server. | + | |
- | </ | + | |
- | + | ||
- | ===5.2 - Gestion d' | + | |
- | + | ||
- | Systemd permet l' | + | |
- | + | ||
- | < | + | |
- | [root@centos8 ~]# cat / | + | |
- | # This is a template for httpd instances. | + | |
- | # See httpd@.service(8) for more information. | + | |
- | + | ||
- | [Unit] | + | |
- | Description=The Apache HTTP Server | + | |
- | After=network.target remote-fs.target nss-lookup.target | + | |
- | Documentation=man: | + | |
- | + | ||
- | [Service] | + | |
- | Type=notify | + | |
- | Environment=LANG=C | + | |
- | Environment=HTTPD_INSTANCE=%i | + | |
- | ExecStartPre=/ | + | |
- | ExecStartPre=/ | + | |
- | ExecStart=/ | + | |
- | ExecReload=/ | + | |
- | # Send SIGWINCH for graceful stop | + | |
- | KillSignal=SIGWINCH | + | |
- | KillMode=mixed | + | |
- | PrivateTmp=true | + | |
- | + | ||
- | [Install] | + | |
- | WantedBy=multi-user.target | + | |
- | </ | + | |
- | + | ||
- | Une instance créée à partir de ce gabarit devrait avoir un nom sous la forme suivante : | + | |
- | + | ||
- | < | + | |
- | httpd@< | + | |
- | </ | + | |
- | + | ||
- | Dans ce fichier on peut constater l' | + | |
- | + | ||
- | * %n : est remplacé par le nom complet échappé de l' | + | |
- | * %N : est remplacé par le nom complet non-échappé de l' | + | |
- | * %p : est remplacé par le préfixe échappé de l' | + | |
- | * %P : est remplacé par le préfixe non-échappé de l' | + | |
- | * %i : est remplacé par le nom de l' | + | |
- | * %I : est remplacé par le nom de l' | + | |
- | * %f : est remplacé par le préfixe non-échappé ou le nom de l' | + | |
- | * %c : est remplacé par le CGroup de l' | + | |
- | * %u : est remplacé par le nom de l' | + | |
- | * %U : est remplacé par l'UID de l' | + | |
- | * %H : est remplacé par le nom d' | + | |
- | * %% : est remplacé" | + | |
- | + | ||
- | Créez maintenant deux copies du fichier **/ | + | |
- | + | ||
- | < | + | |
- | [root@centos8 ~]# cp / | + | |
- | [root@centos8 ~]# cp / | + | |
- | </ | + | |
- | + | ||
- | Créez deux copies du fichier **/ | + | |
- | + | ||
- | < | + | |
- | [root@centos8 ~]# cp / | + | |
- | [root@centos8 ~]# cp / | + | |
- | </ | + | |
- | + | ||
- | Editez la directive **Listen** du fichier **/ | + | |
- | + | ||
- | < | + | |
- | [root@centos8 ~]# vi / | + | |
- | [root@centos8 ~]# more / | + | |
- | # | + | |
- | # This is the main Apache HTTP server configuration file. It contains the | + | |
- | # configuration directives that give the server its instructions. | + | |
- | # See < | + | |
- | # In particular, see | + | |
- | # < | + | |
- | # for a discussion of each configuration directive. | + | |
- | # | + | |
- | # See the httpd.conf(5) man page for more information on this configuration, | + | |
- | # and httpd.service(8) on using and configuring the httpd service. | + | |
- | # | + | |
- | # Do NOT simply read the instructions in here without understanding | + | |
- | # what they do. They' | + | |
- | # consult the online docs. You have been warned. | + | |
- | # | + | |
- | # Configuration and logfile names: If the filenames you specify for many | + | |
- | # of the server' | + | |
- | # server will use that explicit path. If the filenames do *not* begin | + | |
- | # with "/", | + | |
- | # with ServerRoot set to '/ | + | |
- | # server as '/ | + | |
- | # interpreted as '/ | + | |
- | + | ||
- | # | + | |
- | # ServerRoot: The top of the directory tree under which the server' | + | |
- | # configuration, | + | |
- | # | + | |
- | # Do not add a slash at the end of the directory path. If you point | + | |
- | # ServerRoot at a non-local disk, be sure to specify a local disk on the | + | |
- | # Mutex directive, if file-based mutexes are used. If you wish to share the | + | |
- | # same ServerRoot for multiple httpd daemons, you will need to change at | + | |
- | # least PidFile. | + | |
- | # | + | |
- | ServerRoot "/ | + | |
- | + | ||
- | # | + | |
- | # Listen: Allows you to bind Apache to specific IP addresses and/or | + | |
- | # ports, instead of the default. See also the < | + | |
- | # directive. | + | |
- | # | + | |
- | # Change this to Listen on specific IP addresses as shown below to | + | |
- | # prevent Apache from glomming onto all bound IP addresses. | + | |
- | # | + | |
- | #Listen 12.34.56.78: | + | |
- | Listen 8008 | + | |
- | PidFile / | + | |
- | + | ||
- | # | + | |
- | # Dynamic Shared Object (DSO) Support | + | |
- | # | + | |
- | # To be able to use the functionality of a module which was built as a DSO you | + | |
- | # have to place corresponding `LoadModule' | + | |
- | # directives contained in it are actually available _before_ they are used. | + | |
- | # Statically compiled modules (those listed by `httpd -l') do not need | + | |
- | # to be loaded here. | + | |
- | # | + | |
- | # Example: | + | |
- | # LoadModule foo_module modules/ | + | |
- | --More--(19%) | + | |
- | </ | + | |
- | + | ||
- | Editez la directive **Listen** du fichier **/ | + | |
- | + | ||
- | < | + | |
- | [root@centos8 ~]# vi / | + | |
- | [root@centos8 ~]# more / | + | |
- | # | + | |
- | # This is the main Apache HTTP server configuration file. It contains the | + | |
- | # configuration directives that give the server its instructions. | + | |
- | # See < | + | |
- | # In particular, see | + | |
- | # < | + | |
- | # for a discussion of each configuration directive. | + | |
- | # | + | |
- | # See the httpd.conf(5) man page for more information on this configuration, | + | |
- | # and httpd.service(8) on using and configuring the httpd service. | + | |
- | # | + | |
- | # Do NOT simply read the instructions in here without understanding | + | |
- | # what they do. They' | + | |
- | # consult the online docs. You have been warned. | + | |
- | # | + | |
- | # Configuration and logfile names: If the filenames you specify for many | + | |
- | # of the server' | + | |
- | # server will use that explicit path. If the filenames do *not* begin | + | |
- | # with "/", | + | |
- | # with ServerRoot set to '/ | + | |
- | # server as '/ | + | |
- | # interpreted as '/ | + | |
- | + | ||
- | # | + | |
- | # ServerRoot: The top of the directory tree under which the server' | + | |
- | # configuration, | + | |
- | # | + | |
- | # Do not add a slash at the end of the directory path. If you point | + | |
- | # ServerRoot at a non-local disk, be sure to specify a local disk on the | + | |
- | # Mutex directive, if file-based mutexes are used. If you wish to share the | + | |
- | # same ServerRoot for multiple httpd daemons, you will need to change at | + | |
- | # least PidFile. | + | |
- | # | + | |
- | ServerRoot "/ | + | |
- | + | ||
- | # | + | |
- | # Listen: Allows you to bind Apache to specific IP addresses and/or | + | |
- | # ports, instead of the default. See also the < | + | |
- | # directive. | + | |
- | # | + | |
- | # Change this to Listen on specific IP addresses as shown below to | + | |
- | # prevent Apache from glomming onto all bound IP addresses. | + | |
- | # | + | |
- | #Listen 12.34.56.78: | + | |
- | Listen 8009 | + | |
- | PidFile / | + | |
- | # | + | |
- | # Dynamic Shared Object (DSO) Support | + | |
- | # | + | |
- | # To be able to use the functionality of a module which was built as a DSO you | + | |
- | # have to place corresponding `LoadModule' | + | |
- | # directives contained in it are actually available _before_ they are used. | + | |
- | # Statically compiled modules (those listed by `httpd -l') do not need | + | |
- | # to be loaded here. | + | |
- | # | + | |
- | # Example: | + | |
- | # LoadModule foo_module modules/ | + | |
- | --More--(19%) | + | |
- | </ | + | |
- | + | ||
- | Démarrez les deux services : | + | |
- | + | ||
- | < | + | |
- | [root@centos8 ~]# systemctl start httpd@instance01.service | + | |
- | [root@centos8 ~]# systemctl status httpd@instance01.service | + | |
- | ● httpd@instance01.service - The Apache HTTP Server | + | |
- | | + | |
- | | + | |
- | Docs: man: | + | |
- | Process: 43854 ExecStartPre=/ | + | |
- | Process: 43852 ExecStartPre=/ | + | |
- | Main PID: 43856 (httpd) | + | |
- | | + | |
- | Tasks: 213 (limit: 23719) | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | + | ||
- | Jun 07 01:40:43 centos8.ittraining.loc systemd[1]: Starting The Apache HTTP Server... | + | |
- | Jun 07 01:40:43 centos8.ittraining.loc systemd[1]: Started The Apache HTTP Server. | + | |
- | Jun 07 01:40:43 centos8.ittraining.loc httpd[43856]: | + | |
- | [root@centos8 ~]# systemctl start httpd@instance02.service | + | |
- | [root@centos8 ~]# systemctl status httpd@instance02.service | + | |
- | ● httpd@instance02.service - The Apache HTTP Server | + | |
- | | + | |
- | | + | |
- | Docs: man: | + | |
- | Process: 43568 ExecStartPre=/ | + | |
- | Process: 43566 ExecStartPre=/ | + | |
- | Main PID: 43569 (httpd) | + | |
- | | + | |
- | Tasks: 213 (limit: 23719) | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | + | ||
- | Jun 07 01:36:45 centos8.ittraining.loc systemd[1]: Starting The Apache HTTP Server... | + | |
- | Jun 07 01:36:45 centos8.ittraining.loc systemd[1]: Started The Apache HTTP Server. | + | |
- | Jun 07 01:36:45 centos8.ittraining.loc httpd[43569]: | + | |
- | </ | + | |
- | + | ||
- | ===5.3 - Interdire la Modification du Statut d'un Service=== | + | |
- | + | ||
- | Il est possible d' | + | |
- | + | ||
- | < | + | |
- | [root@centos8 ~]# systemctl status httpd.service | + | |
- | ● httpd.service - The Apache HTTP Server | + | |
- | | + | |
- | | + | |
- | Docs: man: | + | |
- | + | ||
- | Jun 07 18:27:25 centos8.ittraining.loc httpd[58535]: | + | |
- | Jun 07 18:27:29 centos8.ittraining.loc systemd[1]: Stopping The Apache HTTP Server... | + | |
- | Jun 07 18:27:30 centos8.ittraining.loc systemd[1]: httpd.service: | + | |
- | Jun 07 18:27:30 centos8.ittraining.loc systemd[1]: Stopped The Apache HTTP Server. | + | |
- | Jun 07 18:27:32 centos8.ittraining.loc systemd[1]: Starting The Apache HTTP Server... | + | |
- | Jun 07 18:27:32 centos8.ittraining.loc systemd[1]: Started The Apache HTTP Server. | + | |
- | Jun 07 18:27:32 centos8.ittraining.loc httpd[58760]: | + | |
- | Jun 07 18:27:34 centos8.ittraining.loc systemd[1]: Stopping The Apache HTTP Server... | + | |
- | Jun 07 18:27:36 centos8.ittraining.loc systemd[1]: httpd.service: | + | |
- | Jun 07 18:27:36 centos8.ittraining.loc systemd[1]: Stopped The Apache HTTP Server. | + | |
- | + | ||
- | [root@centos8 ~]# systemctl mask httpd.service | + | |
- | Created symlink / | + | |
- | + | ||
- | [root@centos8 ~]# systemctl enable httpd.service | + | |
- | Failed to enable unit: Unit file / | + | |
- | + | ||
- | [root@centos8 ~]# systemctl start httpd.service | + | |
- | Failed to start httpd.service: | + | |
- | </ | + | |
- | + | ||
- | Pour autoriser de nouveau les modifications, | + | |
- | + | ||
- | < | + | |
- | [root@centos8 ~]# systemctl unmask httpd.service | + | |
- | Removed / | + | |
- | + | ||
- | [root@centos8 ~]# systemctl enable httpd.service | + | |
- | Created symlink / | + | |
- | [root@centos8 ~]# systemctl | + | [root@redhat9 tmp]# systemctl |
+ | graphical.target | ||
- | [root@centos8 ~]# systemctl status httpd.service | + | [root@redhat9 tmp]# runlevel |
- | ● httpd.service - The Apache HTTP Server | + | 1 5 |
- | | + | |
- | | + | |
- | Docs: man: | + | |
- | Main PID: 59101 (httpd) | + | |
- | | + | |
- | Tasks: 213 (limit: 23719) | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | Jun 07 18:30:59 centos8.ittraining.loc systemd[1]: Starting The Apache HTTP Server... | + | [root@redhat9 tmp]# who -r |
- | Jun 07 18:30:59 centos8.ittraining.loc systemd[1]: Started The Apache HTTP Server. | + | run-level 5 2024-10-24 11:50 last=1 |
- | Jun 07 18:31:00 centos8.ittraining.loc httpd[59101]: | + | |
</ | </ | ||
=====Arrêt du Système===== | =====Arrêt du Système===== | ||
- | Sous RHEL / CentOS 8 les commandes **halt**, **poweroff**, | + | Sous Red Hat 9 les commandes **halt**, **poweroff**, |
< | < | ||
- | [root@centos8 ~]# ls -l / | + | [root@redhat9 tmp]# ls -l / |
- | lrwxrwxrwx. 1 root root 16 Apr 7 16:55 / | + | lrwxrwxrwx. 1 root root 16 Jul 18 13:00 / |
- | lrwxrwxrwx. 1 root root 16 Apr 7 16:55 / | + | lrwxrwxrwx. 1 root root 16 Jul 18 13:00 / |
- | lrwxrwxrwx. 1 root root 16 Apr 7 16:55 / | + | lrwxrwxrwx. 1 root root 16 Jul 18 13:00 / |
- | lrwxrwxrwx. 1 root root 16 Apr 7 16:55 / | + | lrwxrwxrwx. 1 root root 16 Jul 18 13:00 / |
</ | </ | ||
Ligne 2139: | Ligne 1747: | ||
< | < | ||
- | [root@centos8 ~]# shutdown --help | + | [root@redhat9 tmp]# shutdown --help |
shutdown [OPTIONS...] [TIME] [WALL...] | shutdown [OPTIONS...] [TIME] [WALL...] | ||
Shut down the system. | Shut down the system. | ||
+ | Options: | ||
| | ||
-H --halt | -H --halt | ||
Ligne 2152: | Ligne 1761: | ||
| | ||
-c | -c | ||
+ | | ||
+ | |||
+ | See the shutdown(8) man page for details. | ||
</ | </ | ||
Ligne 2168: | Ligne 1780: | ||
< | < | ||
- | [root@centos8 ~]# date && shutdown -t 60 -k | + | [root@redhat9 tmp]# date && shutdown -t 60 -k |
- | Mon Jun 7 18:58:26 EDT 2021 | + | Thu Oct 24 11:53:34 AM CEST 2024 |
- | Shutdown scheduled for Mon 2021-06-07 18:59:26 EDT, use ' | + | Shutdown scheduled for Thu 2024-10-24 11:54:34 CEST, use ' |
</ | </ | ||
Ligne 2182: | Ligne 1794: | ||
< | < | ||
- | [root@centos8 ~]# reboot --help | + | [root@redhat9 tmp]# reboot --help |
reboot [OPTIONS...] [ARG] | reboot [OPTIONS...] [ARG] | ||
Reboot the system. | Reboot the system. | ||
+ | Options: | ||
| | ||
| | ||
Ligne 2195: | Ligne 1808: | ||
-d --no-wtmp | -d --no-wtmp | ||
| | ||
+ | |||
+ | See the halt(8) man page for details. | ||
</ | </ | ||
Ligne 2206: | Ligne 1821: | ||
< | < | ||
- | [root@centos8 ~]# halt --help | + | [root@redhat9 tmp]# halt --help |
halt [OPTIONS...] | halt [OPTIONS...] | ||
Halt the system. | Halt the system. | ||
+ | Options: | ||
| | ||
| | ||
Ligne 2219: | Ligne 1835: | ||
-d --no-wtmp | -d --no-wtmp | ||
| | ||
+ | |||
+ | See the halt(8) man page for details. | ||
</ | </ | ||
Ligne 2230: | Ligne 1848: | ||
< | < | ||
- | [root@centos8 ~]# poweroff --help | + | [root@redhat9 tmp]# poweroff --help |
poweroff [OPTIONS...] | poweroff [OPTIONS...] | ||
Power off the system. | Power off the system. | ||
+ | Options: | ||
| | ||
| | ||
Ligne 2243: | Ligne 1862: | ||
-d --no-wtmp | -d --no-wtmp | ||
| | ||
+ | |||
+ | See the halt(8) man page for details. | ||
</ | </ | ||
----- | ----- | ||
Copyright © 2024 Hugh Norris. | Copyright © 2024 Hugh Norris. |