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

2016년 5월 30일 월요일

Glassfish Installation in Debian

Before installation of the glassfish, make sure of java version. the Glassfish V3 need the JDK 1.7.0 and the Glassfish V4 need the JDK 1.8.0.

scwook@debian:~/Download# java -version
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)

If you need to install the new Java, Please refer to following post



Glassfish V3 Installation

Glassfish V3 can be downloaded from the Oracle web page. Download the Linux/Unix/Mac Installer.


Run the file as superuser.

root@debian:/Downloads# bash ogs-3.1.2.2-unix.sh

When installation menu show up, click next.


Select the Typical Installation and click next.


Change the Installation Directory to /opt/glassfish3 and click next.


Click next.


Click next to start installation.


Set the administrator password and leave the default settings. click next.


Installation is completed. Click exit.


In order to test, try poining your browser to localhost or server ip address.

http://localhost:4848 or http://[Server IP Address]:4848

Glassfish V4 Installation

Download the Java EE 7 Full Platform form the glassfish wep site.



Extract the file and run the glassfish demon.

root@debian:~# unzip glassfish-4.1.1.zip -d /opt/
root@debian:~# cd /opt/glassfish4/bin/
root@debian:/opt/glassfish4/bin# ./asadmin start-domain
Waiting for domain1 to start ...
Successfully started the domain : domain1
domain  Location: /opt/glassfish4/glassfish/domains/domain1
Log File: /opt/glassfish4/glassfish/domains/domain1/logs/server.log
Admin Port: 4848
Command start-domain executed successfully.

In order to test, try poining your browser to localhost or server ip address.

http://localhost:4848 or http://[Server IP Address]:4848

If need, the admin password can be modified by change-admin-password command.

root@debian:/opt/glassfish4/bin# ./asadmin change-admin-password

Enter admin user name [default: admin]>admin

Enter the admin password> [Just remain empty]
Enter the new admin password> [New Password] 
Enter the new admin password again> [New Password]

2016년 5월 25일 수요일

Java Installation in the Debain Jessie

Using update-alternatives command, you can add new Java version in the Jessie. First, check current Java version.

scwook@debian:~$ java -version
openjdk version "1.8.0_72-internal"
OpenJDK Runtime Environment (build 1.8.0_72-internal-b15)
OpenJDK 64-Bit Server VM (build 25.72-b15, mixed mode)

Download new Java version form the web page and uncompressing.


http://www.oracle.com/technetwork/java/javase/downloads/index.html


root@debian:~/Download# tar xvf jdk-8u91-linux-x64.tar.gz -C /opt/

Register new Java with --install option

root@debian:~/Download# update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_91/bin/java 1
root@debian:~/Download# update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_91/bin/javac 1

Change Java version with --config option

root@debian:~/Download# update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).
  Selection    Path                                            Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1069      auto mode
  1            /opt/jdk1.8.0_91/bin/java                        1         manual mode
  2            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1069      manual mode
Press enter to keep the current choice[*], or type selection number: 1

Now you have new Java.

root@debian:~/Download# java -version
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)

Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)

2016년 5월 16일 월요일

Debian에서 Glassfish 설치


Glassfish를 설치하기 전 Java 버전을 먼저 확인한다. Glassfish V3는 JDK 1.7.0, Glassfish V4는 JDK 1.8.0 이상 설치되어 있어야 한다.


scwook@debian:~/Download# java -version
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)

JAVA 설치 방법은 다음 Post를 참고한다.

http://scwook.blogspot.kr/2016/05/debian-jessie-java.html


Glassfish V3 설치

Glassfish V3은 Oracle 홈페이지에서 받을 수 있다. 다운로드 페이지에서 Linux/Unix/Mac Installer 파일을 다운 받는다.


다운받은 파일을 관리자 권한으로 실행한다.

root@debian:/Downloads# bash ogs-3.1.2.2-unix.sh

설치 화면이 나타나면 Next를 누른다.



Typical Installation을 선택한 후 Next를 누른다.



설치 위치를 /opt/glassfish3로 변경한 후 Next를 누른다.



Next를 누른다.



Install을 누르면 설치가 시작된다.



설치가 완료되면 설정 메뉴가 나타난다. 기본 설정으로 두고 Username과 Password를 입력한 후 Next를 누른다.



설치가 완료되면 Exit를 누른다.


테스트를 위해 다음 주소록 접속한다.

http://localhost:4848 또는 http://[Server IP Address]:4848

Glassfish V4 설치

Glassfish 사이트에 접속하여 Java EE 7 Full Platform 파일을 다운 받는다.




다운 받은 파일의 압축을 풀고 daemon을 실행한다.

root@debian:~# unzip glassfish-4.1.1.zip -d /opt/
root@debian:~# cd /opt/glassfish4/bin/
root@debian:/opt/glassfish4/bin# ./asadmin start-domain
Waiting for domain1 to start ...
Successfully started the domain : domain1
domain  Location: /opt/glassfish4/glassfish/domains/domain1
Log File: /opt/glassfish4/glassfish/domains/domain1/logs/server.log
Admin Port: 4848
Command start-domain executed successfully.

다음 주소로 접속한다.


필요한 경우 change-admin-password 명령으로 관리자 암호를 설정한다.

root@debian:/opt/glassfish4/bin# ./asadmin change-admin-password

Enter admin user name [default: admin]>admin

Enter the admin password> [아무것도 입력하지 않음]
Enter the new admin password> [새로 설정할 암호] 
Enter the new admin password again> [새로 설정할 암호]

자동 실행
create-service 명령을 사용하면 /etc/init.d/ 폴더에 GlassFish_domain1 실행 스크립트가 생성된다.

root@debian:/opt/glassfish4/bin# ./asadmin create-service

update-rc 명령으로 GlassFish_domain1을 등록한다.

root@debian:/etc/init.d# update-rc GlassFish_domain1 default


2016년 5월 11일 수요일

Debian Jessie에서 Java 설치

update-alternatives 명령을 사용하면 새로운 버전의 Java를 추가 및 변경할 수 있다. 우선 현재 사용하고 있는 Java 버전을 확인한다.


scwook@debian:~$ java -version
openjdk version "1.8.0_72-internal"
OpenJDK Runtime Environment (build 1.8.0_72-internal-b15)
OpenJDK 64-Bit Server VM (build 25.72-b15, mixed mode)


새로 설치할 Java 를 다운받은 후 원하는 위치에 압축을 해제한다.

http://www.oracle.com/technetwork/java/javase/downloads/index.html


root@debian:~/Download# tar xvf jdk-8u91-linux-x64.tar.gz -C /opt/

--install 옵션으로 새로운 Java를 등록한다.

root@debian:~/Download# update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_91/bin/java 1
root@debian:~/Download# update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_91/bin/javac 1

--config 옵션으로 새로 등록된 Java로 변경한다.

root@debian:~/Download# update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1069      auto mode
  1            /opt/jdk1.8.0_91/bin/java                        1         manual mode
  2            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1069      manual mode

Press enter to keep the current choice[*], or type selection number: 1

Java 버전을 확인해 보면 새로 설치된 Java로 변경된 것을 확인할 수 있다.

root@debian:~/Download# java -version
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)