29 02 2016
6버젼에서 사용했던 chkconfig로 사용하던 것들을 systemctl로 바꾸었다. /usr/lib/systemd/system/의 하부에 링크가 걸려있는 것도 있다. 목록보기 ]#systemctl ]#systemctl list-units ]#systemctl list-unit-files 서비스시작 ]#systemctl start service명.service 서비스중지 ]#systemctl stop service명.service 부팅시 자동실행 ]#systemctl enable service명.service 부팅시 자동 미실행 ]#systemctl disable sercie명.service MySql Service 등록 예제 ]#vi /etc/systemd/system/mysqld.service
|
1 2 3 4 5 6 7 8 9 10 11 12 |
[Unit] Description=Mysql Community Server After=syslog.target After=network.target [Service] Type=forking ExecStart=/app/mysql/mysql-5.6.29/support-files/mysql.server start ExecStop=/app/mysql/mysql-5.6.29/support-files/mysql.server stop [Install] WantedBy=multi-user.target |
Unit 에서 After는 해당하는 서비스가 실행후 실행되는 서비스를 말합니다. 최초 […]