OS/Linux

[Linux] centOS에서 eclipse 설치하기

뱅타 2021. 8. 17. 19:21

Centos 설치

VM tool(Virtual box 사용)

https://jjam89.tistory.com/130

Docker

https://jjam89.tistory.com/126

 

CentOS

실행


주의

gui 세팅이 되어 있지 않은 상태이면 실행되지 않습니다.

 

docker
$ docker run -it centos:7
[root@97c58d0795ce /]#

 

VM
$ ssh root@localhost
Last login: Fri Aug 13 19:12:15 2021 from gateway
[root@localhost ~]#

 

설치


 

jdk 설치
$ yum -y install java-1.8.0-openjdk
$ yum -y install java-1.8.0-openjdk-devel
  • 설치 확인
[root@600022c6bc32 /]# java -version
openjdk version "1.8.0_302"
OpenJDK Runtime Environment (build 1.8.0_302-b08)
OpenJDK 64-Bit Server VM (build 25.302-b08, mixed mode)
[root@600022c6bc32 /]#

 

wget 설치(wget이 설치되어있지 않았을 시)
$ yum install wget

 

eclipse 다운로드
$ wget http://ftp.jaist.ac.jp/pub/eclipse/technology/epp/downloads/release/2019-03/R/eclipse-java-2019-03-R-linux-gtk-x86_64.tar.gz

 

eclipse 압축 풀기
$ tar -zxvf eclipse-java-2019-03-R-linux-gtk-x86_64.tar.gz -C /opt
  • /opt 부분에 원하는 경로를 기입하시면 됩니다.

 

파일 복사하기
ln -sf /opt/eclipse/eclipse /usr/bin/eclipse
  • 다른 계정도 사용할 수 있도록 파일 옮기기

 

설정


이클립스 설정
$ vi /usr/share/applications/eclipseide.desktop
[Desktop Entry]
Encoding=UTF-8
Name=Eclipse IDE
Comment=Eclipse IDE
Exec=/usr/bin/eclipse
Icon=/opt/eclipse/icon.xpm
Categories=Application;Development;Java;IDE
Version=1.0
Type=Application
Terminal=0

 

 

실행


$ ./eclipse

 

 

Error
  • CLI 환경에서 eclipse는 실행이 되지 않을 겁니다.(제가 그렇거든요)
org.eclipse.m2e.logback.configuration: The org.eclipse.m2e.logback.configuration bundle was activated before the state location was initialized.  Will retry after the state location is initialized.
Eclipse:
An error has occurred. See the log file
/opt/eclipse/configuration/1629173394419.log.
[root@600022c6bc32 eclipse]#
  • 이럴 경우 OS 환경을 CLI에서 GUI로 변경해야 합니다.
    1. Server 자체에서 설정하기
    1. Host의 xwindow를 사용해서 띄우기.
    열심히 검색해 본 결과 vm-> guiOS -> IDE -> docker -> process 방식을 많이 사용하시는 듯 합니다. docker로 firefox를 켜 보시면 알겠지만 속도가 생각보다 빠르지 않더군요. 그래서 docker에서 os -> eclipse 방식은 조금 더 고민해 보아야 할 듯 합니다.

 

 

 

References

https://www.itzgeek.com/how-tos/linux/centos-how-tos/install-eclipse-4-4-luna-ide-on-centos-7-rhel-7.html

https://www.44bits.io/ko/post/easy-deploy-with-docker

https://open-support.tistory.com/entry/도커Docker에서-GUI프로그램-사용하기

https://moordev.tistory.com/173

https://youtu.be/3_iGSpyGswo

https://dejavuqa.tistory.com/303

728x90
반응형