1. Download
- wget을 통해 바로 다운로드 받을 수 없고, Web을 통해 라이선스 체크를 해야 다운로드가 된다.
- http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
2. Install
$ cd /srv/install/jdk
$ sudo -s tar zxvf jdk-7u45-linux-x64.tar.gz
$ sudo mkdir -p /usr/local/java
$ sudo -s mv ./jdk1.7.0_45 /usr/local/java/
$ sudo -s tar zxvf jdk-7u45-linux-x64.tar.gz
$ sudo mkdir -p /usr/local/java
$ sudo -s mv ./jdk1.7.0_45 /usr/local/java/
3. PATH Configuration 1
$ sudo nano /etc/environment
PATH=...........:/usr/local/java/jdk1.7.0_45/bin
JAVA_HOME=/usr/local/java/jdk1.7.0_45
JAVA_HOME=/usr/local/java/jdk1.7.0_45
$ source /etc/environment
4. PATH Configuration 2
$ sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jdk1.7.0_45/bin/java" 1
$ sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/local/java/jdk1.7.0_45/bin/javac" 1
$ sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/local/java/jdk1.7.0_45/bin/javaws" 1
$ sudo update-alternatives --set java /usr/local/java/jdk1.7.0_45/bin/java
$ sudo update-alternatives --set javac /usr/local/java/jdk1.7.0_45/bin/javac
$ sudo update-alternatives --set javaws /usr/local/java/jdk1.7.0_45/bin/javaws
$ sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/local/java/jdk1.7.0_45/bin/javac" 1
$ sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/local/java/jdk1.7.0_45/bin/javaws" 1
$ sudo update-alternatives --set java /usr/local/java/jdk1.7.0_45/bin/java
$ sudo update-alternatives --set javac /usr/local/java/jdk1.7.0_45/bin/javac
$ sudo update-alternatives --set javaws /usr/local/java/jdk1.7.0_45/bin/javaws
- 이렇게 하고 마지막으로 잘 되었는지 확인을 위해서 아래와 같이 버전을 확인해보자.
$ java -version
반응형
'OS > Ubuntu' 카테고리의 다른 글
한글입력기 nabi 설치하기 (Ubuntu 14.04 LTS 64bit, Package) (0) | 2014.06.07 |
---|---|
Ubuntu 한글 입력기 nabi 트레이에 넣기 (20) | 2014.01.07 |
달력 위젯 - Rainlendar (Ubuntu 12.04, Debian Package) (0) | 2013.12.08 |
[PKG] whoopsie (0) | 2013.08.15 |
터미놀로지 (Terminology) (0) | 2013.05.01 |