CANVAS LMS开源系统



Canvas LMS初窥

Git

You can install Giton Debian/Ubuntu by running

$ sudo apt-get install git-core

Once you have a copy of Git installed on your system,getting the latest source for Canvas is as simple as checking out code from therepo, like so:

~$ git clone https://github.com/instructure/canvas-lms.git canvas

~$ cd canvas

~/canvas$ git checkout --track -b stable origin/stable

 

Docker

==========CanvasLMS 也有docker file了,那岂不是docker一下是最快的方式

ROM ruby:2.1

 

ENV DEBIAN_FRONTEND noninteractive

 

RUN curl -sLhttps://deb.nodesource.com/setup | bash -

RUN apt-get update -qq \

 && apt-get install -qqy \

      locales \

      nodejs \

      postgresql-client \

      libxmlsec1-dev \

 && rm -rf /var/lib/apt/lists/*

 

# Ensure UTF-8 locale

RUN echo en_US.UTF-8 UTF-8 >>/etc/locale.gen

RUN locale-gen en_US.UTF-8

ENV LANG       en_US.UTF-8

ENV LC_ALL     en_US.UTF-8

RUN dpkg-reconfigure locales

 

# Canvas requiresbundler 1.7.10  

//什么是Bundler

  Canvas uses Bundler as an additional layeron top of Ruby Gems to manage versioned dependencies. Bundler is great!

//

RUN gem uninstall bundler \

 && gem install bundler -v 1.7.10

 

RUN mkdir /app

WORKDIR /app

 

RUN mkdir /home/docker \

 && useradd -d /home/docker docker \

 && chown -R docker:docker /home/docker/usr/local/bundle

 

Core components(不涉及部署,可同一个机器)

 

部署过程逆向,从底向上:

Starting PostgreSQL 9.3 databaseserver  如果你安装的postsql在别的服务器,要配置下postgresql.conf / pg_hba.conf

在数据库中createuser创建默认用户canvas,然后createdb安装默认数据库

把当前系统用户加到数据库的超级用户

sudo -u postgres createuser $USER

sudo -u postgres psql -c "alter user $USER with superuser"postgres

 

安装代码

应用程序目录结构

 

 

RUBY

$ sudo apt-get install ruby2.1 ruby2.1-devzlib1g-dev libxml2-dev \

                       libsqlite3-devpostgresql libpq-dev \

                       libxmlsec1-dev curl make g++

 

Node.js

$ curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -

$ sudo apt-get install nodejs

APAChe web

 

Note: Some users have found that, to setup the web server, they need to addthe Phusion Passenger APT repository, which contains the passenger-common1.9.1 package, and then to install passenger, which replaces passenger-common1.9.1. After adding the new APT repository, theinstall command looks like this:

Ruby Package

sudo apt-get install rubygems

安装之后还是失败Gem找不到

root@server-zyq9z8tu:/var/canvas/lib# gem

The program 'gem' can be found in thefollowing packages:

 *ruby

 *rubygems

Try: apt-get install <selectedpackage>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值