Ming Jin: add some enhancements and cleanup scripts for repeated installation

1. create database if not exists
2. add '--fix-missing' flag for apt-get install
3. new clear script