Install Moodle on Linux Mint 19.1

Install Moodle on Linux Mint 19.1

by John Bonner -
Number of replies: 9

I haven't installed Moodle for quite a number of years and recently tried to do a test install on a Linux Mint (19.1) laptop.
I have Apache2 working and also php, phpmyadmin, mysql and a moodledata folder.

I notice that the default location for the Moodle directory is now '/usr/share/moodle' (instead of the older location '/var/www/html/moodle').

Can someone tell me how to configure moodle so that I can start it via localhost or other method?

I tried copying/moving the moodle  folder to the old location but get error messages.

I also tried creating a symbolic link in /var/www/html to the new location but get message [Fatal error: Cannot use 'object' as class name as it is reserved in /usr/share/moodle/lib/setuplib.php on line 66]. Somewhere suggested downgrading php from 7.2. to 7.1.13 but I struggled with this.

Is there a documentation with steps to install Moodle on this distro? Sorry if I've been unable to see it (even for Debian or Ubuntu).

Any help welcome.

JB

Average of ratings: -
In reply to John Bonner

Re: Install Moodle on Linux Mint 19.1

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Moodle doesn't have a 'default location'. It's located wherever you unzip the files.

Mint is just Ubuntu so the default root directory for Apache is still /var/www/html (as you say). Download Moodle and unzip it there (see the Installation instructions)
In reply to Howard Miller

Re: Install Moodle on Linux Mint 19.1

by John Bonner -

Thank you for your advice. I had installed Moodle using what seemed the easy/lazy ways: 1. via the 'Software Manager'; 2. via shell: apt install moodle. Both methods placed the moodle folder in /usr/share/ with one moodle folder placed in /etc (which contained only the 3 config files - apache.conf, apache.vhost.conf and config.php.

I'll uninstall moodle via shell and try to install the old way and see what happens.

Thanks,

JB

In reply to Howard Miller

Re: Install Moodle on Linux Mint 19.1

by John Bonner -

Thank you again. I removed the Linux Mint packaged (version) and managed to install and get it working perfectly in /var/www/html using the usual downloaded package from Moodle.org.

JB


In reply to John Bonner

Re: Install Moodle on Linux Mint 19.1

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
That's a *much* better idea. Glad to hear you got it working!

The people who write these packages try to bend Moodle into the way Debian organised packages. It's not meant to work like that and it makes it very hard to support. Often upgrading doesn't work properly at all.
In reply to John Bonner

Re: Install Moodle on Linux Mint 19.1

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Mint, as a Debian derivative, pretty generic. You can translate the instructions in https://docs.moodle.org/en/Installation_quick_guide to match the distro.

More complicated is the upward march of PHP from 5.6 to 7.0 and then 7.2. Study the release notes, which can be reached from https://docs.moodle.org/dev/Releases.
Average of ratings: Useful (1)
In reply to Visvanath Ratnaweera

Re: Install Moodle on Linux Mint 19.1

by John Bonner -
Thank you. When I removed the package, downloaded the latest version from moodle.org and installed it in /var/www/html I got it working perfectly. Php7.2 doesn't cause a problem now. I'll look at release notes later.

Thanks again,
JB
In reply to John Bonner

Re: Install Moodle on Linux Mint 19.1

by Ken Task -
Picture of Particularly helpful Moodlers

Are you attempting to install using Mint package manager rather than following Moodle docs for installation?

Suggest checking out:

https://docs.moodle.org/37/en/Git_for_Administrators

Also ... is this moodle to be accessed by other machines on whatever network your laptop is connected?

Does your laptop participate in DHCP?

Will you be attempting to use the Moodle from different networks?

'SoS', Ken

In reply to Ken Task

Re: Install Moodle on Linux Mint 19.1

by John Bonner -
Thank you.
Yes, I was using the version installed via 'Software Manager' and/or via shell. [I didn't try 'Package Manager' which I assume gives the same install version and location). I removed that version, downloaded and installed it from Moodle.org. It's now working perfectly.

I'll check out 'Git' later as it's new to me. I haven't used Moodle for a few years.
The laptop install is just a private test/trial install to see what the latest Moodle looks like. It's not connected to our network.
Our school is currently only using 'Office365', 'Team's etc. but I hope to setup Moodle as a 2nd system on our network or a networked desktop PC on a trial basis.
Thanks again,
JB