Skip to content

Commit

Permalink
tweaks to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Feb 20, 2020
1 parent 44427d6 commit 6a64cef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 29 deletions.
28 changes: 2 additions & 26 deletions debian/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

*How to build OpenCPU on Debian or Ubuntu*

## Update R (optional, but recommended)
## Prepare: update R (optional, but recommended)

Because `r-base` packages included with Debian/Ubuntu are often old, we first add a repository with a recent version of R. On **Ubuntu** we can use Michael Rutter's [launchpad](https://launchpad.net/~marutter/+archive/ubuntu/rrutter?field.series_filter=trusty) repository:

```sh
sudo add-apt-repository -y ppa:marutter/rrutter
sudo add-apt-repository -y ppa:marutter/rrutter3.5
sudo apt-get update
```

Expand Down Expand Up @@ -76,29 +76,6 @@ curl http://localhost/ocpu/info

This should print some info about the R session.

## Extra: enable AppArmor on older Debians

__Update: If you are using Ubuntu or Debian 10 or newer, AppArmor is enabled by default so you can skip this section.__

OpenCPU uses AppArmor to enforce advanced security policies. AppArmor support is installed by default on Ubuntu, but in Debian we first need to enable it in the kernel. To do so, edit `/etc/default/grub` and add `security=apparmor` to the `GRUB_CMDLINE_LINUX` line. For example it would read:

GRUB_CMDLINE_LINUX="security=apparmor"

Update the grub config and reboot:

sudo update-grub
sudo reboot

After rebooting, install the apparmor packages and verify that it is enabled:

sudo apt-get install apparmor-utils
sudo aa-status

Restart OpenCPU and check the log files to confirm that apparmor works:

sudo service apache2 restart
sudo tail /var/log/apache2/error.log -n30

## OpenCPU caching server (not recommended)

The `opencpu-cache` package is a reverse proxy for caching and load balancing with OpenCPU. When installed, it automatically preroutes all incomming traffic on ports 80 and 443 through nginx. Only install this when you expect serious traffic.
Expand All @@ -111,4 +88,3 @@ The `opencpu-cache` package is a reverse proxy for caching and load balancing wi
sudo dpkg -i opencpu-cache_*.deb

Note that it is possible to install `opencpu-cache` on another server than `opencpu-server` if you update the nginx back-end config accordingly.

6 changes: 3 additions & 3 deletions rpm/buildscript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ mv -f rapache.spec ~/rpmbuild/SPECS/
rpmbuild -ba ~/rpmbuild/SPECS/rapache.spec

# Get opencpu sources
wget https://github.com/opencpu/opencpu-server/archive/v2.0.tar.gz -O opencpu-server-2.0.tar.gz
tar xzvf opencpu-server-2.0.tar.gz opencpu-server-2.0/rpm/opencpu.spec --strip-components 2
mv -f opencpu-server-2.0.tar.gz ~/rpmbuild/SOURCES/
wget https://github.com/opencpu/opencpu-server/archive/v2.1.tar.gz -O opencpu-server-2.0.tar.gz
tar xzvf opencpu-server-2.1.tar.gz opencpu-server-2.1/rpm/opencpu.spec --strip-components 2
mv -f opencpu-server-2.1.tar.gz ~/rpmbuild/SOURCES/
mv -f opencpu.spec ~/rpmbuild/SPECS/

# Builds 'opencpu-server' and 'opencpu-lib' rpm
Expand Down

0 comments on commit 6a64cef

Please sign in to comment.