The San Francisco 49ers have signed safety Antoine Bethea to a four-year contract.