has many :code_blocks

Random thoughts and postings to keep track of my learning process

Setting up edx-platform on Ubutnu

with 13 comments

These are the instructions to set edx-platform from scratch on Ubuntu. Max time installation should be around 30 minutes. This was done on a virtual box running Ubuntu 12.


Launch an Ubuntu 12.04 server and login to it as a user that has full sudo privileges

Make sure you have pip and git installed:
$ sudo apt-get install -y python-pip git-core

Make sure you have build-essential and python-dev installed. This is sos!:
$ apt-get install -y build-essential python-dev

Install essentials for curl and ssh
$ sudo apt-get install libcurl4-gnutls-dev libexpat1-dev gettext \
libz-dev libssl-dev

Install graph and geolocation libs
$ sudo apt-get install graphviz graphviz-dev libgeos-dev

Install LAPACK, BLAS and ATLAS libs
$ sudo apt-get install libblas-dev libatlas-dev liblapack-dev

Install libxml libs
$ sudo apt-get install libxml2-dev libxslt-dev

Install fortran compiler
$ sudo apt-get install gfortran

Install mysql server client and dev kit
$ sudo apt-get install mysql-server mysql-client libmysqlclient-dev

Install nodejs javascript runtimes, npm and coffee-script
$ sudo apt-get install nodejs npm
$ sudo npm install -g coffee-script

Install python setup tools if not installed
$ sudo pip install setuptools

Install virtual env to run python in “box”
$ sudo pip install virtualenv

Install mongodb for ubuntu

Now login as user and install rvm as user:

$ curl -L https://get.rvm.io | bash -s stable

Enter this to your .profile:
$ source ~/.rvm/scripts/rvm

logout and relogin as user

Install and set ruby 1.9.3-p374 as default with these commands:
$ rvm list known
$ rvm install 1.9.3-p374
$ rvm use 1.9.3-p374 –default

You should have ruby 1.9.3-p374 installed. Check it out with:
$ ruby -v

Now go to your home:

create a folder called “dev” and inside that folder
create a “log” folder, a “data” folder, a “db” folder and an “edx” folder

Download edx-plaform (https://github.com/edx/edx-platform/archive/master.zip)
and extract it inside the “edx” folder

CD into edx folder and create a virtual python variable:

$ virtualenv EDXENV

This will create a folder called EDXENV.

Activate the virtual environment by running:

$ source EDXENV/bin/activate

Now while you are inside the edx folder install:

$ pip install -r requirements/edx/pre.txt
$ pip install -r requirements/edx/base.txt
$ pip install -r requirements/edx/post.txt
$ bundle install

start mongodb database:
$ service mongodb start

Configure database with:

$ ./manage.py lms syncdb –migrate
$ ./manage.py cms syncdb –migrate

Finally run programs:

Learning management system (LMS):

$ rake lms[cms.dev,]

Studio (CMS):

$ rake cms[dev,]


Written by nkartcode

09/10/2013 at 8:50 AM

Posted in Uncategorized

Tagged with , , , ,

13 Responses

Subscribe to comments with RSS.

  1. […] on installing edX platform using this instructions ( https://nkokkos.wordpress.com/2013/10/09/setting-up-edx-platform-on-ubutnu/ ), I followed every step successfully, but on ./manage.py lms syncdb –migrate, I face to this […]

  2. I’m having an issue when it comes to configure the databases, it throws an error: No module named xblock.fields on installing edX platform… Any idea?

    • Hi, I will take a look and will lets you know. From the error message, I assume there must be something wrong with Python path. I will set it up from scratch to see if I get the same message

  3. Hi, I was trying with your ref. it was always failed at ” ./manage.py lms syncdb –migrate” but today when i try with fresh machine it through new error at “pip install -r requirements/edx/base.txt”. i don’t understand what happened with this Here is error :
    Obtaining django-staticfiles from git+https://github.com/edx/django-staticfiles.git@d89aae2a82f2b#egg=django-staticfiles (from -r requirements/edx/github.txt (line 10))
    Updating ./EDXENV/src/django-staticfiles clone (to d89aae2a82f2b)
    Could not find a tag or branch ‘d89aae2a82f2b’, assuming commit.
    Running setup.py (path:/root/dev/edx/EDXENV/src/django-staticfiles/setup.py) egg_info for package django-staticfiles

    warning: no previously-included files matching ‘*.pyc’ found anywhere in distribution
    Installing extra requirements: ‘egg’
    Obtaining django-pipeline from git+https://github.com/edx/django-pipeline.git@88ec8a011e481918fdc9d2682d4017c835acd8be#egg=django-pipeline (from -r requirements/edx/github.txt (line 11))
    Updating ./EDXENV/src/django-pipeline clone (to 88ec8a011e481918fdc9d2682d4017c835acd8be)
    Could not find a tag or branch ’88ec8a011e481918fdc9d2682d4017c835acd8be’, assuming commit.
    Running setup.py (path:/root/dev/edx/EDXENV/src/django-pipeline/setup.py) egg_info for package django-pipeline

    Installing extra requirements: ‘egg’
    Obtaining django-wiki from git+https://github.com/edx/django-wiki.git@41815e2ef1b0323f92900f8e60711b0f0c37766b#egg=django-wiki (from -r requirements/edx/github.txt (line 12))
    Updating ./EDXENV/src/django-wiki clone (to 41815e2ef1b0323f92900f8e60711b0f0c37766b)
    Could not find a tag or branch ‘41815e2ef1b0323f92900f8e60711b0f0c37766b’, assuming commit.
    Running setup.py (path:/root/dev/edx/EDXENV/src/django-wiki/setup.py) egg_info for package django-wiki

    Installing extra requirements: ‘egg’
    Obtaining lettuce from git+https://github.com/gabrielfalcao/lettuce.git@cccc3978ad2df82a78b6f9648fe2e9baddd22f88#egg=lettuce (from -r requirements/edx/github.txt (line 13))
    Updating ./EDXENV/src/lettuce clone (to cccc3978ad2df82a78b6f9648fe2e9baddd22f88)
    Could not find a tag or branch ‘cccc3978ad2df82a78b6f9648fe2e9baddd22f88’, assuming commit.
    Running setup.py (path:/root/dev/edx/EDXENV/src/lettuce/setup.py) egg_info for package lettuce

    Installing extra requirements: ‘egg’
    Obtaining pystache-custom from git+https://github.com/dementrock/pystache_custom.git@776973740bdaad83a3b029f96e415a7d1e8bec2f#egg=pystache_custom-dev (from -r requirements/edx/github.txt (line 14))
    Updating ./EDXENV/src/pystache-custom clone (to 776973740bdaad83a3b029f96e415a7d1e8bec2f)
    Could not find a tag or branch ‘776973740bdaad83a3b029f96e415a7d1e8bec2f’, assuming commit.
    Running setup.py (path:/root/dev/edx/EDXENV/src/pystache-custom/setup.py) egg_info for package pystache-custom

    Installing extra requirements: ‘egg’
    Obtaining zendesk from git+https://github.com/eventbrite/zendesk.git@d53fe0e81b623f084e91776bcf6369f8b7b63879#egg=zendesk (from -r requirements/edx/github.txt (line 15))
    Updating ./EDXENV/src/zendesk clone (to d53fe0e81b623f084e91776bcf6369f8b7b63879)
    Could not find a tag or branch ‘d53fe0e81b623f084e91776bcf6369f8b7b63879’, assuming commit.
    Running setup.py (path:/root/dev/edx/EDXENV/src/zendesk/setup.py) egg_info for package zendesk

    Installing extra requirements: ‘egg’
    Obtaining XBlock from git+https://github.com/edx/XBlock.git@fa88607#egg=XBlock (from -r requirements/edx/github.txt (line 18))
    Updating ./EDXENV/src/xblock clone (to fa88607)
    Could not find a tag or branch ‘fa88607’, assuming commit.
    Running setup.py (path:/root/dev/edx/EDXENV/src/xblock/setup.py) egg_info for package XBlock

    Installing extra requirements: ‘egg’
    Obtaining codejail from git+https://github.com/edx/codejail.git@0a1b468#egg=codejail (from -r requirements/edx/github.txt (line 19))
    Updating ./EDXENV/src/codejail clone (to 0a1b468)
    Could not find a tag or branch ‘0a1b468’, assuming commit.
    Running setup.py (path:/root/dev/edx/EDXENV/src/codejail/setup.py) egg_info for package codejail

    Installing extra requirements: ‘egg’
    Obtaining diff-cover from git+https://github.com/edx/diff-cover.git@v0.2.6#egg=diff_cover (from -r requirements/edx/github.txt (line 20))
    Updating ./EDXENV/src/diff-cover clone (to v0.2.6)
    Running setup.py (path:/root/dev/edx/EDXENV/src/diff-cover/setup.py) egg_info for package diff-cover

    Installing extra requirements: ‘egg’
    Obtaining js-test-tool from git+https://github.com/edx/js-test-tool.git@v0.1.4#egg=js_test_tool (from -r requirements/edx/github.txt (line 21))
    Updating ./EDXENV/src/js-test-tool clone (to v0.1.4)
    Running setup.py (path:/root/dev/edx/EDXENV/src/js-test-tool/setup.py) egg_info for package js-test-tool

    Installing extra requirements: ‘egg’
    Obtaining django-waffle from git+https://github.com/edx/django-waffle.git@823a102e48#egg=django-waffle (from -r requirements/edx/github.txt (line 22))
    Updating ./EDXENV/src/django-waffle clone (to 823a102e48)
    Could not find a tag or branch ‘823a102e48’, assuming commit.
    Running setup.py (path:/root/dev/edx/EDXENV/src/django-waffle/setup.py) egg_info for package django-waffle

    Installing extra requirements: ‘egg’
    Obtaining event-tracking from git+https://github.com/edx/event-tracking.git@f0211d702d#egg=event-tracking (from -r requirements/edx/github.txt (line 23))
    Updating ./EDXENV/src/event-tracking clone (to f0211d702d)
    Could not find a tag or branch ‘f0211d702d’, assuming commit.
    Running setup.py (path:/root/dev/edx/EDXENV/src/event-tracking/setup.py) egg_info for package event-tracking

    Installing extra requirements: ‘egg’
    Obtaining bok-choy from git+https://github.com/edx/bok-choy.git@bc6f1adbe439618162079f1004b2b3db3b6f8916#egg=bok_choy (from -r requirements/edx/github.txt (line 24))
    Updating ./EDXENV/src/bok-choy clone (to bc6f1adbe439618162079f1004b2b3db3b6f8916)
    Could not find a tag or branch ‘bc6f1adbe439618162079f1004b2b3db3b6f8916’, assuming commit.
    Running setup.py (path:/root/dev/edx/EDXENV/src/bok-choy/setup.py) egg_info for package bok-choy

    Installing extra requirements: ‘egg’
    Downloading/unpacking beautifulsoup4==4.1.3 (from -r requirements/edx/base.txt (line 9))
    Could not find a version that satisfies the requirement beautifulsoup4==4.1.3 (from -r requirements/edx/base.txt (line 9)) (from versions: 4.3.2)
    Some externally hosted files were ignored (use –allow-external to allow).
    Cleaning up…
    No distributions matching the version for beautifulsoup4==4.1.3 (from -r requirements/edx/base.txt (line 9))
    Storing debug log for failure in /root/.pip/pip.log

    Please help me..I am stuck…



    06/01/2014 at 10:36 AM

    • try to execute:
      pip install beautifulsoup4
      before you run
      pip install -r /requirements/edx/base.txt
      and report what happens

  4. please run
    npm config set registry http://registry.npmjs.org/
    before running
    sudo npm install -g coffee-script
    will solve the problem


    31/03/2014 at 1:24 PM

  5. when I run this
    ./manage.py cms syncdb –migrate
    gives me an error not a git repository


    02/04/2014 at 9:59 AM

  6. and if i give
    $ git init
    and then run
    $./manage.py cms syncdb –migrate
    gives bad default revision ‘HEAD’


    02/04/2014 at 10:04 AM

  7. after running following commands,
    $ git add “*”
    $git config –global user.email “you@example.com”
    $ git commit -m “Your commit message”
    $ git log

    $./manage.py cms syncdb –migrate

    will solve the errors


    02/04/2014 at 12:17 PM

  8. When I run,

    rake lms[cms.dev,]

    gives error …./runserver.py address:port pair
    command error is not valid port number or address:port pair

    Please help me


    04/04/2014 at 12:13 PM

  9. Eh, I wrote this guide some time ago. How you tried these instructions here?
    The reason I wrote this guide was because I was frustrated at edx official guides. But they seem to have changed by now for the better?

  10. rake lms[cms.dev,8000] and
    rake cms[dev,8001] work fine we need not to give
    Only port address will do
    Now it’s running
    This helps me a lot


    15/04/2014 at 1:20 PM

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: