This paper studies the parameter tuning problem of positive linear systems for optimizing their stability properties. We specifically show that, under certain regularity assumptions on the parametrization, the problem of finding the minimum-cost parameters that achieve a given requirement on a system norm reduces to a \emph{geometric program}, which in turn can be exactly and efficiently solved by convex optimization. The flexibility of geometric programming allows the state, input, and output matrices of the system to simultaneously depend on the parameters to be tuned. The class of system norms under consideration includes the $H^2$ norm, $H^\infty$ norm, Hankel norm, and Schatten $p$-norm. Also, the parameter tuning problem for ensuring the robust stability of the system under structural uncertainties is shown to be solved by geometric programming. The proposed optimization framework is further extended to delayed positive linear systems, where it is shown that the parameter tunning problem jointly constrained by the exponential decay rate, the $\mathcal L^1$-gain, and the $\mathcal L^\infty$-gain can be solved by convex optimization. The assumption on the system parametrization is stated in terms of posynomial functions, which form a broad class of functions and thus allow us to deal with various interesting positive linear systems arising from, for example, dynamical buffer networks and epidemic spreading processes. We present numerical examples to illustrate the effectiveness of the proposed optimization framework.