Issues installing Rstudio server

Hello, I am new in Rstudio-server. I tried to install the rstudio-server on Red Hat 8 (on aws) by following the link: RStudio Server - Posit based on Step 1-Step3.

The R and rstudio-server are installed successfully and the symbolic links for R Path are also created. However, when I tried to start the rstudio-server by typing "sudo rstudio-server start", the server is not running.

I checked the log file "sudo vim /var/log/rstudio/rstudio-server/rserver.log", it shows an error message "[rserver] ERROR Path to R not specified, and no module binary specified; Invalid R module (); LOGGED FROM: int main(int, char* const*) src/cpp/server/ServerMain.cpp:837".

I typed"which R" and it shows which: no R in (/sbin:/bin:/usr/sbin:/usr/bin)

Thank you in advance!!