とあるインフラエンジニアの昔のBLOGを参考にさせてもらった。
http://nosa.cocolog-nifty.com/sanonosa/cat1546817/index.html