You will need PHP8+ and NodeJS v14+ to run Chamilo 2.
You will need PHP8+ and NodeJS v18+ to run Chamilo 2.
On a fresh Ubuntu 22.04, you can prepare your server by issuing an apt command like the following with sudo (or as root, but not recommended for security reasons):
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
apt update && apt -y install nodejs
~~~~
* Other option to install nodejs is by using NVM (Node Version Manager). You can install it following the instructions [here](https://github.com/nvm-sh/nvm#installing-and-updating).
Then, you can install the node version required. Preferably, the LTS version.
~~~~
sudo nvm install --lts
sudo nvm use --lts
~~~~
With NodeJS installed, you must enable corepack and then continue with the requirements
~~~~
sudo corepack enable
cd ~
# follow the instructions at https://getcomposer.org/download/