Installing OptiPNG 0.7.3 (or newer) on Ubuntu 12.04

Unfortunately sudo apt-get install optipng installs an outdated version of OptiPNG (0.6.x). To get the newest version, you’ll have to compile from source code. And that ain’t bad.

This tutorial assumes you have build-essentials library installed. If not, you can check out this Compiling: Easy How To article on Ubuntu to get set up and gain a better understanding of what is going on here.

  1. Download the source code with this command. This may work if SourceForge doesn’t change their URL structure.
    wget http://downloads.sourceforge.net/project/optipng/OptiPNG/optipng-0.7.4/optipng-0.7.4.tar.gz
    

If the that URL doesn’t work, start searching for the new download link at the OptiPNG site.

  1. Untar it
    tar xvf optipng-0.7.3.tar.gz
    
  2. Go into the extracted folder, compile, and install it
    cd optipng-0.7.3
    ./configure
    make
    sudo checkinstall
    

    This will compile OptiPNG and make it accessible by commandline.

  3. Try out OptiPNG! Run this command to see the version number:

    optipng -v
    

    The result should be something like this:

    OptiPNG version 0.7.4
    Copyright (C) 2001-2012 Cosmin Truta and the Contributing Authors.
    
    This program is open-source software. See LICENSE for more details.
    
    Portions of this software are based in part on the work of:
      Jean-loup Gailly and Mark Adler (zlib)
      Glenn Randers-Pehrson and the PNG Development Group (libpng)
      Miyasaka Masaru (BMP support)
      David Koblas (GIF support)
    
    Using libpng version 1.4.12 and zlib version 1.2.7-optipng
    

You are ready to optimize PNG files now!

Installing S3FS on Ubuntu 12.04

Check out the source code from SVN

svn checkout http://s3fs.googlecode.com/svn/trunk/ s3fs-src

Get into the folder created by checking out the code

cd s3fs-src

Get these packages (list by Xentek + a few of my own additions)

sudo apt-get install build-essential libcurl4-openssl-dev libxml2-dev libfuse-dev automake libtool

Run configure to check if you are missing any other packages

./configure

You will see a message like this if other packages are missing:

configure: error: Package requirements (fuse >= 2.8.4 libcurl >= 7.0 libxml-2.0 >= 2.6 libcrypto >= 0.9) were not met:
 
No package 'fuse' found
No package 'libxml-2.0' found
 
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Install any other missing packages with `apt-get`. Once they are in place, these commands should work:

sh ./autogen.sh
make
sudo make install

Using S3FS

Check the Overview on the S3FS site.

EC2 + Ubuntu 12.04 + LAMP 2 Server Setup checklist

My steps:

Install stuff

sudo apt-get update
sudo apt-get upgrade
sudo tasksel install lamp-server
sudo apt-get install subversion phpmyadmin php5-curl
  • Add Include /etc/phpmyadmin/apache.conf to somewhere in your Apache Config files to enable it
  • Use http://strongpasswordgenerator.com/ to generate passwords
  • Uncomment store-plaintext-passwords = no in /home/ubuntu/.subversion/servers so svn stops bugging you about it

Security

Backups

Monitoring

  • AWS – set up CloudWatch to watch Status and CPU usage

Other Tweaks