USE CASES
CONSIDERATIONS
PREREQUISITES
yum-config-manager --enable rhel-7-server-optional-rpms
NOTE: there are other ways to install it. Contact your sysadmin for more info. Finding out which JAVA versions are installed and which JAVA is being used.
There are 4 programs which provide 'java'.
Selection Command ----------------------------------------------- 1 java-1.7.0-openjdk.x86_64 (/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.221-2.6.18.0.el7_6.x86_64/jre/bin/java) * 2 java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/jre/bin/java) 3 /usr/java/jre1.8.0_181-amd64/bin/java +4 java-11-openjdk.x86_64 (/usr/lib/jvm/java-11-openjdk-11.0.3.7-0.el7_6.x86_64/bin/java)
export JAVA_HOME=/usr/java/latest
set JAVA_HOME=/usr/java/latest export PATH=$JAVA_HOME/bin:$PATH 2. Create a soft link from your current JAVA to /usr/java/latest Example: ln -s /usr/lib/jvm/java-11-openjdk-11.0.3.7-0.el7_6.x86_64 /usr/java/latest Update below bash profile ~/.bashrc
Add this at the end of the file and save:
export JAVA_HOME=/usr/java/latest
Run below command after all the above changes were performed
source ~/.bashrc
|
This knowledge article may contain information that does not apply to version 21.05 or later which runs in a container environment. Please refer to Article Number 000385088 for more information about troubleshooting BMC products in containers. USE CASE I. Configuring JAVA prior the DWP Catalog Installation - BEST PRACTICE
Example: ln -s /usr/lib/jvm/java-11-openjdk-11.0.3.7-0.el7_6.x86_64 /usr/java/latest Have in mind:
#jvm.option.22=-XX:+UseParNewGC
jvm.option.21=-XX:+UseConcMarkSweepGC
jvm.option.22=-XX:+UseParNewGC jvm.option.23=-XX:NewRatio=2 jvm.option.24=-Djava.io.tmpdir=/opt/bmc/digitalworkplace/sb/jetty/work Example - Updated File jvm.option.21=-XX:+UseConcMarkSweepGC
#jvm.option.22=-XX:+UseParNewGC jvm.option.22=-XX:NewRatio=2 jvm.option.23=-Djava.io.tmpdir=/opt/bmc/digitalworkplace/sb/jetty/work
Notes: You can run ps -efa | grep java to confirm all the Catalog processes are running using the /usr/java/latest path USE CASE II. Updating and configuring JAVA after the DWP Catalog Installation - - Switching to OpenJDK11 (works for any other Oracle JRE version too) A) Don't want to update the java path in the config files and want to use a newer java version that is pointing it to the old java home value.
rpm -qa | grep jre -- this command will let you know which jre packages are installed
jre1.8-1.8.0_181-fcs.x86_64 yum remove jre1.8-1.8.0_181-fcs.x86_64 -- remove the jre that was used for the options.txt file
ln -s /usr/lib/jvm/java-11-openjdk-11.0.3.7-0.el7_6.x86_64 /usr/java/jre1.8.0_181-amd64
A) Need to update the java path in the config files, use a symbolic link and update the all the config files with command line and not one by one. Install OpenJDK11
cd </digitalworkplaceInstallDir>
grep -rnw ./ -e JAVA_HOME=
cd </digitalworkplaceInstallDir>
find ./ -type f -exec sed -i 's#/java/old#/usr/java/latest#g' {} \; cd /etc/arsystem/<servername> find ./ -type f -exec sed -i 's#/java/old#/usr/java/latest#g' {} \; #Replace /java/old/ with previous java path All of the above require a DWP Catalog Restart when done. Note: If SSL is in place, also consider updating the jetty-http.xml ca certs directory and the user_group_sync.sh JAVA info. Check KA 000133376 for that. |