As a firearms instructor, I get asked about this a lot.
First - develop your skills of Situational Awareness. Know where you are and who and what is going on around you. You can pick up on a lot of potential problems before they become an issue you need to deal with.
Second - carry yourself with confidence, and develop some skills in Command Presence. In all of the time I carried on the job, this was instrumental in never having to discharge my firearm. I can remember instances where junior folks were dealing with a subject, and the entire demeanor of that subject changed when I showed up - they realized that I wasn't playing. Even when working as an armed security guard - I had police ask me for assistance in dealing with subjects on more than on occasion because I "seemed more like a cop" to the subject. (It doesn't help that most of them want to wear a golf/polo shirt with a patch instead of uniform with a metal shield).
Third - Get some training. Learn how to handle a firearm, how to store it safely, and how they work.
Fourth - If offered, get a concealed firearm permit where you live. It may offer benefits such as RECIPROCITY and RECOGNITION.
There is a very useful app for smartphones called Legal Heat. It is your responsibility to know the laws where you are, wherever that is.
Here are some follow-up articles if you are interested...
http://rvgunner.com/slfdfnsideas.htmhttp://rvgunner.com/whycarry.htmhttp://rvgunner.com/gunsafety.htm