Added some parameters based on os and fixed the package installation procedures based on whether it's centos or ubuntu.