레이블이 JDK인 게시물을 표시합니다. 모든 게시물 표시
레이블이 JDK인 게시물을 표시합니다. 모든 게시물 표시

openjdk for latest jenkins

# jenkins 2.422 버전을 다운로드
wget https://updates.jenkins.io/download/war/2.422/jenkins.war

# jenkins 2.422 버전을 실행해 보면 다음과 같이 java 11 버전 이상이어야 한다
# Jenkins 2.357 버전 부터는 java11(openJDK11) 이상이 필요하다.
java -jar ./jenkins.war --httpPort=8888

Runninet_cluster_level with Java 8 from /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.144-0.b01.el7_4.x86_64/jre, which is older than the minimum required version (Java 11).
Supported Java versions are: [11, 17, 21]

# 설치할 수 있는 openjdk 를 확인해보자
yum list java*openjdk-devel

# 다행히 11 버전이 보인다. 설치~
sudo yum install java-11-openjdk-devel.x86_64

# 설치 경로 확인
rpm -ql java-11-openjdk-devel.x86_64

# openjdk11 로 jenkins 실행해보자
/usr/lib/jvm/java-11-openjdk-11.0.20.0.8-1.el7_9.x86_64/bin/java -jar ./jenkins.war.bill --httpPort=8888

# jenkins 다음과 같은 에러가 발생한다.
/usr/lib/jvm/java-11-openjdk-11.0.20.0.8-1.el7_9.x86_64/lib/libfontmanager.so: undefined symbol: hb_buffer_set_cluster_level

# openjdk21버전으로 다운로드해서 사용해보자.
wget https://download.java.net/java/GA/jdk21/fd2272bbf8e04c3dbaee13770090416c/35/GPL/openjdk-21_linux-x64_bin.tar.gz
tar zxvf openjdk-21_linux-x64_bin.tar.gz

# 21버전으로 실행하면 에러가 없이 된다~
jdk-21/bin/java -jar ./jenkins.war --httpPort=8888

brew warning

# brew 설치/삭제 시 다음과 같이 openjdk 에러 발생한다.
Warning: Calling the `appcast` stanza is deprecated! Use the `livecheck` stanza instead.
Please report this issue to the adoptopenjdk/openjdk tap (not Homebrew/brew or Homebrew/homebrew-core),
or even better, submit a PR to fix it:
  /usr/local/Homebrew/Library/Taps/adoptopenjdk/homebrew-openjdk/Casks/adoptopenjdk11.rb:9

# openjdk 저장소를 강제로 untap 후 openjdk 를 삭제해야 한다. 
brew untap --force adoptopenjdk/openjdk
brew uninstall adoptopenjdk11 adoptopenjdk12

# brew doctor 로 발견된 warning 해결하기
brew doctor

#####

Warning: A newer Command Line Tools release is available.
Update them from Software Update in System Preferences.

If that doesn't show you any updates, run:
  sudo rm -rf /Library/Developer/CommandLineTools
  sudo xcode-select --install

Alternatively, manually download them from:
  https://developer.apple.com/download/all/.
You should download the Command Line Tools for Xcode 14.2.

# 해결방법
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install

#####

Warning: Some installed kegs have no formulae!
This means they were either deleted or installed manually.
You should find replacements for the following formulae:
  python@2
  ccze
  erlang@19
  spdylay
  boost-python

# 해결방법
brew uninstall --ignore-dependencies python@2 ccze erlang@19 spdylay boost-python

#####

Warning: You have the following deprecated, cask taps tapped:
  caskroom/versions
Untap them with `brew untap`.

# 해결방법
brew untap caskroom/versions

#####

Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  cronolog
  delta
  dosbox
  gcal
  glide
  ilmbase
  lua@5.1
  octant
  sdl_net
  sdl_sound
  sshfs
  xml2

# 해결방법
brew uninstall --ignore-dependencies cronolog delta dosbox gcal glide ilmbase lua@5.1 octant sdl_net sdl_sound sshfs xml2

#####

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
  /usr/local/lib/libDSToolkitV30-v3.4.2.20.dylib
  /usr/local/lib/libevent-1.4.2.1.3.dylib
  /usr/local/lib/libevent_core-1.4.2.1.3.dylib
  /usr/local/lib/libevent_extra-1.4.2.1.3.dylib
  /usr/local/lib/libldap.dylib

# 해결방법
rm -rf  /usr/local/lib/libDSToolkitV30-v3.4.2.20.dylib
rm -rf  /usr/local/lib/libevent-1.4.2.1.3.dylib
rm -rf  /usr/local/lib/libevent_core-1.4.2.1.3.dylib
rm -rf  /usr/local/lib/libevent_extra-1.4.2.1.3.dylib
rm -rf  /usr/local/lib/libldap.dylib

#####

Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected header files:
  /usr/local/include/evdns.h
  /usr/local/include/event-config.h
  /usr/local/include/event.h
  /usr/local/include/evhttp.h
  /usr/local/include/evrpc.h
  /usr/local/include/evutil.h
  /usr/local/include/memcached/protocol_binary.h
  /usr/local/include/python3.7m/greenlet/greenlet.h

# 해결방법
rm -rf /usr/local/include/evdns.h
rm -rf /usr/local/include/event-config.h
rm -rf /usr/local/include/event.h
rm -rf /usr/local/include/evhttp.h
rm -rf /usr/local/include/evrpc.h
rm -rf /usr/local/include/evutil.h
rm -rf /usr/local/include/memcached/protocol_binary.h
rm -rf /usr/local/include/python3.7m/greenlet/greenlet.h

#####

Warning: Unbrewed '.la' files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected '.la' files:
  /usr/local/lib/libevent.la
  /usr/local/lib/libevent_core.la
  /usr/local/lib/libevent_extra.la

# 해결방법
rm -rf  /usr/local/lib/libevent.la
rm -rf  /usr/local/lib/libevent_core.la
rm -rf  /usr/local/lib/libevent_extra.la

#####

Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected static libraries:
  /usr/local/lib/libevent.a
  /usr/local/lib/libevent_core.a
  /usr/local/lib/libevent_extra.a

# 해결방법
rm -rf  /usr/local/lib/libevent.la
rm -rf  /usr/local/lib/libevent_core.la
rm -rf  /usr/local/lib/libevent_extra.la

#####

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause formulae that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  python-certifi
  midnight-commander
  docker-credential-helper-ecr
  docker
  thefuck
  pygments
  docutils
  redis
  python-tabulate
  numpy
  macvim
  tcl-tk
  pyyaml
  python-typing-extensions
  libevent
  six
  black
  wireshark

# 해결방법
brew link --overwrite python-certifi midnight-commander docker-credential-helper-ecr docker thefuck pygments docutils redis python-tabulate numpy macvim tcl-tk pyyaml python-typing-extensions libevent six black wireshark

mac JDK 설치

# JDK 의 오픈소스는 크게 openjdk 와 adoptopenjdk 가 있다.
# openjdk (TCK(Technology Compatibility Kit) 인증됨)설치
https://formulae.brew.sh/formula/openjdk
# 가장 최신 버전이 설치된다.
brew install openjdk

# 현재 openjdk 는 최신버전(13)외 11만 설치할 수 있다.
brew install openjdk@11

# 다음 위치에 java, javac 등이 있다.
/usr/local/opt/openjdk/bin

# 참고로 /usr/local/opt/openjdk 는 실제 아래로 경로에 소프트 링킹되어 있다.
/usr/local/Cellar/openjdk
/usr/local/Cellar/openjdk@11


#####


# adoptopenjdk(openjdk 호환, TCK(Technology Compatibility Kit) 인증이 안됨) 설치
https://github.com/AdoptOpenJDK/homebrew-openjdk
# brew cast 로 openjdk 최신 버전 설치
brew cask install adoptopenjdk

# 특정 버전을 설치하는 경우
brew cask install adoptopenjdk12
brew cask install adoptopenjdk11
brew cask install adoptopenjdk/openjdk/adoptopenjdk8

# 설치 위치
# jdk 버전을 변경하고 싶을때는 export JAVA_HOME= 으로 아래 경로를 설정하면 된다.
/Library/Java/JavaVirtualMachines/adoptopenjdk-12.jdk/Contents/Home/
/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/
/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/

Linux Ubuntu JDK 설치하기

[방법1]
# apt-get repository 에 JDK 위치를 ppa 로 추가
# PPA(Personal Package Archive)
sudo add-apt-repository ppa:webupd8team/java

# 만약 sudo: add-apt-repository: command not found 발생시 다음 패키지를 설치
# Ubuntu 12.10 이전
sudo apt-get install python-software-properties

# Ubuntu 12.10 이후
sudo apt-get install software-properties-common

# apt-get 갱신
sudo apt-get update

# 설치
sudo apt-get install oracle-java7-installer


[방법2]
# 웹에서 직접 JDK 다운로드
http://www.oracle.com/technetwork/java/javase/downloads/index.html

# 파일 이동
mv /tmp/jdk-7u21-linux-x64.tar.gz

# 압출 풀기
tar zxvf jdk-7u21-linux-x64.tar.gz

# 설치
sudo update-alternatives --install /usr/bin/java java /home/ysoftman/jdk1.7.0_21/bin/java 1

sudo update-alternatives --install /usr/bin/javac javac /home/ysoftman/jdk1.7.0_21/bin/javac 1

sudo update-alternatives --install /usr/bin/javaws javaws /home/ysoftman/jdk1.7.0_21/bin/javaws 1