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.
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.