Install and uninstall Oracle JDK 8 on CentOS 6

  • Uninstall JDK 7:
    1. Find the installed rpm package:
      sudo rpm -qa | grep jdk | grep fcs
      it should return the package name, like
    2. Remove the package:
      sudo rpm -e -1.7.0_51-fcs
  • Install JDK 8:
    1. Download the JDK RPM package from Oracle
    2. Install the RPM package:
      sudo rpm -Uvh jdk-8u5-linux-x64.rpm
    3. Set up alternatives:
      sudo alternatives --install /usr/bin/java java /usr/java/latest/jre/bin/java 200000
      sudo alternatives --install /usr/bin/javaws javaws /usr/java/latest/jre/bin/javaws 200000
      sudo alternatives --install /usr/lib64/mozilla/plugins/ /usr/java/latest/jre/lib/amd64/ 200000
      sudo alternatives --install /usr/bin/javac javac /usr/java/latest/bin/javac 200000
      sudo alternatives --install /usr/bin/jar jar /usr/java/latest/bin/jar 200000

Install consolas font on Linux


cd /tmp

# download

# extract
cabextract -L -F PowerPointViewer.exe; cabextract -L -F "CONSOLA*.TTF"

# install
sudo mkdir /usr/share/fonts/windows

sudo cp /tmp/consola*.ttf /usr/share/fonts/windows/

cd /usr/share/fonts/windows

sudo mkfontdir

sudo mkfontscale

sudo fc-cache -fv

# clean up
rm /tmp/consola*.ttf

rm /tmp/PowerPointViewer.exe

rm /tmp/

Check if your ubuntu linux is affected by openssl heart bleed bug

The heart bleed bug affects openssl 1.0.1 built before 7 April 2014.
  • Check your openssl version and build time using the following command:
    openssl version -a
    If the version is 1.0.1 and build time is before 7 April 2014 (exclude 7 April 2014), your openssl is affected.
  • To patch your openssl, simply run the following commands to upgrade your openssl:
    sudo apt-get update
    sudo apt-get install openssl libssl1.0.0