Bacterial diseases can be prevented by using vaccination that induce active immunity. Active immunity can be induced by vaccines prepared from bacteria or their products. Table 1 presents a summary of the types of current bacterial vaccines.
https://www.creative-biolabs.com/vaccine/bacterial-vaccines.htm