How to Install edX on Arch Linux
Introduction
edX is a popular online learning platform that offers online courses from top universities and institutions worldwide. In this tutorial, we are going to learn how to install and run edX on Arch Linux.
System Requirements
Before you start, ensure that your system meets the following requirements:
- Arch Linux Operating System (64-bit)
- At least 8GB of RAM
- At least 40GB of free disk space
- Python 3.5 and pip3
Installing the Dependencies
To install the package required by edX, run the following commands in the terminal:
$ sudo pacman -S gcc nodejs npm mongodb redis openssl
Installing Python and PIP3
To install Python3 and pip3, you can run the following command:
$ sudo pacman -S python python-pip
Cloning the Open edX Repo
Next, we need to clone the Open edX Git repository. You can do this using the following commands:
$ git clone https://github.com/edx/edx-platform
$ cd edx-platform
Installing the Required Python Libraries
Run the following command to install the required Python libraries:
$ pip3 install -r requirements/edx/base.txt
$ pip3 install -r requirements/edx/github.txt
Setting up MongoDB
Now we need to set up MongoDB. Follow these steps:
Step 1: Start the MongoDB service:
$ sudo systemctl start mongodb
Step 2: Add the MongoDB service to the system startup:
$ sudo systemctl enable mongodb
Setting up Redis
Next, we need to install and set up Redis. Follow these steps:
Step 1: Install Redis using the following command:
$ sudo pacman -S redis
Step 2: Start the Redis service:
$ sudo systemctl start redis
Step 3: Add the Redis service to the system startup:
$ sudo systemctl enable redis
Configuring LMS and Studio
Now we need to configure LMS and Studio. Follow these steps:
Step 1: Create the following files in edx-platform folder and add the following content:
lms.env.json:
{
"ENABLE_NOTIFICATIONS": false,
"PREVIEW_LMS_BASE": "http://localhost:8000",
"PREVIEW_LMS_COURSE_ID": "course-v1:edX+DemoX+Demo_Course",
"PREVIEW_LMS_USER_ID": "[email protected]",
"PREVIEW_PASSWORD": "password",
"PREVIEW_USERNAME": "[email protected]",
"RELEASE_BRANCH": null,
"WEBSERVER_WORKERS": 2,
"WSGI_WORKERS": 2,
"PORT": 8000,
"MKTG_URL_LINK": "",
"MKTG_URL_TEXT": "",
"SPARKPOST_API_KEY": null,
"SSL": false,
"FORCE_SCRIPT_NAME": "",
"OSQA_DEFAULT_SKIN": "edX",
"ENABLE_COMPREHENSIVE_THEMING": true,
"THEME_NAME": "edx",
"CONTACT_EMAIL": "[email protected]",
"SECURE_PROXY_SSL_HEADER": null,
"DEFAULT_FROM_EMAIL": "[email protected]",
"SERVER_EMAIL": "[email protected]",
"BYPASS_SERVICE_VOLUMES": true,
"EDXAPP_DEBUG": true,
"EDXAPP_XQUEUE_URL": "http://localhost:8005",
"EDX_MEDIA_ROOT": "/edx/var/edxapp/media/",
"EDX_PLATFORM_VERSION": "release",
"EDX_PLATFORM_REPOSITORY": "git://github.com/edx/edx-platform.git",
"EDXAPP_PLATFORM_NAME": "open_edx",
"LMS_ROOT_URL": "http://localhost:8000",
"EDXAPP_LMS_BASE": "http://localhost:8000",
"EDXAPP_LMS_ROOT_URL_SCHEME": "http",
"EDXAPP_LOGIN_BASE": "/login",
"EDXAPP_COURSE_URL_NAME": "course",
"EDXAPP_ADMIN_API_KEY": "",
"COMPONENTSTORE_STORE_PATH": "/edx/var/edxapp/component_store",
"FEATURES": {
"ENABLE_DISCUSSION_SERVICE": false,
"ENABLE_TUTORIALS": false,
"ENABLE_EXPERT_SEARCH": false,
"ENABLE_CSRF_PROTECTION": false,
"ENABLE_COMBINED_LOGIN_REGISTRATION": false
}
}
cms.env.json:
{
"RELEASE_BRANCH": null,
"ENABLE_COMPREHENSIVE_THEMING": true,
"THEME_NAME": "edx",
"ENABLE_NOTIFICATIONS": false,
"PORT": 8001,
"WEBSERVER_WORKERS": 2,
"WSGI_WORKERS": 2,
"BYPASS_SERVICE_VOLUMES": true,
"EDXAPP_XQUEUE_URL": "http://localhost:8005",
"EDX_MEDIA_ROOT": "/edx/var/edxapp/media/",
"EDX_PLATFORM_VERSION": "release",
"EDX_PLATFORM_REPOSITORY": "git://github.com/edx/edx-platform.git",
"EDXAPP_PLATFORM_NAME": "open_edx",
"CMS_ROOT_URL": "http://localhost:8001",
"EDXAPP_CMS_BASE": "http://localhost:8001",
"EDXAPP_CMS_ROOT_URL_SCHEME": "http",
"EDXAPP_CMS_URL_NAME": "cms",
"REGISTRATION_EXTENSION_FORMS": [],
"CONTACT_EMAIL": "[email protected]",
"SECURE_PROXY_SSL_HEADER": null,
"DEFAULT_FROM_EMAIL": "[email protected]",
"SERVER_EMAIL": "[email protected]",
"SPARKPOST_API_KEY": null
}
Step 2: Run the following command to create a LMS database:
$ cd /edx-platform
$ sudo -u postgres createdb edxapp
$ paver update_db
Step 3: Start the LMS and CMS servers:
$ screen
$ source /edx/app/edxapp/edxapp_env
$ cd /edx/app/edxapp/edx-platform
$ python3 ./manage.py cms runserver 0.0.0.0:8001
Press CTRL+A then D to detach the screen.
On another screen, run:
$ screen
$ source /edx/app/edxapp/edxapp_env
$ cd /edx/app/edxapp/edx-platform
$ python3 ./manage.py lms runserver 0.0.0.0:8000
Press CTRL+A then D to detach the screen.
You can now access eDX on your browser by navigating to http://localhost:8000/.
Conclusion
That's it! You have successfully installed edX on your Arch Linux system. You can now start creating online courses and taking online courses on this platform.