| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- OTP
- 애플
- fido
- albumbook
- MFA
- MYSQL
- 앨범북
- 앱리소스
- kmip
- OSX
- otpkey
- MSYS2
- WebAuthn
- SSH
- css
- apple
- Xcode
- SSL
- Android
- 안드로이드
- 인증
- FIDO2
- SwiftUI
- git
- Nodejs
- appres
- 앱스토어
- 2FA
- openssl
- SWIFT
Archives
- Today
- Total
인디노트
rc.local 실행하기 본문
# vi /usr/lib/systemd/system/rc-local.service
위의 패스 (CentOS) 가 아니면 다음의 패스 (우분투) 일 수 있다.
# vi /etc/systemd/system/rc-local.service
# CentOS 의 경우
[Unit]
Description=/etc/rc.d/rc.local Compatibility
ConditionFileIsExecutable=/etc/rc.d/rc.local
After=network.target
[Service]
Type=forking
ExecStart=/etc/rc.d/rc.local start
TimeoutSec=0
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
# Ubuntu 의 경우
[Unit]
Description=/etc/rc.local Compatibility
ConditionFileIsExecutable=/etc/rc.local
After=network.target
[Service]
Type=simple
User=root
ExecStart=/etc/rc.local
WorkingDirectory=/root
[Install]
WantedBy=multi-user.target
당연히 위에서 설정한 rc.local 파일에 실행 권한을 줘야 한다.
# chmod +x /etc/rc.d/rc.local
혹은
# chmod +x /etc/rc.local
서비스 설정을 데몬에 즉시 반영하려면 다음과 같은 명령을 실행시킨다.
# systemctl daemon-reload
# systemctl stop rc-local
# systemctl start rc-local
# systemctl enable rc-local
설정이 제대로 되었는지 확인
# systemctl list-unit-files | grep rc.local
'개발 플랫폼 및 언어' 카테고리의 다른 글
| firewall-cmd (방화벽) 포트 열기 (0) | 2021.08.23 |
|---|---|
| resolv.conf 파일이 자꾸 초기화 될때 (0) | 2021.08.23 |
| CentOS SoftEther VPN Client Install (0) | 2021.08.23 |
| my eclipse colors and keymaps (0) | 2021.08.06 |
| Microsoft Q# 관련 프로젝트 생성 (0) | 2021.07.27 |
Comments