Installing Moodle on server

Installing Moodle on server

by curt bixel -
Number of replies: 3

I am following the directions for installing moodle quite closely.  Here is a link the the directions I am using.  http://docs.moodle.org/26/en/Installing_Moodle

I have gotten fairly far in the process of installing a new moodle 2.6 installation on my server.  Here is what I have done so far:

  1. Set up SSH
  2. Added IP address to firewall
  3. Logged in via SSH
  4. pulled moodle files from repository using  "git clone -b MOODLE_26_STABLE git://git.moodle.org/moodle.git"
  5. verified that PHP was up to date  (version 5.3.27)
  6. moved "moodle" folder into public_html
  7. created a database
  8. created the data directory.

This is where I am stuck.  In the directions, it says to use the following command lines:

chown www-data /path/to/moodle
cd /path/to/moodle/admin/cli
sudo -u www-data /usr/bin/php install.php
chown -R root /path/to/moodle
The error message says "chown: invalid user: `www-data' "

I am sure that someone knows what the issue is.


Average of ratings: -
In reply to curt bixel

Re: Installing Moodle on server

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
That command is only an example. The documentation says, "You need to know what that is - see your system's documentation (e.g. Ubuntu/Debian is 'www-data', Centos is 'apache'). Example of using the command-line installer (as root - substitute 'www-data' for your web user):"

Since you have shell access, execute the command "ps -eF | grep apache". For example,
$ ps -eF | grep apache
www-data 4111 11480 0 27071 52832 0 01:20 ? 00:00:01 /usr/sbin/apache2 -k start
www-data 4118 11480 0 27592 53944 0 01:21 ? 00:00:00 /usr/sbin/apache2 -k start
1009 7160 6103 0 890 780 0 07:33 pts/1 00:00:00 grep apache
www-data 8305 11480 0 28840 61632 0 Nov19 ? 00:00:03 /usr/sbin/apache2 -k start
www-data 8306 11480 0 27777 57616 0 Nov19 ? 00:00:04 /usr/sbin/apache2 -k start
root 11480 1 0 23310 11964 0 Nov10 ? 00:00:24 /usr/sbin/apache2 -k start
www-data 17979 11480 0 28843 61668 0 Nov19 ? 00:00:03 /usr/sbin/apache2 -k start

There is one apache process owned by root, all the other apache processes belong to the user you are looking for. It is www-data in the example above, yours is probably different.

P.S. To documentation team: "Example of using the command-line installer" is wrong. It should be "Example of using the command line". (The command line installer is moodle/admin/cli/install.php.)
In reply to curt bixel

Re: Installing Moodle on server

by Ken Task -
Picture of Particularly helpful Moodlers

Think Visvanath has already mentioned, but just to double check ... what operating system are you running?  The directions on that page assume ubuntu - in which a www-data user does exist.  In RedHat 'flavored' boxen (Fedora/CentOS/RHEL) user under which the web server (apache) runs is apache.

uname -an as root from ssh shell will tell.

'spirit of sharing', Ken