Re: Installing Moodle 3.1 error

Re: Installing Moodle 3.1 error

by pete moodle -
Number of replies: 8

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?


















Average of ratings: -
In reply to pete moodle

Re: Installing Moodle 3.1 error

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
$ mkdir /var/www/moodledata
$ chmod 0777 /var/www/moodledata

Then specify /var/www/moodledata in the 'data directory' box. 

Does that help?

In reply to Howard Miller

Re: Installing Moodle 3.1 error

by pete moodle -

I did do all that, but I did it again. Still the same. I have no permissions. Even checking with the GUI.



In reply to pete moodle

Re: Installing Moodle 3.1 error

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

Did you give up Fedora: "Installing Moodle in Fedora 24" https://moodle.org/mod/forum/discuss.php?d=338119 ?

You really, really need to read the installation intstructions: https://moodle.org/mod/forum/discuss.php?d=338119#p1363284 !
Average of ratings: Useful (1)
In reply to Visvanath Ratnaweera

Re: Installing Moodle 3.1 error

by pete moodle -

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.

In reply to pete moodle

Re: Installing Moodle 3.1 error

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Your owner is root - try switching it to your webservice user - www-data on debian, maybe apache on Centos.
In reply to Emma Richardson

Re: Installing Moodle 3.1 error

by pete moodle -

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

In reply to pete moodle

Re: Installing Moodle 3.1 error

by Ken Task -
Picture of Particularly helpful Moodlers

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:

https://www.centos.org/

https://wiki.centos.org/

'spirit of sharing', Ken


In reply to pete moodle

Re: Installing Moodle 3.1 error

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

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.