prepare primary database.
set up urlManager.