UmVirt LFS Assistant command info
add_java64
Info: Java blob install
Commands:
cd /sources
wget --no-check-certificate -nc https://umvirt.com/linux/downloads/0.1/blobs/openjdk/openjdk-11.0.2_linux-x64_bin.tar.gz
wget --no-check-certificate -nc https://umvirt.com/linux/downloads/0.1/blobs/openjdk/openjdk-11.0.2_linux-x64_bin.tar.gz.md5sum
#Checking source package file existance
if [ ! -f openjdk-11.0.2_linux-x64_bin.tar.gz ]; then
echo "Error: Can't find openjdk-11.0.2_linux-x64_bin.tar.gz. Exiting!"
exit
fi
#Checking source package file checksum
if [ -f openjdk-11.0.2_linux-x64_bin.tar.gz.md5sum ]; then
MD5=`LANG=C md5sum -c openjdk-11.0.2_linux-x64_bin.tar.gz.md5sum | grep OK`
if [ "$MD5" == "" ] ; then
echo "Error: Checksum of openjdk-11.0.2_linux-x64_bin.tar.gz is wrong. Exiting!"
exit
fi
fi
tar -xf openjdk-11.0.2_linux-x64_bin.tar.gz
cd jdk-11.0.2
install -vdm755 /opt/OpenJDK-11.0.2+9-bin &&
mv -v * /opt/OpenJDK-11.0.2+9-bin &&
chown -R root:root /opt/OpenJDK-11.0.2+9-bin
ln -sfn OpenJDK-11.0.2+9-bin /opt/jdk
cat > /etc/profile.d/openjdk.sh << "EOF"
# Begin /etc/profile.d/openjdk.sh
# Set JAVA_HOME directory
JAVA_HOME=/opt/jdk
# Adjust PATH
pathappend $JAVA_HOME/bin
# Add to MANPATH
pathappend $JAVA_HOME/man MANPATH
# Auto Java CLASSPATH: Copy jar files to, or create symlinks in, the
# /usr/share/java directory. Note that having gcj jars with OpenJDK 8
# may lead to errors.
AUTO_CLASSPATH_DIR=/usr/share/java
pathprepend . CLASSPATH
for dir in `find ${AUTO_CLASSPATH_DIR} -type d 2>/dev/null`; do
pathappend $dir CLASSPATH
done
for jar in `find ${AUTO_CLASSPATH_DIR} -name "*.jar" 2>/dev/null`; do
pathappend $jar CLASSPATH
done
export JAVA_HOME
unset AUTO_CLASSPATH_DIR dir jar
# End /etc/profile.d/openjdk.sh
EOF
cat >> /etc/man_db.conf << "EOF" &&
# Begin Java addition
MANDATORY_MANPATH /opt/jdk/man
MANPATH_MAP /opt/jdk/bin /opt/jdk/man
MANDB_MAP /opt/jdk/man /var/cache/man/jdk
# End Java addition
EOF
mkdir -p /var/cache/man &&
mandb -c /opt/jdk/man
/usr/sbin/make-ca -g --force &&
ln -sfv /etc/ssl/java/cacerts.jks /opt/jdk/lib/security/cacerts
. /etc/profile
Apache/2.4.62 (Debian) Server at ulfs.org Port 443