[위듀] EC2 + Spring boot
로컬에서 빌드 후 scp로 옮기는 방식
Jan 12, 2024
Contents
Mac .ssh/config
- HOST : ${프로젝트명}
- User : ubuntu (ec2 생성 시 ubuntu 라서)
- HostName : 도메인주소
- IdentityFile : .pem 경로
ssh widyu
SCP 명령어
scp /Users/seunkun/IdeaProjects/widyu_healthcare/target/healthcare-0.0.1-SNAPSHOT.jar widyu:home/ubuntu
백그라운드 서버 실행
nohup java -jar healthcare-0.0.1-SNAPSHOT.jar &
ps -ef | grep 'healthcare
백그라운드 서버 죽이기
sudo kill -9 종료시킬 PID 번호
Reference
Share article