반응형

오류 해결/Linux 오류 해결 3

[오류 해결] /bin/bash: line 1: exec: java: not found

1. Error 상황Spring Boot로 생성된 jar 파일을 systemctl을 사용하여 실행하고자 하는데 아래와 같은 에러 발생/bin/bash: line 1: exec: java: not foundsystemctl로 실행시에만 실행이 안되고 java -jar 명령어를 통해서는 실행이 됨2. 원인systemd의 기본 경로에 java의 경로가 지정되지 않은 것 같음.java 환경 변수 설정을 통해 일반 명령어로는 PATH 설정이 잘 된 거 확인echo $JAVA_HOME/usr/local/jdk-21/3. 해결 방안systemd 서비스 스크립트에 PATH 설정변경된 스크립트[Unit]Description=Service DescriptionAfter=syslog.target network.target ..

[오류 해결] apachectl configtest

apachectl configtest 명령어는 httpd.conf 파일의 문법을 검사하는 명령어이다. httpd.conf의 문법이 정상이 경우 Syntax OK가 뜬다. AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 10.0.0.10. Set the 'ServerName' directive globally to suppress this message 오류가 뜨면 /etc/httpd/conf/httpd.conf에서 95번째 줄 ServerName www.example.com:80 의 주석을 해제하면 해결된다.

반응형