Calculating (co)limits of ringed spaces in $\mathbf{Top}$ Let $\mathbf{Top}$ be the category of topological spaces, $\mathbf{RS}$ the category of ringed spaces and $\mathbf{LRS}$ the category of locally ringed spaces.
There are forgetful functors
$$
U_{\mathbf{LRS}}: \mathbf{LRS} \to \mathbf{RS}
$$
(the inclusion of the (non-full) subcategory) and
$$
U_{\mathbf{RS}}: \mathbf{RS} \to \mathbf{Top}
$$
(forgetting the structure sheaf). All three categories have all (small) limits and colimits.

  
*
  
*Are $U_{\mathbf{LRS}}$ and $U_{\mathbf{RS}}$ (right?) adjoint functors?
  
*Do $U_{\mathbf{LRS}}$ and $U_{\mathbf{RS}}$ perserve pushouts?
  

I am interested in these questions because I can think easier of topological spaces than of ringed (or locally ringed) spaces. For example, when I intuitively want to see what the pushout of two (locally) ringed spaces is, I want to see first what happens on topological spaces and afterwards think of what is going on with the structure sheaves. Am I allowed to do this?
 A: *

*The forgetful functor $\mathsf{LRS} \to \mathsf{RS}$ has a right adjoint. The right adjoint "$\mathrm{Spec}$" is a rather direct generalization of the spectrum of a commutative ring. You can find the construction in W. D. Gillam's Localization of ringed spaces, for instance. The underlying set of $\mathrm{Spec}(X,\mathcal{O}_X)$ consists of all pairs $(x,\mathfrak{p})$, where $x$ is a point in $X$ and $\mathfrak{p}$ is a prime ideal of $\mathcal{O}_{X,x}$. The structure sheaf is defined in such a way that the stalk at $(x,\mathfrak{p})$ is the local ring $(\mathcal{O}_{X,x})_{\mathfrak{p}}$.

*As a corollary, $\mathsf{LRS} \to \mathsf{RS}$ preserves all colimits. But this also comes out from the construction of colimits of locally ringed spaces, which you can find in Demazure-Gabriel's Groupes algébriques, I. §1. 1.6.

*The forgetful functor $\mathsf{LRS} \to \mathsf{RS}$ has no left adjoint, since it does not preserve limits. For example, $\mathrm{Spec}(\mathbb{Z})$ is the terminal object of $\mathsf{LRS}$, but $(\{\star\},\underline{\mathbb{Z}})$ is the terminal object of $\mathsf{RS}$. For a description of limits in $\mathsf{LRS}$, see Gillam's paper above.

*The forgetful functor $\mathsf{RS} \to \mathsf{Top}$ has a right adjoint which maps $X$ to $(X,\underline{\mathbb{Z}})$.

*It follows that $\mathsf{RS} \to \mathsf{Top}$ preserves colimits. Specifically, the colimit of a diagram $((X_i,\mathcal{O}_i))_{i \in I}$ of ringed spaces is $(\mathrm{colim}_i X_i,\lim_i (u_i)_* \mathcal{O}_i)$, where $(u_i : X_i \to \mathrm{colim}_i X_i)$ is the colimit cone of the topological spaces.

*The forgetful functor $\mathsf{RS} \to \mathsf{Top}$ has a left adjoint which maps $X$ to $(X,0)$.

*It follows that $\mathsf{RS} \to \mathsf{Top}$ preserves limits. Specifically, the limit of a diagram $((X_i,\mathcal{O}_i))_{i \in I}$ of ringed spaces is $(\lim_i X_i,\mathrm{colim}_i (u_i)^{-1} \mathcal{O}_i)$, where $(u_i : \lim_i X_i \to X_i)$ is the limit cone of the topological spaces.
