If you want your RStudio Server or Connect to be able to render PDF reports on a centOS machine, you need to install a copy of texlive. However, I found that the texlive distribution on centOS through yum install
sometimes lack some LaTeX packages even after installing texlive-*
and it doesn't come with a latex package manager "for good reasons" (See https://www.centos.org/forums/viewtopic.php?t=54410). Therefore, I run into trouble in the past that I couldn't render a PDF because some latex packages were not and could not be installed.
My solution was to install the vanilla version of texlive from [TUG] (https://www.tug.org/texlive/acquire.html). I found these SE answer 1 & SE answer 2 were very helpful.
I just want to share my experience here in case other people fall into this rabbit hole. Also, please let me know if there is better solution for this issue.