서버 배포를 위한 README 추가 및 ROOT.war로 변경
This commit is contained in:
71
README.md
71
README.md
@@ -380,3 +380,74 @@ PASSWORD: koresearch1@#4
|
|||||||
|
|
||||||
#### `deploy_dev_front` 브렌치로 merge! pipeline 실행 후 아래 URL 에서 확인가능.
|
#### `deploy_dev_front` 브렌치로 merge! pipeline 실행 후 아래 URL 에서 확인가능.
|
||||||
* https://ko-research-front.etribe.co.kr
|
* https://ko-research-front.etribe.co.kr
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### 운영서버 배포 스크립트
|
||||||
|
|
||||||
|
## SFTP 접근
|
||||||
|
```
|
||||||
|
sftp로 접속 가능
|
||||||
|
IP: 115.68.193.117
|
||||||
|
ID: etribe
|
||||||
|
PW: Etribe@3415
|
||||||
|
```
|
||||||
|
|
||||||
|
### 1. war 파일 생성
|
||||||
|
```
|
||||||
|
mvn clean package -P war
|
||||||
|
```
|
||||||
|
### 2. SFTP 파일 업로드
|
||||||
|
```
|
||||||
|
/home/etribe/data/upload/tmp
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. putty 접속 : root 계정으로 변경
|
||||||
|
```
|
||||||
|
sudo su-
|
||||||
|
```
|
||||||
|
### 4. war 파일 옮기기
|
||||||
|
```
|
||||||
|
sudo mv /home/etribe/data/upload/tmp/admin/ROOT.war /opt/admin-tomcat/webapps/
|
||||||
|
sudo mv /home/etribe/data/upload/tmp/front/ROOT.war /opt/front-tomcat/webapps/
|
||||||
|
```
|
||||||
|
### 5. 파일 소유자 변경
|
||||||
|
```
|
||||||
|
sudo chown -R root:root /opt/admin-tomcat
|
||||||
|
sudo chown -R root:root /opt/front-tomcat
|
||||||
|
```
|
||||||
|
### 6. 권한 확인
|
||||||
|
```
|
||||||
|
ls -l /opt/admin-tomcat/webapps/
|
||||||
|
ls -l /opt/front-tomcat/webapps/
|
||||||
|
```
|
||||||
|
### 7. 톰캣 shutdown
|
||||||
|
```
|
||||||
|
sudo /opt/admin-tomcat/bin/shutdown.sh
|
||||||
|
sudo /opt/front-tomcat/bin/shutdown.sh
|
||||||
|
or
|
||||||
|
sudo netstat -tulnp | grep 3415
|
||||||
|
sudo netstat -tulnp | grep 3416
|
||||||
|
sudo kill -9 <PID>
|
||||||
|
```
|
||||||
|
### 8. 배포 되었던 ROOT 파일 백업본으로
|
||||||
|
```
|
||||||
|
sudo mv /opt/admin-tomcat/webapps/ROOT /opt/admin-tomcat/webapps/ROOT0630.bak
|
||||||
|
sudo mv /opt/front-tomcat/webapps/ROOT /opt/front-tomcat/webapps/ROOT0630.bak
|
||||||
|
```
|
||||||
|
|
||||||
|
### 9. 기존 war 파일 삭제
|
||||||
|
```
|
||||||
|
rm -r /opt/admin-tomcat/webapps/ROOT.war
|
||||||
|
rm -r /opt/front-tomcat/webapps/ROOT.war
|
||||||
|
```
|
||||||
|
### 10. 톰캣 start
|
||||||
|
```
|
||||||
|
sudo /opt/admin-tomcat/bin/startup.sh
|
||||||
|
sudo /opt/front-tomcat/bin/startup.sh
|
||||||
|
```
|
||||||
|
## vm option
|
||||||
|
```
|
||||||
|
sudo vi /opt/admin-tomcat/bin/setenv.sh
|
||||||
|
sudo vi /opt/front-tomcat/bin/setenv.sh
|
||||||
|
```
|
||||||
@@ -1,38 +1,38 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>app.module</groupId>
|
||||||
|
<artifactId>app.module</artifactId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
<artifactId>admin</artifactId>
|
<artifactId>admin</artifactId>
|
||||||
<build>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<plugins>
|
<name>admin</name>
|
||||||
<plugin>
|
<description>Admin project</description>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<packaging>${packaging.type}</packaging>
|
||||||
<configuration>
|
|
||||||
<includeSystemScope>true</includeSystemScope>
|
|
||||||
</configuration>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<version>3.4.0</version>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<artifactId>core</artifactId>
|
|
||||||
<groupId>app.module</groupId>
|
<groupId>app.module</groupId>
|
||||||
|
<artifactId>core</artifactId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<description>Admin project</description>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<name>admin</name>
|
|
||||||
<packaging>${packaging.type}</packaging>
|
|
||||||
|
|
||||||
<parent>
|
|
||||||
<artifactId>app.module</artifactId>
|
|
||||||
<groupId>app.module</groupId>
|
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>ROOT</finalName>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<version>3.4.0</version>
|
||||||
|
<configuration>
|
||||||
|
<includeSystemScope>true</includeSystemScope>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
</project>
|
</project>
|
||||||
@@ -1,38 +1,38 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>app.module</groupId>
|
||||||
|
<artifactId>app.module</artifactId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
<artifactId>front</artifactId>
|
<artifactId>front</artifactId>
|
||||||
<build>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<plugins>
|
<name>front</name>
|
||||||
<plugin>
|
<description>Front project</description>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<packaging>${packaging.type}</packaging>
|
||||||
<configuration>
|
|
||||||
<includeSystemScope>true</includeSystemScope>
|
|
||||||
</configuration>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<version>3.4.0</version>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<artifactId>core</artifactId>
|
|
||||||
<groupId>app.module</groupId>
|
<groupId>app.module</groupId>
|
||||||
|
<artifactId>core</artifactId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<description>Front project</description>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<name>front</name>
|
|
||||||
<packaging>${packaging.type}</packaging>
|
|
||||||
|
|
||||||
<parent>
|
|
||||||
<artifactId>app.module</artifactId>
|
|
||||||
<groupId>app.module</groupId>
|
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>ROOT</finalName> <!-- WAR 파일 이름을 ROOT.war로 설정 -->
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<version>3.4.0</version>
|
||||||
|
<configuration>
|
||||||
|
<includeSystemScope>true</includeSystemScope>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
</project>
|
</project>
|
||||||
Reference in New Issue
Block a user