In this tutorial, we will be guiding you through the steps on how to install edX on EndeavourOS Latest. edX is an online learning platform that offers free online courses and classes from the world’s best universities and institutions. Before proceeding with the installation process, ensure that you have administrative privileges on your system.
First, we need to ensure that your system is up-to-date by executing the following command on your terminal:
sudo pacman -Syu
After updating your system, it's time to install the required dependencies for edX by executing the command:
sudo pacman -S git python-pip npm virtualenv uwsgi gcc g++ clang
Next, we will clone the whole edX repository using the following command:
git clone https://github.com/edx/edx-platform.git /edx/app/edxapp/edx-platform
After cloning the edX repository, we need to create a virtual environment that will isolate the installation of Python packages. Execute the following commands:
cd /edx/app/edxapp/edx-platform
sudo virtualenv -p /usr/bin/python2.7 .
source ./bin/activate
With the virtual environment activated, we can now proceed with the installation of the Python dependencies using the following command:
pip install -r requirements/edx/base.txt
After installing the Python dependencies, we need to install JavaScript dependencies using npm package manager by executing the command:
npm install -g bower
sudo -H -u edxapp bash -c "cd /edx/app/edxapp/edx-platform && /edx/bin/pip.edxapp install -r requirements/edx/all.txt &&\
/edx/app/edxapp/edx-platform/node_modules/bower/bin/bower install --allow-root"
Next, you need to create a configuration file called lms.env.json
by copying and modifying the lms.env.json.sample
file:
sudo cp /edx/app/edxapp/edx-platform/lms.env.json.sample /edx/app/edxapp/edx-platform/lms.env.json
Next, modify lms.env.json
by replacing the following placeholder values :
{LMS_BASE}
with localhost
.{ENVIRONMENT}
with sandbox
.{CMS_BASE}
with lms.{yourdomain}.com
.After creating the configuration file, we need to create another configuration file called lms.auth.json
by copying and modifying the lms.auth.json.template
file:
sudo cp /edx/app/edxapp/edx-platform/auth/lms.auth.json.template /edx/app/edxapp/edx-platform/auth/lms.auth.json
sudo chown edxapp:edxapp /edx/app/edxapp/edx-platform/auth/lms.auth.json
After that, replace the text of the lms.auth.json
file with the following values:
{
"LMS_ROOT_URL": "http://{LMS_BASE}:8000",
"USE_CUSTOM_AUTH_BACKEND": true,
"CUSTOM_BACKEND_CLASS": "common.djangoapps.third_party_auth.auth_backends.EdxOrgOAuth2",
"OAUTH_DISCOVERY_URL": "https://auth.edx.org",
"OAUTH_CLIENT_ID": "your-client-id",
"OAUTH_CLIENT_SECRET": "your-client-secret",
"OAUTH_AUTHORIZE_URL": "https://auth.edx.org/oauth2/v1/authorize",
"OAUTH_ACCESS_TOKEN_URL": "https://auth.edx.org/oauth2/v1/access_token",
"OAUTH_EXTRA_SCOPE": "user",
"OPEN_EDX_SSO_LOGIN_ENABLED": false
}
Replace LMS_BASE
, OAUTH_CLIENT_ID
, and OAUTH_CLIENT_SECRET
with your own configuration.
After creating the application configuration, it's now time to migrate the database by executing the following commands:
sudo -u edxapp /edx/bin/python.edxapp /edx/app/edxapp/edx-platform/manage.py lms makemigrations --settings=aws
sudo -u edxapp /edx/bin/python.edxapp /edx/app/edxapp/edx-platform/manage.py lms migrate --settings=aws
Next, we need to collect the static files using the following command:
sudo -u edxapp /edx/bin/python.edxapp /edx/app/edxapp/edx-platform/manage.py lms collectstatic --noinput --settings=aws
Finally, we can start the server using the following command:
sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf restart edxapp:
Congrats! edX installation on EndeavourOS is now complete. You can now access your edX instance by navigating to http://localhost:8000.
It's essential to note that this tutorial is just the basics to get started with edX on EndeavourOS. It's recommended to check the edX documentation for more information on how to set up and configure a fully functional edX instance.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!