반응형
1. apt update
$ apt update -y
$ apt upgrade -y
2. JDK 설치 - OpenJDK 21
- OpenJDK 아카이브 - https://jdk.java.net/archive/
Archived OpenJDK GA Releases
Archived OpenJDK General-Availability Releases This page is an archive of previously released builds of the JDK licensed under the GNU General Public License, version 2, with Classpath Exception. WARNING: These older versions of the JDK are provided to he
jdk.java.net
$ wget https://download.java.net/java/GA/jdk21/fd2272bbf8e04c3dbaee13770090416c/35/GPL/openjdk-21_linux-x64_bin.tar.gz
$ tar xvf openjdk-21_linux-x64_bin.tar.gz
$ mkdir -p /usr/local/jdk-21
$ mv * /usr/local/jdk-21/
$ vim ~/.bashrc
.
.
.(제일 아래쪽)
export JAVA_HOME=/usr/local/jdk-21/
export PATH=$JAVA_HOME/bin:$PATH
$ source ~/.bashrc
$ java --version
openjdk 21 2023-09-19
OpenJDK Runtime Environment (build 21+35-2513)
OpenJDK 64-Bit Server VM (build 21+35-2513, mixed mode, sharing)
3. Spring Boot 설치
- Maven 설치
$ apt-get install maven
- Gradle 설치
https://gradle.org/releases/ 에서 최신 버전 다운 받은 후 scp로 서버로 전송
$ mkdir gradle
$ apt install unzip
$ unzip -d /data/gradle gradle-8.11.1-bin.zip
$ vim ~/.bashrc
#gradle
export PATH=$PATH:/data/gradle/gradle-8.11.1/bin
$ source ~/.bashrc
$ gradle -v
Welcome to Gradle 8.11.1!
Here are the highlights of this release:
- Parallel load and store for Configuration Cache
- Java compilation errors at the end of the build output
- Consolidated report for warnings and deprecations
For more details see https://docs.gradle.org/8.11.1/release-notes.html
------------------------------------------------------------
Gradle 8.11.1
------------------------------------------------------------
Build time: 2024-11-20 16:56:46 UTC
Revision: 481cb05a490e0ef9f8620f7873b83bd8a72e7c39
Kotlin: 2.0.20
Groovy: 3.0.22
Ant: Apache Ant(TM) version 1.10.14 compiled on August 16 2023
Launcher JVM: 21 (Oracle Corporation 21+35-2513)
Daemon JVM: /usr/local/jdk-21 (no JDK specified, using current Java home)
OS: Linux 6.8.0-1018-aws amd64
$ gradle init
- SDKMAN 설치
$ curl -s "https://get.sdkman.io" | bash
$ source "$HOME/.sdkman/bin/sdkman-init.sh"
$ sdk version
SDKMAN!
script: 5.18.2
native: 0.5.0
- SDKMAN으로 SpringBoot 설치
$ sdk install springboot 3.3.4
Downloading: springboot 3.3.4
In progress...
########################################################################################################################################################################################################## 100.0%
Installing: springboot 3.3.4
Done installing!
Setting springboot 3.3.4 as default.
$ spring --version
Spring CLI v3.3.4
반응형
'Service' 카테고리의 다른 글
[Python] Python 설치 (Ubuntu) (0) | 2025.02.06 |
---|---|
[Spring Boot] Tomcat SSL 인증서 등록 (1) | 2025.02.05 |
SpringBoot - 내장 Tocmat systemctl 등록 (1) | 2025.01.22 |
[Springboot] 내장 톰캣 보안 설정 (0) | 2025.01.20 |
SpringBoot - 내장 톰캣 설정 (1) | 2025.01.16 |