tomcatservice(가칭) 계정으로 리눅스 부팅시 자동으로 톰캣서비스를 실행하려한다.
사전에 tomcat 폴더가 tomcatservice 계정으로 권한부여가 되어 있어야 한다.
/etc/rc.local 파일을 열어서 아래와 같이 추가해준다
su - tomcatservice -c '/usr/local/apache-tomcat-8.5.43/bin/startup.sh'
부팅시 실행될 수 있도록 rc.local 파일에 실행권한을 준다
chmod +x rc.local
그리고 재부팅을 해보면, tomcatservice로 정상적으로 실행됨을 알 수 있다.
tomcats+ 1128 1 6 00:41 ? 00:00:05 //bin/java -Djava.util.logging.config.file=/usr/local/apache-tomcat-8.5.43/conf/logging.proper |
'Linux > RedHat, CentOS, ubuntu' 카테고리의 다른 글
Compression Comparison of gzip and 7z on CentOS 7. (CentOS 7에서 gzip과 7z 압축 비교) (0) | 2019.10.25 |
---|---|
Linux 배너파일(issue, issue.net, motd)과 ssh 배너설정 (0) | 2019.10.15 |
linux history 명령어 실행일시 표시하기 (0) | 2019.10.07 |
리눅스에서 cifs 마운트 폴더 실행금지 시키기 (0) | 2019.07.25 |
CentOS Linux cifs File System fstab 파일 마운트 등록하는 방법 (0) | 2019.07.03 |
Linux find 명령어의 inode 옵션을 이용하여 파일 삭제 (0) | 2019.06.24 |
[ CentOS 7 ] ntp install와 client 세팅 (0) | 2019.04.26 |
[ CentOS 7 ] Tomcat 8 Install (0) | 2019.04.23 |