Document systemd service changes

Prefer the systemctl edit mysql.service syntax
and leave the more complex alternatives to the
existing documents referenced.

Also show how to use the multiinstance a bit more.
This commit is contained in:
Daniel Black 2021-04-22 12:08:08 +10:00 committed by mschorm
parent 95f558b833
commit a87e9e5d9a
2 changed files with 39 additions and 40 deletions

View File

@ -1,28 +1,20 @@
# It's not recommended to modify this file in-place, because it will be # It's not recommended to modify this file in-place, because it will be
# overwritten during package upgrades. If you want to customize, the # overwritten during package upgrades. If you want to customize, the
# best way is to create a file "/etc/systemd/system/@DAEMON_NAME@.service", # best way is to:
# containing #
# .include /usr/lib/systemd/system/@DAEMON_NAME@.service # root> systemctl edit @DAEMON_NAME@.service
# ...make your changes here... #
# or create a file "/etc/systemd/system/@DAEMON_NAME@.service.d/foo.conf", # Then add additonal directives under a section (probably [Service]).
# which doesn't need to include ".include" call and which will be parsed
# after the file @DAEMON_NAME@.service itself is parsed.
# #
# For more info about custom unit files, see systemd.unit(5) or # For more info about custom unit files, see systemd.unit(5) or
# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F # http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F
#
# For example, if you want to increase mysql's open-files-limit to 10000, # For example, if you want to increase MariaDB's open-files-limit to 10000,
# you need to increase systemd's LimitNOFILE setting, so create a file named # you need to increase systemd's LimitNOFILE setting, use the contents below:
# "/etc/systemd/system/@DAEMON_NAME@.service.d/limits.conf" containing: #
# [Service] # [Service]
# LimitNOFILE=10000 # LimitNOFILE=10000
#
# Note: /usr/lib/... is recommended in the .include line though /lib/...
# still works.
# Don't forget to reload systemd daemon after you change unit configuration:
# root> systemctl --system daemon-reload
# Use [mysqld.INSTANCENAME] as sections in my.cnf to configure this instance.
[Unit] [Unit]
Description=@NICE_PROJECT_NAME@ @MAJOR_VERSION@.@MINOR_VERSION@ database server Description=@NICE_PROJECT_NAME@ @MAJOR_VERSION@.@MINOR_VERSION@ database server

View File

@ -1,36 +1,43 @@
# Multi instance version of mariadb. For if you run mutiple verions at once. # Multi instance version of MariaDB. For if you run mutiple verions at once.
# Also used for @DAEMON_NAME@@bootstrap to bootstrap Galera. # Also used for @DAEMON_NAME@@bootstrap to bootstrap Galera.
# #
# To use multi instance variant, use [mysqld.INSTANCENAME] as sections in my.cnf # To use multi instance variant, use [mariadbd.INSTANCENAME] as sections in
# @sysconfdir@/@my.cnf to change per instance settings. A minimumal necessary
# configuration items to change to avoid conflicts between instances is:
#
# [mariadbd.instancename]
# # TCP port to make available for clients
# port=3306
# # Socket to make available for clients
# socket=/tmp/mariadb-instancename.sock
# # Where MariaDB should store all its data
# datadir=/usr/local/mariadb-instancename/data
#
# and start the service via: # and start the service via:
# systemctl start @DAEMON_NAME@@{instancename}.server #
# root> systemctl start @DAEMON_NAME@@{instancename}.server
# #
# It's not recommended to modify this file in-place, because it will be # It's not recommended to modify this file in-place, because it will be
# overwritten during package upgrades. If you want to customize, the # overwritten during package upgrades. If you want to customize, for
# best way is to create a file "/etc/systemd/system/@DAEMON_NAME@.service", # all instances, the best way is:
# containing #
# .include /usr/lib/systemd/system/@DAEMON_NAME@.service # root> systemctl edit @DAEMON_NAME@@.service
# ...make your changes here... #
# or create a file "/etc/systemd/system/@DAEMON_NAME@.service.d/foo.conf", # Then add additonal directives under a section (probably [Service]).
# which doesn't need to include ".include" call and which will be parsed #
# after the file @DAEMON_NAME@.service itself is parsed. # If you only want to change a specific instance:
#
# root> systemctl edit @DAEMON_NAME@@{instancename}.server
# #
# For more info about custom unit files, see systemd.unit(5) or # For more info about custom unit files, see systemd.unit(5) or
# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F # http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F
#
# For example, if you want to increase mysql's open-files-limit to 10000, # For example, if you want to increase MariaDB's open-files-limit to 10000,
# you need to increase systemd's LimitNOFILE setting, so create a file named # you need to increase systemd's LimitNOFILE setting, use the contents below:
# "/etc/systemd/system/@DAEMON_NAME@.service.d/limits.conf" containing: #
# [Service] # [Service]
# LimitNOFILE=10000 # LimitNOFILE=10000
# Note: /usr/lib/... is recommended in the .include line though /lib/...
# still works.
# Don't forget to reload systemd daemon after you change unit configuration:
# root> systemctl --system daemon-reload
# Use [mysqld.INSTANCENAME] as sections in my.cnf to configure this instance.
[Unit] [Unit]
Description=@NICE_PROJECT_NAME@ @MAJOR_VERSION@.@MINOR_VERSION@ database server Description=@NICE_PROJECT_NAME@ @MAJOR_VERSION@.@MINOR_VERSION@ database server
Documentation=man:mariadbd(8) Documentation=man:mariadbd(8)