We investigate how environmental effects by gas stripping alter the growth of a super massive black hole (SMBH) and its host galaxy evolution, by means of 1D hydrodynamical simulations that include both mechanical and radiative AGN feedback effects. By changing the truncation radius of the gas distribution (R_t), beyond which gas stripping is assumed to be effective, we simulate possible environments for satellite and central galaxies in galaxy clusters and groups. The continuous escape of gas outside the truncation radius strongly suppresses star formation, while the growth of the SMBH is less affected by gas stripping because the SMBH accretion is primarily ruled by the density of the central region. As we allow for increasing environmental effects - the truncation radius decreasing from about 410 to 50 kpc - we find that the final SMBH mass declines from about 10^9 to 8 x 10^8 Msol, but the outflowing mass is roughly constant at about 2 x 10^10 Msol. There are larger change in the mass of stars formed, which declines from about 2 x 10^10 to 2 x 10^9 Msol, and the final thermal X-ray gas, which declines from about 10^9 to 5 x 10^8 Msol, with increasing environmental stripping. Most dramatic is the decline in the total time that the objects would be seen as quasars, which declines from 52 Myr (for R_t = 377 kpc) to 7.9 Myr (for R_t = 51 kpc). The typical case might be interpreted as a red and dead galaxy having episodic cooling flows followed by AGN feedback effects resulting in temporary transitions of the overall galaxy color from red to green or to blue, with (cluster) central galaxies spending a much larger fraction of their time in the elevated state than do satellite galaxies.(Abridged)