Friday, January 9, 2015

Install Fonts on Centos



Recently I got a chance to do a fresh production environment setup. While doing this I came to know the problem related with fonts on server. where as my application doesn't demand or have some specific kind of fonts.

So the way in install default fonts on Centos.
Before doing font installation first we have to check which font directory our system is referring.
cd /etc/fonts
cat fonts.conf

check under <!-- Font directory list --> section and copy the directory path eg. "/usr/share/fonts"

Now check the mentioned directory whether any font is installed or not?
cd /usr/share/fonts

If nothing is there then of course we have to install fonts.
sudo apt-get install ttf-mscorefonts-installer
or
sudo wget install ttf-mscorefonts-installer
or
wget http://www.my-guides.net/en/images/stories/fedora12/msttcore-fonts-2.0-3.noarch.rpm

rpm -Uvh msttcore-fonts-2.0-3.noarch.rpm

Now this is the time to verify the whether font is installed or not.

Here you must see the directory with the name 'msttcore'. within this directory you can see the list of install fonts with the extension of '.ttf'

Now what next?
You have to restart the service, to reload the font configurations. Most of the time services are start via the init system.
/etc/init.d/squid restart
or
service squid restart
or
service squid3 restart

In my case I was using the proxy server, and to restart service over there, I have used bellow script.
sudo /usr/share/prizm/scripts/proxyserver.sh restart