You may even use a bleach and water solution if you do not have or have access to a carpet cleaner as mentioned and/or if you would like to disinfect on a weekly/monthly basis.
use a wet carpet mach, like rug doctor, or so, add a disinfecant to the water,