Trying to install Moodle 3.1 on CentOS 7 but comes up with error.
At localhost/install.php confirm paths
So I tried blanking data directory
Moodledata have permissions
Also I made sure SELinux is turned off.
STUMPED! Can anyone help?
$ mkdir /var/www/moodledata
$ chmod 0777 /var/www/moodledata
Then specify /var/www/moodledata in the 'data directory' box.
Does that help?
I did do all that, but I did it again. Still the same. I have no permissions. Even checking with the GUI.
Basically I just gave up. Too many errors setting in the installation process. But thanks for the headsup on Centos though. Got it dual booting.
Hi Emma, thank you for your reply. Can you elaborate a little more as I am not sure what you are saying. I am using apache centos 7
One has to sometimes translate moodle docs/directions as many show for Ubuntu. Translation normally involves paths and users and groups. With CentOS family the apache user is the user under which httpd (web service daemon) runs. Paths, while similar, slightly different .... apache is configured to use /var/www as it's 'home directory' on CentOS and the 'html' directory is it's document root ... anything in 'html' and the web service (httpd) will attempt to serve it out upon request.
Centos 7 sudo trick
Login however you have been logging in. That login/user has been included in the sudo users group ... meaning, if one were to desire to run a command that normally only the root user could execute, you could put 'sudo' in front of the command, provide your password, and the operating system would allow that execution of the command. Sudo will eventually time out (so to speak) and one will have to use sudo in front again for other comments.
There's a way around that in CentOS 7, however.
After logging on issue: sudo -s
Your prompt should change from (real example with Google Apps Engine CentOS 7):
[taskken@centos-7-1 ~]$
to
[root@centos-7-1 taskken]#
Notice the prompt tells you are root user now and in the /home/taskken directory.
Every command you use now is as the root user so it's important to know where
you are located when issuing commands that are global ... like removing files.
To find out where you are: pwd [ENTER]
Example:
cd /var/www
[root@centos-7-1 www]# pwd
/var/www
[root@centos-7-1 www]#
Now, if you manually create the moodledata directory it will be created but
it will be owned by root user/group.
mkdir moodledata
chown apache:apache moodledata -R
NOTE: apache above is both a user and a group under which the web service (httpd in CentOS 7) runs. The -R is recursive ... i.e., from the location you are down into the directory and all it's subdirectories/files.
The above is good enough to install Moodle now.
To exit the ssh session properly now since you've sudo -c
one must exit twice ... once to get out of the sudo session
and once to exit/break the connection of the user you used to login.
Since you've chosen CentOS 7, good idea to know the availability of the followning:
'spirit of sharing', Ken
Try:
chown -R apache:apache moodledata
chown -R apache:apache moodle
If this at least gets it going, you can request advice from the security experts later!! I am not a security expert but this might at least get you going.