Create a directory for your JDK installation: mkdir /opt/jdkĪnd extract java into the /opt/jdk directory: tar -zxf jdk-8u92-linux-圆4.tar.gz -C /opt/jdk
The /opt directory is reserved for all the software and add-on packages that are not part of the default installation. In this section, you will need sudo privileges: sudo su Includes tools for JVM monitoring and tools commonly required for server applications. For deploying Java applications on servers.
Includes a complete JRE plus tools for developing, debugging, and monitoring Java applications. Using your web browser, go to the Oracle Java SE (Standard Edition) website and decide which version you want to install:
You will need to know whether you are running a 32 bit or a 64 bit OS: uname -m
You should no longer see the openjdk-7-jre installed! Install Oracle JDK If you use the following command: java -version I also found the following command to perform additional clean up: sudo apt-get purge openjdk* This should also clean up all the additional dependency libraries that were installed with it. Press ‘y’ and then press enter when prompted to confirm this change. Uninstall OpenJDK sudo apt-get autoremove openjdk-7-jre Oracle Java is a proprietary implementation for Java that is free to download and use for commercial use, but not to redistribute, therefore it is not included in a officially maintained repository. (that's why escalation privilege is used in the following examples.Java is a programming technology originally developed by Sun Microsystems and later acquired by Oracle. Just be aware that operations should be performed as root user Now, you're ready to use it in your playbooks. So, either allow facts gathering or provide them in a way or another. This role also use OS family and Distribution (name and major version) facts. ConditionsĪs it adds or removes package from the system, escalation privileges are usedĪnd you have to call the role accordingly. Note that for some distributions, like CentOS and Ubuntu, it may be useful toĪdd the repository (either manually or a previous task) before calling this
Location to install the package from (must be an acceptable path for pkgadd or a valid repository path with definition found in /etc/opt/csw/nf)Įither the absolute path to the packaged file, or an alternative URL to Chocolatey feed or path to a folder with a.
The repository from which install or upgrade the package Override the default ports source directory (package is build from source as no binary is available by default) URL to alternative repository where to found the desired OpenJDK versien Path with AIX packages (required to install) This string format (URL or a path) and meaning is OS dependant This later is used by few packages managers, to set an additionnal Usefull to disable such check in some rare cases. Packages managers to disable signatures/certificates check. It's a boolean ( no/ false or yes/ true) use with some lastest to upgrade the package to the latest fix release.) all other values accepted by the underlying module (e.g.absent to remove the package if still there,.present to install the package if not already done,.This is the desired state and thus is mandatory. This value is mandatory and must be an integer. This role uses very few variables: ojdk_versionīeware, it's neither the package version nor the number in the package's This section is about integration of the role in your playbooks. # $roles is the roles folder path, if you are not using default # $specs is the requirements file created previously # last option force overriding, usefull to ensure version changeĪnsible-galaxy install -p $roles -r $specs -f Using Ubuntu 18.04 LTS (Bionic Beaver) / 18.10 (Cosmic Cuttlefish)Ĭreate or add to your roles dependency file these lines:
May vary according to your distribution major release, and numbering differsĪlpine 3.3 / 3.4 / 3.5 / 3.6 / 3.7 / 3.8 /3.9 This role works for distributions there's a build for (see, for example,Ī nearly complete and up to date list.) Also note that available This role uses the distribution native package manager and configured This section is about initial settings to get the role working. Implementations may add classes or not only J2SE.) So, they are some minor GNU General Public Licence version 2 with linking exceptionĪs it's a reference, it provides expected common denominator (other Of the Java Platform, Standard Edition (J2SE), as defined by the This role is to manage Open Java Development Kit (OpenJDK) in most OS.