Back to Basics – Payara ServerをUbuntuにインストールする

Uncategorized

このブログは Back to Basics シリーズの第1回です。Payara ServerをUbuntuにインストールする方法の概要をステップバイステップでご紹介します。

Payara Server 4.1のインストール

 

  1. JDKが正しくインストールされていることを確認する

 

Java EE 7は、JDK 7のいくつかの新機能を使用するため、事前にJDK 7以降がインストールされている必要があります。現時点で最も推奨されるバージョンはJDK 8の最新版です。どのバージョンを使用しているのかを確認するには、シェル/コマンド・ウィンドウで以下のように入力します。

javac -version

またはjava -version

もしjavaコマンドが見当たらない場合には、以下からJDKをダウンロードしてインストールする必要があります。

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

 

  1. 環境変数JAVA_HOMEJDKの位置を設定する

 

インストールされているJDK (1つまたは複数のバージョン) の位置を特定する簡単な方法は、シェルで以下のコマンドを入力することです。

 

sudo update-alternatives –config java

 

Command Line

 

JAVA_HOME環境変数を以下のように設定します。

export JAVA_HOME={jdk-installation-directory}

(上記の例では /usr/lib/jvm/java-8-oracle)

 

セッションにまたがって環境変数を保持するには、現在のユーザーの .bashrc ファイルにexportを追加します。

 

これはユーザーのホームディレクトリにある隠しファイルです。 /home/$user/.bashrc.

 

  1. Payara Serverをダウンロードする

 
Payara Serverは http://www.payara.fish/downloads からダウンロードできます。

任意の場所にダウンロードしてunzipで展開してください。

 

Payara Server 4.1の実行

Payara Serverを実行するには、install_directory/payara41/bin ディレクトリに移動し、以下のコマンドを入力します。

./asadmin start-domain

 

 

Command Line


 

これでdomain1が起動します。これはPayara Serverに含まれるデフォルトのドメインです。もしPayaraのpayaradomainのような新しいドメインを作成した場合には、それを明示する必要があります。GlassFishとの互換性を維持するため、ドメイン名が省略された場合にはdomain1が指定されたものとみなします。

 

サーバーが起動したら、http://localhost:4848を開いて管理コンソールにアクセスします。管理コンソールは以下のような画面になっています。

 

Payara Server Console - Common Tasks - Mozilla Firefox_243.png

 

{{cta(‘4c7626f5-1e53-418e-90c8-add6e4af19c9’)}}

 

Comments (0)

Post a comment

Your email address will not be published. Required fields are marked *

Payara needs the contact information you provide to us to contact you about our products and services. You may unsubscribe from these communications at any time. For information on how to unsubscribe, as well as our privacy practices and commitment to protecting your privacy, please review our Legal & Privacy Policy.

Related Posts

4 minutes
Uncategorized

Leading the Way: Payara Platform Community 7 Beta Now Fully Jakarta EE 11 Certified

We’re excited to announce that Payara Platform Community 7 Beta application server is now fully certified as Jakarta EE 11 […]

What Is a Java Application Server? A Short Guide 6 minutes
Jakarta EE

What Is a Java Application Server? A Short Guide

Enterprise Java applications power global commerce, healthcare, government and countless other industries. These systems must be scalable, secure and […]

10 minutes
Uncategorized

Java’s 30th Anniversary: A Celebration of Legacy, Evolution and Community

May 2025 marks a monumental milestone in software development: Java turns 30. The impact of this language on the […]