Step 1: Open up a command prompt or terminal where you can access the Applicare directory and go to Applicare home path.
Step 2: Create a directory called predictive_analysis in the Applicare home path and give the following permission to this directory.
chmod -R 777 <predictive_analysis>
Step 3: Go to the predictive_analysis directory and create a file named rhel8.sh and paste the below contents into that file and save it. Then give the following permission to this file.
#!/bin/bash
export R_VERSION=4.2.0
bash -c "$(curl -L https://rstd.io/r-install)"
ln -s /opt/R/${R_VERSION}/bin/R /usr/local/bin/R
ln -s /opt/R/${R_VERSION}/bin/Rscript /usr/local/bin/Rscript
chmod -R 777 pred.R
chmod +x rhel8.sh
Step 4: After running the basch script it looks like the below one.
Step 5: Make sure R is in the right place. Execute the below command it.
which Rscript
The result should be "usr/local/bin/Rscript"
Apply step 6 ,7 and 8 only if you didn't get results on executing which R command.
Step 6: If the results are not the same as displayed above, then access your .bashrc file to create the correct path for R:
vim ~/.bashrc //OR THE PATH TO YOUR BASHRC FILE
Step 7: Once you are in the bashrc file, add the following line to your file:
export PATH=$PATH:/opt/R/4.2.0/bin/r --version
Step 8: Save and exit the file
Step 9: To finally ensure R was properly downloaded, type R in the terminal. You should be prompted with the R interface on the terminal/command prompt.
Now R should be successfully downloaded and the Predictive Analysis program is now running in the background.
Step 10: Go to <Applicare_home_directory>\server\bin and edit the catalina.sh file.
-Dapplicare.rHomePathDir=<R_installed_path>
Note:
Enter the directory that appears after executing R in step 5 instead of this <R_installed_path> value .
Example
-Dapplicare.rHomePathDir=/usr/local/bin/Rscript
Comments
0 comments
Article is closed for comments.