Installing Moodle with Jitsi on Ubuntu 18.04

Installing Moodle with Jitsi on Ubuntu 18.04

by Christopher Garwood -
Number of replies: 31

Greetings Everyone,

I am trying to set this up for the first time so I would appreciate a little patience. So I am setting this up with Jitsi to help some teachers in my country and I am trying to get it done on a Digital Ocean Droplet with Ubuntu 18.04. So far I am noticing that all the ways that I have found to download the most recent stable version of Moodle and I keep getting errors.

I am following this tutorial (as it seems to be fairly complete) - https://websiteforstudents.com/how-to-install-moodle-with-apache2-and-lets-encrypt-on-ubuntu-18-04-16-04/ but when I am trying to download Moodle_38_stable I am not getting a .tgz. In fact I tend to get page not found.

I there anyone willing to help a lost sheep by pointing to the right command necessary for the download of Moodle 38?

Average of ratings: -
In reply to Christopher Garwood

Re: Installing Moodle with Jitsi on Ubuntu 18.04

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
In reply to Visvanath Ratnaweera

Re: Installing Moodle with Jitsi on Ubuntu 18.04

by Christopher Garwood -

Thanks for the response. I have seen that and found this as well https://websiteforstudents.com/how-to-install-moodle-with-apache2-and-lets-encrypt-on-ubuntu-18-04-16-04/

The guide I found is supposed to end up with a secure site which is better for todays internet. However, I notice that after I have follow the guide to the download Moodle point where I entered this command

git clone -b MOODLE_38_STABLE git://git.moodle.org/moodle.git mydomainname.com 

and (the file seems to have downloaded)  then this command

mv moodle /var/www/html/ 

I get this error mv: cannot stat 'moodle': No such file or directory

What am I doing wrong?


In reply to Christopher Garwood

Re: Installing Moodle with Jitsi on Ubuntu 18.04

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators

There is a reason why the community here maintain Moodle docs. We can't explain random pages from the zillions in the web. For Git, see https://docs.moodle.org/38/en/Git_for_Administrators#Obtaining_the_code_from_Git.

In reply to Visvanath Ratnaweera

Re: Installing Moodle with Jitsi on Ubuntu 18.04

by Christopher Garwood -

While I can respect the fact that the community maintains Moodle docs, there are two considerations that came up with what is there. Firstly, there was a problem with the procedure covered in your doc.  Secondly, the doc did not go as far as HTTPS, which is the lead reason why we went with this guide.

In reply to Christopher Garwood

Re: Installing Moodle with Jitsi on Ubuntu 18.04

by James Steerpike -

I think that is a valid point. While the docs cannot provide details of every provider, approved instructions for creating a secure LAMP stack using the commandline would be useful.

Most of the install problems I see on this thread are related to strange choices in hard and software or poor server configuration.

In reply to Christopher Garwood

Re: Installing Moodle with Jitsi on Ubuntu 18.04

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators

Could you tell us what the problem with procedure was? So that we can correct it for the next person.

The Moodle Docs for the HTTPS story is https://docs.moodle.org/en/Transitioning_to_HTTPS.

In reply to Visvanath Ratnaweera

Re: Installing Moodle with Jitsi on Ubuntu 18.04

by James Steerpike -
If the server is set to https before Moodle is installed, the transition (and the many problems people have in updating references) is not required.
The Step by Step Guide simply says "Install Ubuntu". No mention of a firewall, non root users or a https connection. Any wonder would be installers turn to random web pages to cover what is missing?
What is required is a best practice guide to setting up a Linux VPS.
In reply to James Steerpike

Re: Installing Moodle with Jitsi on Ubuntu 18.04

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
It's notoriously difficult because stuff keeps changing (significantly) between versions. Somebody has to keep on top of it. Also it's very (to use a trendy word) "opinionated". Different people do things in different ways. I don't think we are here to teach people Ubuntu. That's too big an ask.

I have a different view - go and learn some Linux basics, then install Moodle. It sounds a bit heartless but I think it pays off in the end.
Average of ratings: Useful (1)
In reply to Howard Miller

Re: Installing Moodle with Jitsi on Ubuntu 18.04

by James Steerpike -
The basics of a secure Linux install will change very little. (sudo, firewall, ssh keys, encryption), Getting it right will save many problems down the line. Case in point. Another thread today is having problems with https. Lots of advice. The whole problem could have been avoided if the https domain name was entered on the original install. We cover the whole process of Lets Encrypt in another doc - but don't tell new installers to do this before installing Moodle. Proverbial ambulance under the cliff.
One page would cover it.
In reply to James Steerpike

Re: Installing Moodle with Jitsi on Ubuntu 18.04

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Ok - now go and Google the opinions on whether Let's Encrypt is *actually* secure. I'm not getting into that debate, I'm just pointing out that saying to people "Here are the steps to get SSL installed" may not always provide the solution that they need.

There's lots we could do better, granted, but if you're installing a server application then to a greater or lesser degree you have become a server administrator. And that has some baggage.
Average of ratings: Useful (1)
In reply to Howard Miller

Re: Installing Moodle with Jitsi on Ubuntu 18.04

by James Steerpike -
How many of today's threads on this forum would not be there if the person knew how to configure a server first? Isn't that a reason to look at our documentation?

Https but still insecure?
Setup for a Beginner Willing to Learn
Moodle installation in cpanel
Can't get through the installation process! Problem with admin account setup

From the top 5.
In reply to James Steerpike

Re: Installing Moodle with Jitsi on Ubuntu 18.04

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Well.. the documentation is a Wiki. Any volunteers?

It - at least - might save us typing the same thing over and over if we can just point at (correct and up to date) documentation.

Although... I would start by looking to see what is out there already for setting up LAMP on Ubuntu/CentOS. I can't help thinking that getting into Linux basics is going to be mostly duplication.
In reply to James Steerpike

Re: Installing Moodle with Jitsi on Ubuntu 18.04

by Ken Task -
Picture of Particularly helpful Moodlers

Your point is valid ... but to a 'point' also.

Oft stated ... 'one ... doesn't apply to all' ... is true.

Since this posting was about getting a site under TLS ... a couple of situations that fall into 'other' and could apply to many admins of Moodles struggling with getting site to use https.  (I do agree that it should be a step before the actual install of Moodle!)

OVH using Plesk ... very popular in Europe as I understand it ... does allow customers to chose to use LetsEncrypt, but they have a 'warning box' that deters it's use.  And from what I re-call, took 24 hours to apply!

Some corps have policies that restrict acquisition of certs to one commercial CA and not all CA's provide same way.  Best to find official documentation from CA to apply - GoDaddy isn't Entrust.

So whatever Moodle docs there are concerning this would have to have attention getting 'catch 22 warnings' - RED and in CAPS? There are exceptions! (what does that mean?) sad

No docs from provider actually get into depth but equally important ... protcols and ciphers used in config of SSL/TLS on server.

Might want check what you have using: https://www.ssllabs.com/ssltest/

Now that's a level of server admin/config that will render one speechless and with a headache! smile

'SoS', Ken


In reply to Ken Task

Re: Installing Moodle with Jitsi on Ubuntu 18.04

by Christopher Garwood -

The fact that my post has generated this much positive discussion is in my humble opinion, a step in the right direction. Apart from my need for this platform to work for some teachers is only a small part of what I aim to do. The greater part is to be able to create a guide that really works so that those who come after can benefit.

So now that I have fixed the Lets Encrypt issue and started walking through the browser side of the installation, I am now at the point where the user & login credentials for the database are required. However, when I enter what was put in during the setup, I am getting this error -

Error: Database connection failed

It is possible that the database is overloaded or otherwise not running properly.

The site administrator should also check that the database details have been correctly specified in config.php



Warning: mysqli::__construct(): (HY000/1045): Access denied for user 'learner'@'localhost' (using password: YES) in /var/www/html/caribsis.com/lib/dml/mysqli_native_moodle_database.php on line 79

From what I have read in searches, it might be related to a config.php file which I am not seeing in the folder (and it might not even exist until after the installation process is completed). Can I ask for some guidance on solving this issue?

In reply to Christopher Garwood

Re: Installing Moodle with Jitsi on Ubuntu 18.04

by Christopher Garwood -

I have been doing some reading in an effort to resolve the above issue so I can move on, however, I would really appreciate some clarification on some of what I am reading and a little help to fix the problem.

Firstly, some of the material I have read suggests the issue may be related to a config.php file in the moodle directory. Interestingly, that particular file does not exist until after the installation is completed. What I find really strange about the information is that it suggests that (in addition to that file), the user and database that was required during the procedure are only going to work if the software is being accessed directly on the machine on which it is installed. A different set of credentials (& perhaps another database) needs to be created if the software is to be used over a LAN and something different if it going to be accessed over the internet. Would someone please take a few lines in a post to clarify for me why none of this was pointed out in any of the documentation (including Moodle docs) and what was the purpose of creating the database and user during the MySQL install?

Secondly, I had a look at the file specified in the error and the actual line reads -

        $conn = new mysqli($dbhost, $dbuser, $dbpass, '', $dbport, $dbsocket); // Connect without db
Are there any changes that should be made to this so that access to the created user would be able to access the created database?

Generally, I have been getting a number of calls from frustrated teachers who need an alternative to what they are being told to use by the Education Board in my country. It honestly is crap and they want to see if this is a better option (which I know it is). As such I am asking that those who know how to set up this platform give a hand. I can be beneficial to the entire community.

In reply to Christopher Garwood

Re: Installing Moodle with Jitsi on Ubuntu 18.04

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators

Hi

You wrote:

some of the material I have read suggests the issue may be related to a config.php file in the moodle directory. Interestingly, that particular file does not exist until after the installation is completed.

Wrong! Please read https://docs.moodle.org/en/Installation_quick_guide.

$conn = new mysqli($dbhost, $dbuser, $dbpass, '', $dbport, $dbsocket); // Connect without db Are there any changes that should be made to this so that access to the created user would be able to access the created database?

You have it backward. We configure the database to fit the code, not the other way!

In reply to Visvanath Ratnaweera

Re: Installing Moodle with Jitsi on Ubuntu 18.04

by Christopher Garwood -

Thanks for the clarification. Given the level of frustration of the teachers that I have been getting calls and messages from, I did some deeper reading and found some information about the creation of users & databases which got me past the error message.

Now I have managed to set up the Admin page and register the project for some newsletters and alerts. When I thought I was doing well, I ran into a new challenge where Firefox is not able to bring up the site and is showing a message about needing to accept cookies. I also tried getting to the site using Microsoft Edge (since Edge accepts everything by default) which only got me to the Login page but after putting in the credentials and clicked the button, it came back saying it is unable to reach the page. Granted when I click the back button in the browser, I am told that I am already logged in as Admin, do I want to login as another user.

May I get some advice on what is happening here and how to fix the issue?

In reply to Christopher Garwood

Re: Installing Moodle with Jitsi on Ubuntu 18.04

by James Steerpike -
Error: Database connection failed
It is possible that the database is overloaded or otherwise not running proper
ly
  • Is the database running?
  • Did you configure a Moodle database?
  • Can you log into MySql with the user name and password you specified?
In reply to Christopher Garwood

Re: Installing Moodle with Jitsi on Ubuntu 18.04

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
...because you extracted it to a folder called 'mydomainname.com' not 'moodle'. The chance you take by typing in commands without knowing what they do wink
In reply to Howard Miller

Re: Installing Moodle with Jitsi on Ubuntu 18.04

by Christopher Garwood -

True words and I have no doubt or make any secret of my ignorance. The simple fact is that I need to help some educators and I believe they should have access to the best.

Now I am hoping that the files extracted to the mydomain.com folder are all that is needed for this to work. If it is so then I would have learned something which reduces my ignorance.

In reply to Christopher Garwood

Re: Installing Moodle with Jitsi on Ubuntu 18.04

by James Steerpike -
Try this
cd /var/www/html (or the place where you gitted)
ls (list)
If you have a file called mydomainname.com
mv mydomainname.com moodle {rename}

ls {list, check,rename}
In reply to Christopher Garwood

Re: Installing Moodle with Jitsi on Ubuntu 18.04

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The git clone command is actually quite simple - a lot of git stuff is not.

'git clone' - get me a copy of the following code repository
'-b MOODLE_38_STABLE' - the repo contains all Moodle versions, switch to this one after the download
'git://git.moodle.org/moodle.git' - the url where the data is coming from
'mydomain.com' - the folder in which you want to put it (I expect they meant you to change that to whatever you needed)
In reply to Christopher Garwood

Re: Installing Moodle with Jitsi on Ubuntu 18.04

by James Steerpike -

There are good instructions on the page you have linked. Don't be embarrassed by mistakes .The path you have chosen is better than most posters. Good choice to encrypt right from the start - something Moodle docs don't cover.


How to Install Moodle with Apache2 and Let’s Encrypt on Ubuntu 18.04 | 16.04


Step 0: Get your Domain Name
Step 1: Install and Configure Moodle (really it is install Apache2 HTTP)
Step 2: Install MariaDB Database Server
Step 3: Install PHP 7.2 and Related Modules
Steps 4 - 6 skip Moodle install  and virtual hosts
Step 7: Install and Configure Let’s Encrypt
Step 8: Obtain Your Free Certificate
Skip the rest

Now go to Step-by-step Installation Guide for Ubuntu  and start on step 3 remembering to change 3.7 to 3.8

About your domain name. Virtual hosts allow one server to service several domains. The Moodle code will be in /var/www/html/moodle for a simple one domain install.




In reply to Christopher Garwood

Re: Installing Moodle with Jitsi on Ubuntu 18.04

by Ken Task -
Picture of Particularly helpful Moodlers

A factor in goal to set up a moodle might chosen 1-click app 'jitsi' which from what I can find, says this:

Jitsi Server Hosting | DigitalOcean Marketplace 1-Click App
https: // marketplace. digitalocean. com/ apps/ jitsi-server

This is a pre-configured image with pre-configured Jitsi and NGINX. Ypu'll only need a domain and we provide scripts for an effortless setup with HTTPS for secure communication for your team.

That's not a typical Ubuntu 18.04 AMP stack for the purpose of Moodle.

Not sure DO offers a marketplace AMP stack for Moodle or not, but that might be the quickest way.   Those 1 clickers do things differently and is generally not advised here in forums ... you will note ... as you already have ... directions for Moodle on moodle.org ... not for Jitsi.

In your defense, however, almost any 'marketplace' offering I've seen sounds good, but when one finally gets into using, no so good.

Our resident expert on DO Droplets and Ubuntu X AMP stacks for Moodle is participating in this discussion/cussion.  Maybe he has the time to take you up on your request to login to your instance.

'SoS' ... NOCLAS ... see profile, Ken

In reply to Ken Task

Re: Installing Moodle with Jitsi on Ubuntu 18.04

by James Steerpike -

When you get a barebones Ubuntu server there are a set of standard installation steps using apt. My understanding is these steps are done for you at DO so the image is quite suitable to use. The configured LAMP stack includes firewall, certbot and fail2ban so a good platform to set up before the Step by Step Ubuntu guide.

Not familiar with Jitsi although I am moving off Zoom as my free unlimited hosting have been cancelled. Some posts from DO indicated on a standard Droplet of 1 cpu and 1 gB ram a two person Jitsi call used 3% and a 3 person call 15% of CPU. Not sure what setup would be required to run both Jitsi and Moodle on the same server.

Busy this long weekend with a free Alibaba Cloud VPS. Chosen Aliyun Linux rather rashly which is based on Centos rather than Ubuntu and setting up Moodle with https and set for git uogrades using pull. I will try to prepare a step by step guide.  Not as  intuitive an interface as DO but a free 12 month trial is too good to ignore.

In reply to James Steerpike

Re: Installing Moodle with Jitsi on Ubuntu 18.04

by Christopher Garwood -

I found this interesting for a few reasons, not the least of which is that I have been registered with DO for a while and I really like the way they have treated me so far.

I had already started using Apache when I heard about the image they had for Jitsi and I didn't follow it through because it wasn't Apache. Granted this is just my personal unwillingness to do things differently.

I will be very interested to see how you work out with CentOS. While I figure Moodle will be comfortable, I have been told that Jitsi is Debian/Ubuntu only. Your results will be more than interesting.

In reply to Ken Task

Re: Installing Moodle with Jitsi on Ubuntu 18.04

by Christopher Garwood -

Ken,

I found out about that Jitsi image on DO after I started doing Moodle with AMP and since it was NGINX I just was not willing to make the switch.

If all factors are equal and my Moodle install goes as planned, then the next step will be the addition of Jitsi for video conferencing (one way or another). I am really hoping both of them and all the other things I am being asked for can work on one server.

Is there anything (docs) in this forum for the install of Jitsi? I would like to compare it to what I might find in the Jitsi Community and elsewhere.

In reply to Christopher Garwood

Re: Installing Moodle with Jitsi on Ubuntu 18.04

by Ken Task -
Picture of Particularly helpful Moodlers

Well, am confused as your first posting specifically mentioned jitsi!

"Is there anything (docs) in this forum for the install of Jitsi?"

Obviously, no.  This forum isn't a 'one-stop-shop' for any/all things.  Never has been! smile

IF providers of Jitsi say they recommend Ubuntu/Debian, trust them!!!  For you, that could mean 2 DO's.  Fine ... best tool for the job.  And for jitsi, use their forums.

'SoS', Ken