I just spent approximately 4 days trying to install Moodle on my Fedora 40 server. moodle-4.3.4-1.fc40.noarch was easily added with Fedora's package system dnf. Firstly, it put the data folder in the webroot along with the web folder, (a no no that I later learned during install.) Speaking of install, never in those 4 days did I ever get anything but a blank white screen to appear when accessing the web page, or where it should be. What is the point of having a web based install function if it never shows up? I understand that it is looking for requirements, but don't you think it would be nice if it told you what it was looking for and what it found? Furthermore, I had to resort to a command line install to find anything.
Now, to cut to the bottom line, At the very end of the command line install, it refused to add the required database tables sighting that my php version was 8.3, and it only worked with version 8.0 of php. End result, I can't use moodle. Why would a software company as apparently as large as you are, not account for differences in it's operating environment? Even Operating System companies are now able to run on almost all of the diverse computers available. And, yes, I do understand that I should have read the requirements first. If you want to grow even larger, program for differences.
Sorry, I didn't mean to get on a soapbox, I'm just frustrated from all the wasted time I spent.
IMHO, why blaming in the Moodle Community for problems (wrong dependencies) that should be directed to whom maintain that package (cfr. https://packages.fedoraproject.org/pkgs/moodle/moodle/index.html ) ?
Many moons ago, I also used the package manager of Fedora to install moodle.
Found out it was a mistake.
Should have followed Moodle official docs for installing.
https://docs.moodle.org/404/en/Installing_Moodle
https://docs.moodle.org/404/en/Installation_quick_guide
We learn ... sometimes the hard way ... but that learning results in better understanding of the iceburg that is known as "Moodle".
The fact you had to 'resort' to command line is a good thing ... using CLI to install, update/upgrade a moodle is by far the best way - especially if you installed using moodle's git versioning.
https://docs.moodle.org/404/en/Git_for_Administrators
'SoS', Ken
Thank you sir! I went back and removed moodle, then installed from git. It worked! much better than before. I now have an error when I access the site that is, "Fatal error: $CFG->dataroot is not writable, admin has to fix directory permissions! Exiting. " I looked at the permissions for the dataroot folder but don't see anything that could be causing this.
ls -la /usr/share/moodle
total 16
drwxrwxr--. 3 root apache 18 May 7 23:14 .
drwxr-xr-x. 433 root root 12288 May 8 16:31 ..
drwxrwxr--. 9 root apache 120 May 8 17:25 data
/usr/share/moodle smacks of package manager!
I stopped using Fedora ... short shelf life - a year?
You are on bleeding edge with Fedora 4!
https://docs.fedoraproject.org/en-US/releases/f4/
User documentation, when available, will be at https://docs.fedoraproject.org/en-US/Fedora/4/html/Release_Notes/
Fedora Linux Release Life Cycle
The Fedora Project releases a new version of Fedora Linux approximately every six months and provides updated packages (maintenance) to these releases for approximately 13 months.
https://docs.moodle.org/404/en/Installation_quick_guide
Find apache config - think on RedHat Flavored boxes that might be called httpd.conf.
Look for user the apache service runs under .. typically that's 'apache'.
Also look for the home directory for that user ... typically /var/www/
Document root is in /var/www/html/ - moodle code goes here.
moodledata is typically placed in /var/www/
It isn't directly accessible via web browser unless defined in httpd.conf to allow but because it is in apache's home directory, apache service can read/write to it.
Ownerships and permissions on moodledata can be and should be very liberal:
chown apache:apache moodledata -R
chmod ugo+rwx moodledata -R
Now the code directory typically in /var/www/html/ can have
root as owner and apache as group and it can have more strict permissions.
Hope you are not running suPHP ... it doesn't like group write.
I typically use git as root user and then change ownerships/permissions after git updating/upgrading moodle code.
If you move stuff to locations such as above, you must edit config.php file in moodle code directory to reflect.
Also config.php file must have read by all permissions but NOT write/execute.
'SoS', Ken
Incidentally, yes Fedora is "bleeding edge". It's RedHat's test platform for their commercial products. I like it for that. It is constantly be improved upon. Things get fixed quickly.
We all pick our poisons ... and then learn the antedotes!
So /usr/share/moodle was/is moodledata? Didn't get that via Vulcan Mind Meld! :|
Did you find the main config file for apache?
What did it say for apache/httpd users home directory?
Where is your code? /var/www/moodle is like /var/www/html - but main config file for apache service needs to know that - doesn't it?
Suggest /var/www/moodledata might work .. but then again, can't do Vulcan Mind Meld!
Fine .... you like Fedora ... they fix things quickly ... so does Ubuntu ... most good Linux platforms do ... but Fedora is still supported for 1 year - they don't offer a long term support version do they?
'SoS', Ken
Fedora Apache uses a folder called /etc/httpd/conf.d to store all conf files except httpd.conf. In there, I have a moodle.conf file. It points the "code' to /var/www/moodle. This is where git put it.
Lastly, I have not moved anything yet.
Creating and deleting a test file in moodledata indicates you can do so from command line ... not from Moodle code.
Git doesn't create apache config files .. it does have a hidden .git directory inside your moodle code for it's config/settings.
So you were in command line and in /var/www/ when you issued the git command to acquire moodle code.
git clone git://git.moodle.org/moodle.git
without a 'target directory' at the end of above command, default is to create a moodle directory.
Now does the config file for the moodle in /etc/httpd/conf.d/ point to /var/www/moodle/ for document root?
And in the main conf file for apache .... /etc/httpd/conf/httpd.conf
fgrep 'DocumentRoot' httpd.conf
In that same file there are overrides and other config directories which very well could be the reason(s) you are having issues.
fgrep 'Directory' httpd.conf
You are trying to salvage a package manager install of Moodle. So knowing where config files are and understanding what directives are in those config line is 100% necessary to solve your issue.
Pay attention to: <Directory "/var/www">
Am almost willing to bet that if you moved your moodledata directory to /var/www/ and changed your moodle config.php file dataroot variable to that path your moodle install will stop complaining. But ... am not doing a Vulcan Mind Meld however!
'SoS', Ken
With age comes synapse lapses!
Fedora 4.0 is RedHat Family ... thus comes with SELinux set to enforcing by default .. thus makes no difference where one installs moodledata, SELinux will block access to that directory and prevent install.
Fix .. temp set SELinux to permissive mode.
SELinux still logs what it would have blocked (audit log) but will allow. You then could run SELinux commands to allow ... watch audit log for blocks ... and when no more blocks show up in those logs, set SELinux back to enforcing.
Sorry bout the lapse!
Was reminded about SELinux recently after an upgrade of a Rocky Linux system from 9.2 to 9.3 ... DUH! :|
'SoS', Ken
By the way, you guys are alright, but I'm still a little iffy on moodle until I see it running and what it can do.
But, I'll give the benefit of doubt, I think somebody in that process messed up.
WordPress ... easy install - one directory.
Joomla ... another easy install - one directory ...
Could go on and on .... Moodle on the other hand isn't installed via one directory ... there's this thing called moodledata!
You are looking at the water line of the iceburg that is known as Moodle!
Need ZZZZZ's! Couch monster is calling!
Nighty nite!
'SoS', Ken
As I understand Fedora packaging, I believe, programs are submitted to the Fedora group for inclusion.
I don't think this is correct in general. And I'm fairly sure it's not true for Moodle specifically – I don't think this package is connected to the Moodle project. So if there are issues with the RPM then Fedora's mail lists or Bugzilla are probably the place to report these.