A gunman unleashed a barrage of gunfire at two military facilities Thursday in Tennessee, killing at least four Marines, officials said. The suspect also was killed.