Silvertip47 pretty much sums it up. Keep a clean camp, keep the odors as close to zero as possible, and if you know there's a bear around, move.
I spent 30+ years working in the Canadian Arctic in the summer, living out on the land. I saw literally dozens of Blacks, Grizzlies, and Polar bears...