Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- cocoapod
- RestAPI
- 리눅스
- DialogFragment
- podinit
- prolificinteractive/material-calendarview
- springboot
- editText
- Dialog
- addTextChangedListner
- Button
- PostgreSQL
- livedata
- viewmodel
- android
- calendar
- backgroundTint
Archives
- Today
- Total
코코딩딩
[리눅스] tomcat service 등록하기 본문
어제 하루 일정 때문에 포스팅을 못 했기 때문에 짤막하게 추가적으로 tomcat의 service 등록하는 방법을 기록하고자 한다.
tomcat을 서비스등록 하지 않으면 시스템이 문제가 생겨 다시시작 되었을 때 일일히 tomcat을 수동으로 켜주어야 하는데 이를 자동화 할 수 있다.
tomcat.service 파일 생성
cd /etc/systemd/system
vi /etc/systemd/system/tomcat.service
검색을 통해 알게된 많은 방법들은 vi 편집기를 이용해 service 파일을 생성하고 편집하지만 오타등을 방지하기 위해filezilla를 이용해 파일을 밀어 넣는 방법을 사용하고자 한다.
[Unit]
Description=tomcat 9
After=network.target syslog.target
[Service]
Type=forking
Environment="JAVA_HOME=자바 경로"
Environment="CATALINA_HOME=톰캣 경로"
User=root
Group=root
ExecStart=톰캣경로/bin/startup.sh
ExecStop=톰캣경로/bin/shutdown.sh
[Install]
WantedBy=multi-user.target
위와 같이 service 파일의 내용을 설정한 후 /etc/systemd/system 경로에 밀어넣어준다. 이후 서비스 등록하는 명령어를 실행한다.
systemctl enable tomcat.service
시스템을 확인하는 명령어를 입력한다
systemctl status tomcat.service
'일단기록 > 매일기록' 카테고리의 다른 글
[안드로이드/android] customdialog, timepicker (0) | 2022.04.26 |
---|---|
[리눅스] tomcat, apache 설치하기 (0) | 2022.04.25 |
[리눅스] postgresql-12 설치하기 (기본 경로 변경) (0) | 2022.04.22 |
[리눅스] tomcat, postgresql 설치하기 - 2 (0) | 2022.04.20 |
[리눅스] tomcat, postgresql 설치하기 - 1 ( 준비하기 ) (0) | 2022.04.19 |