简体   繁体   English

ubuntu 16.04上的opencpu云服务器安装指南

[英]opencpu cloud server installation guide on ubuntu 16.04

Would anyone know or like to share their note on installing opencpu cloud server on ubuntu 16.04? 是否有人会知道或想分享他们在ubuntu 16.04上安装opencpu云服务器的说明?

I thought it is easy, but we saw many error here and there when following the instructions. 我以为这很容易,但是按照说明进行操作时,我们会发现很多错误。 I am new to opencpu. 我是opencpu的新手。 And, I don't have much experience on apache and nignx. 而且,我在Apache和Nignx方面经验不足。

Here is the long story: 长话短说:

I created a new and clean ubuntu 16.04 server from microsoft azure vm, and installed opencpu cloud server following: 我从Microsoft azure vm创建了一个新的干净的ubuntu 16.04服务器,并安装了opencpu云服务器,如下所示:

# Requires Ubuntu 14.04 (Trusty) or 16.04 (Xenial)
sudo add-apt-repository -y ppa:opencpu/opencpu-1.6
sudo apt-get update 
sudo apt-get upgrade

# Installs OpenCPU server
sudo apt-get install -y opencpu

The server reported insserv error when running opencpu init script 服务器在运行opencpu初始化脚本时报告了insserv错误

update-rc.d: error: insserv rejected the script header dpkg

We then did some goolge and fix around, we got apache2 running, but when called: 然后,我们进行了一些检查和修复,使apache2运行,但是在调用时:

curl http://localhost/ocpu/info

received 404 error. 收到404错误。

FYI, the single user server runs fine. 仅供参考,单用户服务器运行良好。

The solution we found is that opencpu need mod_R to be turned on from apache2: 我们发现的解决方案是opencpu需要从apache2打开mod_R:

sudo a2enmod R

You need first to change to dir: 您需要先更改为dir:

/etc/apache2/mods-available

And, make sure R.load file exists. 并且,请确保存在R.load文件。

After running a2enmod command, should see a link to R.load (R module) in 运行a2enmod命令后,应该看到指向R.load(R模块)的链接

/etc/apache2/mods-enable

Thank you yg for your question and response .. I had the same problem i try what you have mentioned in your comment but 谢谢yg的问题和答复..我也遇到了同样的问题,我尝试您在评论中提到的内容,但是

curl http://localhost/cpu/info 卷曲http:// localhost / cpu / info

takes along time without no response. 会花费时间而没有任何回应。

Thank you. 谢谢。

I used opencpu 1.5 works without bugs on ubuntu 16.04 我在ubuntu 16.04上使用过opencpu 1.5的作品没有错误

sudo add-apt-repository -y ppa:opencpu/opencpu-1.5 
sudo apt-get update
sudo apt-get upgrade

Install R and then install opencpu 安装R,然后安装opencpu

sudo apt-get install r-base r-base-dev
sudo apt-get install -y opencpu

Also you should probably install Rstudio for IDE access 另外,您可能应该安装Rstudio进行IDE访问

sudo apt-get install rstudio-server

To login to R you'll need to make a new user - follow the prompts 要登录到R,您需要注册一个新用户-按照提示进行操作

sudo adduser myname

Now just to make sure its all working 现在只是要确保其全部正常工作

sudo service opencpu restart
sudo service rstudio-server restart

And try something like to check if its working 并尝试检查其是否工作正常

curl -L -v localhost/ocpu/library/

which should return a list of packages now installed on Ubuntu like this 它应该返回像这样在Ubuntu上安装的软件包列表

Final Screenshot 最终截图

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM