Load To Technical Architect

[Linux] Mariadb Service 등록 본문

DB/mariadb

[Linux] Mariadb Service 등록

고지식한청춘 2020. 12. 17. 19:53
728x90

MariaDB 서비스 등록

 

1. Service 파일 생성

$ vi /etc/systemd/system/mariadb.service

 

[Unit]
Description=MariaDB 10.5.8 database server
After=network.target
After=syslog.target

[Install]
WantedBy=multi-user.target
Alias=mariadbd.service

[Service]

User=maria
Group=maria

# Execute pre and post scripts as root
PermissionsStartOnly=true

# Needed to create system tables etc.
#ExecStartPre=

# Start main service
ExecStart=/usr/local/src/mariadb-10.5.8-linux-systemd-x86_64/bin/mariadbd-safe

# Don't signal startup success before a ping works
#ExecStartPost=

# Give up if ping don't get an answer
TimeoutSec=300
PrivateTmp=false

 

 

2. systemctl daemon 재시작

$ systemctl daemon-reload

 

 

◎ 정상적으로 Service가 등록되었는지 확인

$ systemctl status mariadb.service

728x90

'DB > mariadb' 카테고리의 다른 글

[Linux] MariaDB 10.5.8 설치  (0) 2020.12.17
Comments