  Recently, the bilayer perovskite nickelate La$_3$Ni$_2$O$_7$ has been
reported to show evidence of high-temperature superconductivity (SC) under a
moderate pressure of about 14 GPa. To investigate the superconducting
mechanism, pairing symmetry, and the role of apical-oxygen deficiencies in this
material, we perform a random-phase-approximation based study on a bilayer
model consisting of the $d_{x^2-y^2}$ and $d_{3z^2-r^2}$ orbitals of Ni atoms
in both the pristine crystal and the crystal with apical-oxygen deficiencies.
Our analysis reveals an $s^{\pm}$-wave pairing symmetry driven by spin
fluctuations. The crucial role of pressure lies in that it induces the
emergence of the $\gamma$-pocket, which is involved in the strongest
Fermi-surface nesting. We further found the emergence of local moments in the
vicinity of apical-oxygen deficiencies, which significantly suppresses the
$T_c$. Therefore, it is possible to significantly enhance the $T_c$ by
eliminating oxygen deficiencies during the synthesis of the samples.
