How to install mongo db on linux server as a service

i have an VPS and want to install mongodb on it, my problem is when i stop my ssh client my db is also stop, can any one tell me how to fix this.