Reputation: 107
I am trying to install moodle on my server. I did unpack moodle package in public html folder. This moodle folder has 755
access rights set.
Then I created moodledata folder in the same public_html
folder and used 777
access right. Then I tried to run install, but I always get error: Data directory (/home/studentai/***/data) cannot be created by the installer
.
But I created it manually. So where is the problem?
Upvotes: 4
Views: 6715
Reputation: 1
A quick solution was to change my hosting company. I opt for a hosting company that provides me with a control panel which has softaculous scripts. This is one click installers within your control panel. Moodle is one of them. So, instead of you doing it manually, it is installed automatically with one click. In other words, you only specify the path of your root directory and data folder and the server does the rest.
Upvotes: 0
Reputation: 51
First you want change the xampp settings Run XAMPP Control Panel
crate database using command
CREATE DATABASE moodle
DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER 'moodle-owner'@'localhost'; CREATE USER 'moodle-owner'@'127.0.0.1'; CREATE USER 'moodle-owner'@'::1';
SET PASSWORD FOR 'moodle-owner'@'localhost' = PASSWORD('moodle123$%'); SET PASSWORD FOR 'moodle-owner'@'127.0.0.1' = PASSWORD('moodle123$%'); SET PASSWORD FOR 'moodle-owner'@'::1' = PASSWORD('moodle123$%');
GRANT ALL PRIVILEGES ON
moodle
.* TO 'moodle-owner'@'localhost' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON
moodle
.* TO 'moodle-owner'@'127.0.0.1' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON
moodle
.* TO 'moodle-owner'@'::1' WITH GRANT OPTION;
then install moodle 3.3.2+
Upvotes: 2
Reputation: 31
Download moodle zip from moodle.org then place it in lamp/htdocs folder. and than write localhost/moodle in browser. Then follow the installation steps.
Upvotes: 0
Reputation: 5257
In my moodle installation I have public_html and moodledata both in domain root, both with 700 grant.
I think, it's correct.
Try it!
If don't, you need to edit the public_html\config.php:
$CFG->dataroot = '/home/mydomain/moodledata';
Upvotes: 0
Reputation: 1
I have had this problem in the past on a shared server where I only had access to the public_html folder. I got around this by manually creating the config.php file. This is not ideal, but sadly the only way I could get it to work.
Upvotes: 0
Reputation: 14949
Moodledata should be above public_html in the folder structure and will throw an error if not. You should have an opportunity to manually enter the path to it as part of the installer process.
The path above has asterisks in it, which is definitely not good. Did you add these?
Also, the Moodledata directory should have more restrictive permissions than 777 on a shared server.
Upvotes: 7