The two-dimensional Dirac Hamiltonian with equal scalar and vector potentials has been proved commuting with the deformed orbital angular momentum $L$. When the potential takes the Coulomb form, the system has an SO(3) symmetry, and similarly the harmonic oscillator potential possesses an SU(2) symmetry. The generators of the symmetric groups are derived for these two systems separately. The corresponding energy spectra are yielded naturally from the Casimir operators. Their non-relativistic limits are also discussed.