How to start/stop/flush OpenCPU on CentOS6?

心不动则不痛 提交于 2019-12-06 03:17:20

Some answers

  • Running sudo apachectl restart will do the restart. There is currently no special init or systemd script for opencpu included with the rpm, but basically all that script does on ubuntu is restart apache and print some messages to the terminal.

  • The REnviron file is only for environment variables. You need to use RProfile for custom code. See also help. Maybe it doesn't get loaded in the right environment. Try: load(file, envir = globalenv(), verbose = TRUE).

  • Note that the recommended way to store stuff is by putting it an R package, either as lazyload data or sysdata.rda (see writing R extensions). You can then load or attach the package on startup, or better yet: formally import the dataset from the package that contains your application or R functions.

  • Afaik, centos runs httpd requests as user apache? What makes you think opencpu runs as root? That is certainly not the intention. On CentOS you sometimes need to play around with SELinux httpd flags to get your applications to work, see also the rpm readme.

The rpm packages are a bit more recent and less tested than the debian ones, so if you have problems or suggestions, please open an issue on github.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!