If you have not installed IBM Installation Manager, install IBM Installation Manager.
Install from IBM HTTP repository
When installing Java via the command line, IBM recommends installing Java from the IBM HTTP repository instead of from a local repository, as this ensures that the latest installation files are used during the install.
List the available packages. The -prompt option is used to get a prompt to provide your IBM username and password.
~]# cd /opt/IBM/InstallationManager/eclipse/tools/ ~]# ./imcl listAvailablePackages -repositories http://www.ibm.com/software/repositorymanager/com.ibm.websphere.IBMJAVA.v80 -prompt com.ibm.websphere.IBMJAVA.v80_8.0.2010.20160224_1829 com.ibm.websphere.IBMJAVA.v80_8.0.3000.20160720_1754 com.ibm.websphere.IBMJAVA.v80_8.0.3020.20161124_1304 com.ibm.websphere.IBMJAVA.v80_8.0.4005.20170626_0627 . . .
You can view the license before you install Java.
Install Java. Your IBM username and password will be stored in a secure storage file, which is usually located at /var/ibm/InstallationManager/secure_storage. If you have not yet created the secure storage file, you can use the -prompt option to create the secure storage file. Or, you can manually create the secure storage file. The secure storage file will be protected by a master password. If you use the -prompt option, you will need to type in the master password. Or, you can create the master_password.txt file and store the master password in the master_password.txt.
~]# ./imcl com.ibm.java.jdk.v8_8.0.5007.20171218_1035 -repositories http://www.ibm.com/software/repositorymanager/com.ibm.websphere.BASE.v90 -installationDirectory /opt/IBM/WebSphere/AppServer -acceptLicense -showVerboseProgress -prompt or -masterPasswordFile /var/ibm/InstallationManager/master_password.txt
Install from local repository
Installing offering from a local repository is nearly identical to installing from IBM HTTP repository, except you would download the products you want to install from Fix Central or using the Packaging Utility. Download Java JDK. After the packages have been downloaded, you will unzip the packages to a location on your server, such as /tmp/was and /tmp/java. Then, you can use /tmp/was and /tmp/java in the install command.
~]# ./imcl install com.ibm.java.jdk.v8_8.0.5007.20171218_1035 -repositories /tmp/java -installationDirectory /opt/IBM/WebSphere/Java -sharedResourcesDirectory /opt/IBM/IMShared -acceptLicense -showVerboseProgress -prompt or -masterPasswordFile /var/ibm/InstallationManager/master_password.txt
The listInstalledPackages command can be used to list installed packages.
The versionInfo.sh utility can be used to verify that Java was successfully installed.
~]# /opt/IBM/WebSphere/AppServer/bin/versionInfo.sh . . . Installed Product ----------------------------------------------------------------------- Name IBM WebSphere SDK Java Technology Edition (Optional) Version 18.104.22.168 ID IBMJAVA8 . . .