Yes, it is safe to live near oil or gas fields, because the industry is highly regulated. There are entire departments of government officials who spend their lives making sure that these fields are safe. Also, the producers of oil and gas would not want the legal liabilities of exposing people to these dangers.
I do not think living near oil or gas fields is a very wise decision and I would not recommend it to anyone. Any homes near these areas are always marked down and there is a reason for it. It's unhealthy and unsafe and it could be extremely dangerous if not regulated.