0

I currently have an OpenCPU application running nicely (in development) under Mac OS X. But before I move it into a full production environment I need to add various security features through an AMP stack. (I need to conditionally paint screens via PHP having referred to a MySQL user registry).

To cut down on future maintenance of that AMP stack I have elected to use Bitnami. The issue I’m having is trying to understand how I can insert the OpenCPU server (and R) within the Bitnami stack. From what I can see the advise given on related questions essentially refer to Linux servers as both “/etc/apache2/sites-available” and “/etc/apache2/mods-available/mod_r.load” do not exist under Mac OS X. This in itself may not be an issue as questions relating to this inequivalence have been answered elsewhere. However, without an appreciation of their content I’m struggling to see how I can progress. I have reviewed the “OpenCPU Server Manual 1.5” etc... but cannot find any clues.

If anyone has managed to have PHP and MySQL running alongside an OpenCPU application (under Mac OS X) or better still under a Bitnami AMP stack I would be very grateful to hear from you!

(Please note I would have added this to the previous question entitled “Install OpenCPU on a Bitnami server” but I don’t have the 50 reputation points needed).

1 Answers1

0

I would strongly recommend to host on a linux server instead. If you are stuck to your Mac hardware, you can use parallels or docker or virtualbox or so to run inside a VM. Anyway...

Don't know about Bitnami, but OpenCPU depends on rapache (aka mod_R) so you first need to install this. See building from source in the rApache manual.

Once mod_R is installed and enabled in apache, you can enable it in your apache2 config. See opencpu.conf for an example. Usually you put it into /etc/apache2/extra/opencpu.conf.

Jeroen Ooms
  • 31,998
  • 35
  • 134
  • 207
  • Many thanks for such a quick reply. I'll report back with my progress. (As a side note, the production environment will have OpenCPU running under Linux Ubuntu). Richard. – Richard Blades Jun 15 '16 at 14:58
  • Jeroen Apologies for not getting back sooner... To keep the R package "pure" I avoided the inclusion of PHP and instead elected to "paint" application screens through a combination of Ajax and secure session cookies. – Richard Blades Jul 25 '16 at 10:00