Add support of Amazon Linux, fix dependence between package and config

Add support of Amazon Linux, fix dependence between package and config (it will newer try to edit config before install package).
I made some test on my instances in Amazon - all is ok. Try it.