For both Debian and CentOS, all of the echo 'y' | ... commands can be simplified by passing -y to apt-get install or yum install. E.g. ```apt-get -y install``` or ```yum -y install```.