Reworked for Amazon Linux and other differences