Install Moodle on NS7

howto
moodle
v7

(Markus Neuberger) #61

I used @areguera’s nethserver-moodle and modified it to support Moodle 3.4 so you may try this module:

yum install https://smart-ict.services/mirror/mrmarkuz/7/noarch/nethserver-moodle-0.1.0-1.1.gb1407b2.ns7.noarch.rpm

To avoid problems rm old moodle dirs and configs and mysql -e "drop database moodle;" before installation.

EDIT:

Download is available in the wiki now:

https://wiki.nethserver.org/doku.php?id=moodle34


(Stéphane de Labrusse) #62

I tested (long time ago) to authenticate following ldap or sambaAD for moodle, I don’t know if you did it, this is the commit


(Rob Bosch) #63

Still running into php version problems. After installing from your repo, I go to https://server/moodle and get this line:

Moodle 3.4 or later requires at least PHP 7.0.0 (currently using version 5.6.25). Some servers may have multiple PHP versions installed, are you using the correct executable?

I did restart apache/httpd…


(Markus Neuberger) #64

Please check if port 9000 is open:

netstat -tlpn | grep fpm

Could you check in your /etc/httpd/conf.d/moodle.conf if the right port is defined?

SetHandler "proxy:fcgi://127.0.0.1:9000"

You may try to restart php71-fpm

systemctl restart rh-php71-php-fpm

EDIT:

I could reproduce it with installing nextcloud12 and moodle, it seems both php packages use port 9000:

systemctl stop rh-php56-php-fpm
systemctl start rh-php71-php-fpm

(Rob Bosch) #65

That did the trick for me: stop php56-php-fpm and start php71-php-fpm
Can there be a check during install if a ‘wrong’ version of php is active?


(Markus Neuberger) #66

Yes, this could be made. I could restart the services and check if and where php71 is running.

Actually we have two possibilities for php71:

  • nethserver-php-scl with php71-php-fpm opens port 9071 for php71
  • rh-php71-php-fpm open port 9000 for php71

I decided to use the epel based packages because it’s easier to integrate (no need for external repo).

Please try if it works after a reboot. I am afraid it depends on which service opens the port first now.


(Rob Bosch) #67

After reboot I was able to log in moodle…
Just a minor thing. This is probably a moodle config issue, but moodle is available from https://servername.domain.tld/moodle
It would be nice if it could be https://domain.tld/moodle


(Markus Neuberger) #68

To change it you may set the moodle host property:

config setprop moodle host domain.tld
signal-event nethserver-moodle-update

(Rob Bosch) #69

One more thing: I tried to upload a course. But upload_max_filesize is set to 2M, which is too small.
Where do I find the correct php.ini? scl settings don’t seem to have any influence


(Markus Neuberger) #70

It’s in /etc/opt/rh/rh-php71/php.ini

Don’t forget to systemctl restart rh-php71-php-fpm after the changes.

Please tell me your php adjustments to set it in the module as default.


(Rob Bosch) #71

changed upload_max_filesize = 2M
to
upload_max_filesize = 50M

I successfully restored a backup from my old moodle server… :smiley:

I do have to stop version 56 and start version 71 after each reboot…


(Markus Neuberger) #72

Thanks for testing! I’ll wait some time, maybe we need some more default settings and then I’ll update the package.


(Markus Neuberger) #73

You have two possibilities:

  • Upgrade to Nextcloud 13 which installs nethserver-rh-php71-fpm.
  • Disable rh-php56-php-fpm and enable rh-php71-php-fpm for moodle, it should work for Nextcloud 12 too:
config setprop rh-php56-php-fpm status disabled
signal-event runlevel-adjust
systemctl enable rh-php71-php-fpm

(Rob Bosch) #74

pinging @mrmarkuz
I just received an email about a plugin update for Moodle: Own/nextcloud integration. ME GUSTA!
https://docs.moodle.org/35/en/ownCloud_Repository