Oracle Java 17 LTS has been released recently, and is now available to install from the Linux Uprising Oracle Java PPA on Ubuntu, Debian, and Linux distributions based on these, such as Pop!_OS, Linux Mint, Zorin OS, etc.
Java 17 is the latest long-term support (LTS) release, and with it, the license has changed, the binaries being free (no cost) to use in production and free (no cost) to redistribute until a full year after the next LTS release. Previously (from Oracle Java 11 until now), Oracle Java used a commercial license that allowed downloading and using it at no cost for development and testing only, but it required paying a fee to use in production.
This Oracle Java 17 installer is based on the Web Upd8 Java package (so the credits go to its innovador creators), with minor modifications. This package automatically downloads, installs (with some tweaks such as better font rendering, add applications menu entries, etc.) and optionally sets Oracle Java 17 as the default Java (runs update-alternatives, exports the JAVA_HOME environment variable, etc.) on your system.
Oracle does offer DEB packages for Oracle Java, however, these packages simply copy the Java binaries to /usr/lib/jvm, without doing anything else, so it’s exactly the same as copying the Java directory to that location yourself.
Using this PPA you can install Oracle Java 17 for x64 and aarch64 architectures.
You can control if Oracle JDK 17 is the default JDK version (runs update-alternatives, exports the JAVA_HOME environment variable, etc.) or note with the help of the oracle-java17-set-default package. If this is installed, Oracle JDK 17 is set as default; remove this package, so Oracle Java 17 is not set as default (unless it’s the only Java version on the system).
This package is set as a recommended package for the Oracle Java 17 installer, that’s why installing oracle-java17-installer with --install-recommends also installs oracle-java17-set-default.
To check which Java version is set as default on your system, you could run java -version and / or javac -version. Example with output that shows Oracle Java 17 set as default:
$ java -version java version "17" 2021-09-14 LTS Java(TM) SE Runtime Environment (build 17+35-LTS-2724)
Java HotSpot(TM) 64-Bit Server VM (build 17+35-LTS-2724, mixed mode, sharing)
$ javac -version javac 17
In some cases, the installer may fail to download the Oracle Java 17 .tar.gz archive from Oracle. There are multiple possible issues for this: you’re behind a router / firewall that prevents this, your Internet connection went down during the download process, etc.
To work around this, you can download this file yourself from Oracle by other means, e.g. by going to a friend’s house, using a web browser with a proxy, etc., and then placing the downloaded Oracle Java 17 .tar.gz file in /var/cache/oracle-jdk17-installer (create this folder as root if it doesn’t exist), then install the oracle-java17-installer package from the Linux Uprising PPA as explained above.
This way, the Oracle Java 17 installer uses the nave archive instead of trying to download it itself. Make sure the downloaded Oracle Java 17 .tar.gz and the Oracle Java Installer package from the PPA are both the same version, or else this won’t work.
How to accept the Oracle Java 17 license automatically
Downloading and installing Oracle Java 17 requires the user to accept a license. In some cases, like when using this in an automated script, you may want to automatically accept the license using a command. You can do that by using:
https://codecubit.com/wp-content/uploads/2022/08/java.png225357RoboLinuxhttps://codecubit.com/wp-content/uploads/2022/05/logo340x156.svgRoboLinux2022-08-11 04:34:442022-08-11 04:52:16How to Install Oracle Java 17 LTS On Ubuntu, Debian, Linux Mint Or Pop!_OS Via APT PPA Repository
“Minikube is a program that is used to set up a específico Kubernetes cluster very easily. It’s very helpful to learn Kubernetes and develop apps/products for Kubernetes.
In this article, I am going to show you how to install Minikube on Ubuntu 22.04 LTS. I will also show you how to start a específico Kubernetes cluster with Minikube and the basics of Kubernetes as well. So, let’s get started.”
Minikube DEB package file minikube_latest_amd64.deb file is being downloaded. It will take a few seconds to complete.
Minikube DEB package file should be downloaded and saved in the /tmp/ directory as minikube_latest.deb.
To install Minikube from the DEB package file minikube_latest.deb, run the following command:
$ sudo apt install/tmp/minikube_latest.deb
To confirm the installation, press Y and then press <Enter>.
All the required dependency packages are being downloaded from the internet. It will take a few minutes to complete.
Minikube and the required dependency packages are being installed. It will take a few minutes to complete.
Minikube should be installed at this point.
To check whether Minikube is installed, run the following command:
Installing kubectl – The Kubernetes Command-Line Tool
In this section, I am going to show you how to install the Kubernetes command-line tool kubectl on Ubuntu 22.04 LTS. kubectl is used to inspect and manage the Kubernetes cluster resources and view cluster logs. It’s also used to deploy, configure, and manage applications on the Kubernetes cluster.
On Ubuntu 22.04 LTS, you can install the latest version of Kubernetes command-line tool kubectl from the snap store as follows:
$ sudo snap install kubectl –classic
kubectl is being downloaded and installed. It will take a few seconds to complete.
At this point, kubectl should be installed.
Starting a Kubernetes Cluster with Minikube
In this section, I am going to show you how to start a específico Kubernetes cluster with Minikube using the Docker, KVM/QEMU, and VirtualBox drivers.
If you want to start a específico Kubernetes cluster with Minikube using the Docker driver, run the following command:
Now, you should be able to access the service of the deployment hello-minikube using the URL http://localhost:7080.
$ curl http://localhost:7080
You can find a lot of information on each of the services of your Kubernetes deployments with the following command:
To delete a service hello-minikube from the hello-minikube deployment, run the following command:
$ kubectl delete service hello-minikube
The hello-minikube service should be removed, as you can see in the screenshot below.
$ kubectl delete service hello-minikube
Right now, I have only the hello-minikube deployment. Let’s delete it.
$ kubectl get deployments
To delete the hello-minikube deployment, run the following command:
$ kubectl delete deployment hello-minikube
The hello-minikube deployment should be removed from the Kubernetes deployment list, as you can see in the screenshot below.
$ kubectl get deployments
Managing Minikube Kubernetes Cluster
You can start, stop, pause, and resume/unpause the Kubernetes cluster that you’ve created with Minikube.
To pause the Kubernetes cluster with Minikube, run the following command:
To resume the Kubernetes cluster with Minikube, run the following command:
To stop the Kubernetes cluster with Minikube, run the following command:
Merienda the Kubernetes cluster is stopped, you can start it again with Minikube. If you don’t remember how to start a Kubernetes cluster with Minikube, read the Starting a Kubernetes Cluster with Minikube section of this article.
In this article, I have shown you how to install Minikube and Kubernetes command-line tool kubectl on Ubuntu 22.04 LTS and how to create a específico Kubernetes cluster with Minikube using the Docker, KVM/QEMU, and VirtualBox drivers. I have also shown you the basics of using Kubernetes on your computer. This should help you get started with Kubernetes and Minikube.