How I Install Specific Fonts on My Aws Ec2 Instance

Include custom fonts in AWS Lambda

The official AWS response on the forum post is still correct.

Currently, it is not possible to customize Lambda environment. If you want additional packages you can build on Amazon Linux and put them into the zip file you upload.

That's the extent to which you can "install" anything in the Lambda environment.

the easiest way would be to include them via OS.

Arguably so, but that's simply not how Lambda works.

Install mscorefonts on ec2

Eventually I figured this out. My solution was to enable the multiverse ppa's. Here is the script that I used.

#font installation -- required to properly display fonts used in 
echo "deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ saucy multiverse" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ saucy multiverse" | sudo tee -a /etc/apt/sources.list
echo "deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ saucy-updates multiverse" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ saucy-updates multiverse" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
# preselect yes for ms EULA
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
sudo apt-get install -y ttf-mscorefonts-installer

This works on EC2 ubuntu as of January 2015 and my local machine running ubuntu 14.04.

Getting Microsoft Calibri font on Amazon EC2 ubuntu

Use

wget "http://cl.ly/0m3f0x0c252P3O3t190q/download/Calibri.ttf" -O "~/.fonts/Calibri.ttf"

This will save Calibri font to your default fonts directory, and all your apps & scripts can use it as a normal font.

How to install 3rd party Python libraries for a single script running on AWS EC2?

Normally when you fire up an AWS instance you select an "Image".

These are called Amazon Machine Images or AMI for short.

Typically you would select say (for example) an "Ubuntu" AMI.

Example: https://cloud-images.ubuntu.com/locator/ec2/

Select the appropriate AMI and then perform some steps similar to:

  1. Configure and Start your Instance
  2. Shell into your Instance
  3. Run: apt-get install python-setuptools
  4. Run: easy_install nltk

You may also find the Python package(s) you're looking for already available in the repositories of the Distribution/Image you've selected.



Related Topics



Leave a reply



Submit