Add debian and centos support

Add debian and centos support.
Add all tests to verify it works.