This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
управление_сервисами_в_linux [2021/07/08 12:42] val [Система загрузки Systemd] |
управление_сервисами_в_linux [2022/09/27 11:19] val [Настройка параметров запуска в Systemd] |
||
---|---|---|---|
Line 148: | Line 148: | ||
* [[https://habrahabr.ru/company/centosadmin/blog/255845/|Systemd за пять минут]] | * [[https://habrahabr.ru/company/centosadmin/blog/255845/|Systemd за пять минут]] | ||
* [[https://wiki.archlinux.org/index.php/systemd|systemd]] | * [[https://wiki.archlinux.org/index.php/systemd|systemd]] | ||
+ | |||
+ | ==== Управление юнитами Systemd ===== | ||
<code> | <code> | ||
Line 155: | Line 157: | ||
centos# find /usr/lib/systemd/system/ | centos# find /usr/lib/systemd/system/ | ||
debian# find /lib/systemd/system/ | debian# find /lib/systemd/system/ | ||
+ | |||
+ | # find /etc/default/ | ||
$ systemctl status ssh | $ systemctl status ssh | ||
Line 185: | Line 189: | ||
# systemctl start sshvpn | # systemctl start sshvpn | ||
- | </code><code> | + | </code> |
- | # systemctl edit nginx | + | |
+ | ==== Настройка параметров запуска в Systemd ===== | ||
+ | |||
+ | <code> | ||
+ | # systemctl edit имясервиса | ||
</code><code> | </code><code> | ||
[Service] | [Service] | ||
- | LimitNOFILE=65536 | + | LimitNOFILE=65536 # nginx |
- | LimitNOFILESoft=65536 | + | TimeoutStartSec=180 # elasticsearch |
</code><code> | </code><code> | ||
- | # systemctl daemon-reload | + | # systemctl daemon-reload # не очевидно, что нужно |
+ | |||
+ | # systemctl show имясервиса | ||
- | # systemctl restart nginx | + | # systemctl restart имясервиса |
- | # systemctl status nginx | + | # systemctl status имясервиса |
# cat /proc/NNNNN/limits | # cat /proc/NNNNN/limits |