15 C
Texas
angeloma
Senior Writer and partner

Install Payara Server on Debian 10

It is no secret to anyone that Java is a very popular programming language. In fact, it still is despite Python or Rust. However, it is also true that to complement the professional development of Java requires other tools to effectively deploy these applications. In this sense, Payara Server emerges as the most viable solution for Java EE applications. Therefore, in this post, you will learn how to install Payara Server on Debian 10.

Payara Server and Java EE

To serve Java EE applications with war format nothing better than Payara Server. Payara Server is an open-source Java EE application server built in Java. Its main advantage over its competitors is that it is strongly supported by the community. In addition, it allows running in almost any environment either in the cloud or hybrid. This gives us an idea of the potential of the application.

Its main features are:

  • Fully Supported Server derived from GlassFish 5.x Open Source Edition.
  • Drop-in Replacement for GlassFish Open Source Edition.
  • Microprofile 1.3 API support.
  • Supports deployment of JavaEE 8 applications.
  • Production Enhancements including JCache, JBatch, and Hazelcast session clustering.
  • Payara Micro for cloud and microservice deployments.

So, let us start.

1.- Install Java 11 on Debian 10

- Advertisement -

Payara Server is built with Java which in theory makes it work with any version of it. However, the development branch 5 of the Payara Server works better if we install Java 11. So this is the first step:

Open a terminal session of your server or computer and run the following:

:~$ sudo apt install openjdk-11-jre openjdk-11-jdk

Then, check the installed version:

:~$ java -version
openjdk version "11.0.3" 2019-04-16
OpenJDK Runtime Environment (build 11.0.3+7-post-Debian-5)
OpenJDK 64-Bit Server VM (build 11.0.3+7-post-Debian-5, mixed mode, sharing)

So, we can continue.

2.- Download and install Payara Server on Debian 10

Now it is necessary to download Payara Server from the project website.

Then, it is necessary that you place it on your computer through an FTP server.

Read, How to set up an FTP server on Debian 10?

And move it to /opt/

:~$ sudo mv payara-5.192.zip /opt/

Then unzip it.

:~$ sudo unzip payara-5.192.zip

Next, navigate into the folder and go to bin.

:~$ cd payara5/bin/

Now, we can start the server using the following command:

:~$ sudo ./asadmin start-domain

1.- Starting Payara Server on Debian 10
1.- Starting Payara Server on Debian 10

Now, you can open your web browser and go to http://your-server:4848 and you will see the following:

2.- Starting Payara server
2.- Starting Payara server

After a few seconds, you will see this screen.

3.- Payara server on Debian 10
3.- Payara server on Debian 10

Using this administration panel, you will be able to access all the server configurations. Also keep in mind, if you use a Firewall you need to open port 4848.

3.- Change the default port of Payara Server

To increase server security or for configuration reasons, it is possible to change the default port of Payara Server.

First, stop running the server:

:~$ sudo ./asadmin stop-domain

Now you have to edit a configuration file to change the port. To do this, open the domain.xml file located in payara5/glassfish/domains/domain1/config/ directory.

:~$ cd ../glassfish/domains/domain1/config/
:~$ sudo nano domain.xml

In the file, in the network-listener section, you will see the port field and you will be able to change it to your liking.

4.- Changing the default port
4.- Changing the default port

Now, start the server again.

:~$ cd /opt/payara5/bin/
:~$ ./asadmin start-domain

And that is it.

2.- Deploy an application with Payara Server on Debian 10

Deploying an application on Payara server is quite simple. To do this, just type the following command:

:~$ ./asadmin deploy [WAR_file_path]

And if you want to stop the deployment, this other command is enough:

:~$ ./asadmin undeploy [WAR_file_path]

And that’s enough. Now you can continue using Payara Server.

Conclusion

Java EE is one of the preferred options for more experienced developers to create professional applications. In this way, the Payara Server becomes a robust option to serve these applications. In addition, it is multiplatform and gutter with the backing of being created in Java. Well, in this post you have learned how to install it in Debian 10.

Please share this post and join our Telegram channel. So, enjoy it.

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article