스프링

 

참조

6. [동영상 강좌] - 박재성 (스프링 부트 ) - 1-5. 원격 서버에 소스 코드 배포하기

2 단계, 리눅스 Jdk 설치 - ******* (리눅스(서버) 깃 연동 배포) *******

 

# ./mvnw clean package

 

[root@localhost /]# cd centos/
[root@localhost centos]# ls
spring_boot_demo2  tomcat.8.0


[root@localhost centos]# cd spring_boot_demo2/
[root@localhost spring_boot_demo2]# ls
README.md  WebContent  mvnw  mvnw.cmd  pom.xml  src  target
[root@localhost spring_boot_demo2]# ls -al


합계 28                                                                                                                                
drwxrwxrwx. 7 root root  151 Jul 21 00:39 .
drwxr-xr-x. 4 root root   49 Jul 21 00:08 ..
drwxrwxrwx. 8 root root  163 Jul 21 00:08 .git
-rwxrwxrwx. 1 root root  249 Jul 21 00:08 .gitignore
drwxrwxrwx. 3 root root   21 Jul 21 00:08 .mvn
-rwxrwxrwx. 1 root root   19 Jul 21 00:08 README.md
drwxrwxrwx. 3 root root   22 Jul 21 00:08 WebContent
-rwxrwxrwx. 1 root root 6468 Jul 21 00:08 mvnw
-rwxrwxrwx. 1 root root 4994 Jul 21 00:08 mvnw.cmd
-rwxrwxrwx. 1 root root 2073 Jul 21 00:08 pom.xml
drwxrwxrwx. 4 root root   30 Jul 21 00:08 src
drwxr-xr-x. 9 root root  219 Jul 21 00:40 target


[root@localhost spring_boot_demo2]# git pull

 

 

깃에 있는 소스 받기

 

[root@localhost spring_boot_demo2]# git pull

 

메이븐 빌드

[root@localhost spring_boot_demo2]# ./mvnw clean package

 

 

변경후 다시 시작하면

기존에 있는 웹 서버와 충돌로 실행이 안된다. 

 

따라서, 멈춘다음 실행한다.

 

 

자바로 실행 중이 프로세스 조회
# ps -ef | grep java

[root@localhost spring_boot_demo2]# ps -ef | grep java
root       6305   5962  0 00:45 pts/0    00:01:40 java -jar my-slipp-1.0.jar
root      15024   5962  0 09:21 pts/0    00:00:00 grep --color=auto java
[root@localhost spring_boot_demo2]#

 

프로세스 죽이기

[root@localhost spring_boot_demo2]# kill -9 6305

 

[root@localhost spring_boot_demo2]# ps -ef | grep java
root      15062   5962  0 09:24 pts/0    00:00:00 grep --color=auto java

 

서버 계속 실행 시키는 방법

[root@localhost target]# java -jar my-slipp-1.0.jar &

 

 

[root@localhost target]# firewall-cmd --permanent --add-port=1111/tcp
success
[root@localhost target]# filewall-cmd --reload
bash: filewall-cmd: 명령을 찾을 수 없습니다...                                                                                       
[root@localhost target]# firewall-cmd --reload
success

 

 

 

 

 

about author

PHRASE

Level 60  머나먼나라

Money begets money. (돈이 돈을 번다.)

댓글 ( 6)

댓글 남기기

작성