Вы находитесь на странице: 1из 14

5/18/2017 SetupRserverforusewithSAPAnalyticsCloud|SAPBlogs

Products
Products Industries
Industries Support
Support Training
Training Community
Community Developer
Developer Partner
Partner

About
About

Home / Community / Blogs + Actions

SetupRserverforusewithSAP
AnalyticsCloud
May17,2017 | 75Views |

HarjeetJudge
morebythisauthor

SAPBusinessObjectsCloud
sapbusinessobjectscloud | SAPBusinessObjectsCloudforbusinessintelligence

share
1 share
1 tweet share
43 0
like

Follow

https://blogs.sap.com/2017/05/17/setuprserverforusewithsapanalyticscloud/ 1/14
5/18/2017 SetupRserverforusewithSAPAnalyticsCloud|SAPBlogs

SAPAnalyticsCloud(formerlySAPBusinessObjects
Cloud)providestheabilitytoembedanRvisualizationin
astorytoenhancetheinsightsavailabletothebusiness
user.

ThisblogwillcoverhowtosetupRServeronLinuxfor
usewithSAPAnalyticsCloud.Thesetupinvolvesthe
followingsteps:

1.Installgcc,openssl,andRonLinux
2.Generatesslcertificate
3.InstallandconfigureRServpackage
4.SetupRServeinSAPAnalyticsCloud
5.AddadditionalRpackages

Step1:Installgcc,opensslandR

Thisstepisdifferentdependinguponwhatversionof
Linuxflavorisbeingused.Ivedocumentedthestepsfor
Suse12x86_64version.ChecktheversionofyourLinux
distributionusingcommandrelevantforyourOS.

Installgcc
https://blogs.sap.com/2017/05/17/setuprserverforusewithsapanalyticscloud/ 2/14
5/18/2017 SetupRserverforusewithSAPAnalyticsCloud|SAPBlogs

Firststepistofindtheversionofgcccorrespondingto
yourLinuxversion.Tofindyourversionofgcc:

OpenthefollowingURLinabrowserwindow:
http://download.opensuse.org/repositories/devel:/g
cc/

MakenoteoftheentrythatmatchesLinux
versionyouareusing.Inmycase,theversionof
SuseisSLE12.
Runthecommandsbelowoneatatime.
Substitute<version>withyourLinuxversion.

zypperar
http://download.opensuse.org/repositories/devel:/gc
c/<version>/develgcc

Ifpromptedtotrustthekey,chooseoptiona

https://blogs.sap.com/2017/05/17/setuprserverforusewithsapanalyticscloud/ 3/14
5/18/2017 SetupRserverforusewithSAPAnalyticsCloud|SAPBlogs

Note:Ifthereareanyerrorpromptsliketheonebelow,
chooseoptionitoignoretheerrors.

zypperrefresh

zypperinstallgcc

InstallR

Findyourversionfrom
http://download.opensuse.org/repositories/devel:/l
anguages:/R:/released/

https://blogs.sap.com/2017/05/17/setuprserverforusewithsapanalyticscloud/ 4/14
5/18/2017 SetupRserverforusewithSAPAnalyticsCloud|SAPBlogs

RunthefollowingcommandsinyourLinux
consoleoneatatime.Substitute<version>with
theLinuxversionyouareusing.Inmyexample
the<version>isSLE_12_SP1.

zypperaddrepof
http://download.opensuse.org/repositories/devel:/languag
es:/R:/released/<version>Rbase

zypperinstallRbaseRbasedevel

Installopenssl

RunthefollowingcommandsinLinuxconsole:

zypperinstallopenssl

zypperinstallopenssldevel

Step2:GenerateSSLCertificates

Navigateto/tmporadirectoryofyourchoice.
Runthefollowingcommands:

https://blogs.sap.com/2017/05/17/setuprserverforusewithsapanalyticscloud/ 5/14
5/18/2017 SetupRserverforusewithSAPAnalyticsCloud|SAPBlogs

mkdirRserv
cdRserv
mkdirCA
cdCA
opensslgenrsaoutRserve.key2048
opensslreqnewkeyRserve.keyoutRserve.csr

Note:
WhenyoucreatetheCSRyouwillneedtoentersome
informationforthecertificate,everythingisoptional.

opensslx509reqdays<numdays>inRserve.csr
signkeyRserve.keyoutRserve.crt

Replace<numdays>withthenumberofdaysforeg:
365

SavetheRserve.crtfiletoyourlocalcomputer(or
copyallthetext).Youwillneedtoimportthisfile
inSAPAnalyticsCloudlater.

Step3:InstallandconfigureRServpackage

CreateRServeconfigfile

Maketheworkspacedirectorywhichwillbe
/tmp/Rserv/workspace.

https://blogs.sap.com/2017/05/17/setuprserverforusewithsapanalyticscloud/ 6/14
5/18/2017 SetupRserverforusewithSAPAnalyticsCloud|SAPBlogs

cd/tmp/Rserv
mkdirworkspace

CreateafilecalledRserv.confunder/etc
directoryusingviorothertexteditorwiththe
followingcontents:

workdir/tmp/Rserv/workspace
remoteenable
authrequired
plaintextdisable
port6311
maxsendbuf0
tls.key/tmp/Rserv/CA/Rserve.key
tls.cert/tmp/Rserv/CA/Rserve.crt
tls.port6312
qapdisable6311

Note:Theconfigiscustomizableifdesired.Hereare
whattheoptionsmean:
workdir:directoryfortempfilesinRtobecreatedand
used.
remote:whetheryouneedremoteaccess.Thismustbe
enabletobeusedinSAPAnalyticsCloud
auth:whethertheusername/passwordfieldswillbe
checked.requiredisrecommended
plaintext:useplaintextwhenpassingcredential
information.disableishighlyrecommended
port:defaultportfornonencryptedconnection.Default
is6311.
maxsendbuf:maximumsendbuffersize.0isthedefault
anditmeansunlimited.
tls.key:pathtothekey

https://blogs.sap.com/2017/05/17/setuprserverforusewithsapanalyticscloud/ 7/14
5/18/2017 SetupRserverforusewithSAPAnalyticsCloud|SAPBlogs

tls.cert:pathtothecertificate
tls.port:portforanencryptedconnection

Weuseqapdisabletodisablethenormalunencrypted
port(6311inthiscase).Removethisifyouwanttouseit.

InstallRserve

RuntheRshellusingthecommandbelow:
R
IntheRshellrunthecommandsbelowtoInstall
Rserve
install.packages(Rserve)
q()

Notes:
Runninginstall.packages(Rserve)promptsyouto
choseamirrorfordownload.Choosetheclosest
geographicallocationforbestresults.
Useq()toclosetheRshell

Createsecondaryuser
Itsgoodideatocreateasecondaryuserwithless
privilegestorunRservetominimizethedamagethatcan
bedonebyamalicioususer.

https://blogs.sap.com/2017/05/17/setuprserverforusewithsapanalyticscloud/ 8/14
5/18/2017 SetupRserverforusewithSAPAnalyticsCloud|SAPBlogs

CreateanewLinuxuserandsetthepassword.Wewill
usetheuser/passwordinStep4later.Chooseanythat
youlikebuttheymustbeconsistentwiththefollowed
steps.
AfterclosingtheRshellrunthefollowingcommands:

useradd<someuser>
passwd<someuser>
<createapasswordthroughtheprompts>

Givetheuseraccesstotheworkspacefolder.TorunRin
SAPAnalyticsCloudwerequiresometemporaryfilesto
becreatedsothisuserneedstobeabletowritetothe
workdirectory(ie./tmp/Rserv/workspace)

Runthecommandsbelow:

cd/tmp/Rserv
chownR<someuser>workspace

Wealsowanttorestricttheuserfromaccessingthe
authenticationkeys.Runthecommandbelowtochange
securitysettingonthefolder:

chmodR700CA

WecannowchangeRserveconfigurationsothatthe
commandsexecuteastherestricteduserwejust
created.Runthecommandbelowtogidanduid
numbersfortheuserwecreated.

id<someuser>

https://blogs.sap.com/2017/05/17/setuprserverforusewithsapanalyticscloud/ 9/14
5/18/2017 SetupRserverforusewithSAPAnalyticsCloud|SAPBlogs

Makenoteofthegidanduid(numbers)

Editthe/etc/Rserv.conffileandaddthefollowinglines:
gid<groupID>
uid<userID>

RunthecommandbelowtostartRServe
RCMDRserve

Step4:SetupRserverinSAPAnalyticsCloud

WearenotreadytoconfigureSAPAnalyticsCloudto
usetheRServer.

LogintoSAPAnalyticsCloud
ChooseSystem>>Administrationoption

https://blogs.sap.com/2017/05/17/setuprserverforusewithsapanalyticscloud/ 10/14
5/18/2017 SetupRserverforusewithSAPAnalyticsCloud|SAPBlogs

Edit(penciliconinthetopright)theRServe
configuration:

host:<hosnameorIPaddressofRservermachine>

port:6312

certificate:<pasteyourcertificate(fromstep2),orupload
thesavedcertificatefile>

username:<LinuxuserrunningRServe.Seestep

3>

password:<PasswordforLinuxuserrunningRServe.
Seestep3>

ClickCheckConfigurationtoverifyaconnection
canbemade.

https://blogs.sap.com/2017/05/17/setuprserverforusewithsapanalyticscloud/ 11/14
5/18/2017 SetupRserverforusewithSAPAnalyticsCloud|SAPBlogs

Iftheverificationstepissuccessful,savethe
connection.

Step5:AddadditionalRpackages

Oncetheconnectionissuccessfulwecaninstallthe
additionalRpackagesrequiredforSAPAnalyticsCloud.
SpecificallywewillInstallggplot2,jsonlite,bit64,
data.tablepackages.

IfyouusedSUSE,wehavetoinstallc++,whichis
requiredforggplot2.

Runthecommandbelowtoinstallc++

zypperingccc++

InLinuxconsoletypeRtoruntheRshell.
Typethefollowingcommand:

install.packages(c(ggplot2,jsonlite,bit64,
data.table))

RestartRserveafterinstallingthepackagesusing
thestepsbelow:

psef|grepRserve
kill<pid>(wherepidistheprocessidforRServe)

Run:RCMDRserve

YouarenowreadytoembedyourRvisualizationsin
yourSAPAnalyticsCloudstory.

Q&A

Q:WheredoIinstallRServerInstalled?

https://blogs.sap.com/2017/05/17/setuprserverforusewithsapanalyticscloud/ 12/14
5/18/2017 SetupRserverforusewithSAPAnalyticsCloud|SAPBlogs

A:TheRServercanbeinstalledonpremiseorinthe
cloud(AWS,Azureetc).Ifitsinstalledonpremise,theR
Serverport(6312inmycase)mustbeexposedto
internetsothatSAPAnalyticsCloudcanconnecttoit.

Q:CanIinstalltheserverinWindowsinsteadof
Linux?

A:AtthemomentonRServerdeployedonLinuxis
supported.WhiletechnicallyWindowsinstallationis
possibleandmaywork,wehaventtestedthis
configurationinternally.

Q:WillSAPprovideahostedRServer?

A:SAPdoesntprovideahostedRServer.Wemaylook
toprovidethisinthefuture.

Q:CanIchooseotherflavorsofLinuxordoesthe
installhavetobeonSuse?

A:Yes,youcanchooseotherLinuxflavorslikeRedhator
Ubuntu.Iwillupdatetheblogwithdetailedstepsto
installontheseLinuxdistributionsatlatertime.

Q:WhatversionsofRaresupported?

A:Seetablebelowforsupportedversions

Q:WhatRpackagesaresupported?

https://blogs.sap.com/2017/05/17/setuprserverforusewithsapanalyticscloud/ 13/14
5/18/2017 SetupRserverforusewithSAPAnalyticsCloud|SAPBlogs

A:WesupportRpackagesthatoutputinsvgorpng
format.Otheroutputtypes(eg.html)arenotsupported.

AlertModerator

Bethefirsttoleaveacomment

AddComment

Share&Follow
Privacy TermsofUse LegalDisclosure Copyright Trademark Sitemap Newsletter

https://blogs.sap.com/2017/05/17/setuprserverforusewithsapanalyticscloud/ 14/14

Вам также может понравиться