Time for action - setting up the data directory
1. Create the data directory in the
public
folder of your home directory. We will create the directory using themkdir
command and call ituploaddir:
mkdir uploaddir
Note
It doesn't really matter what you decide to call your dataroot
directory, but try to choose a name that is relevant to what the directory is doing. The name suggested by Mahara and the most commonly used name is uploaddir
, but other names such as maharadata
would be just as good.
2. Set the permissions on this folder using the
chmod
command:
chmod -R 0777 uploaddir
3. Change the user of the new directory to be the same as your server using the
chown
command. The user is usually apache or www-data:chown -R www-data:www-data uploaddir
4. And that's all there is to it, we now have a place where Mahara can put all of the stuff belonging to our users.
What just happened?
What we have just done is really very simple, so hopefully you aren't feeling bogged down with all those commands you had to type.
We created our data directory and made sure that it was in a safe place in your home directory above the htdocs
directory. Then we changed the permissions, users, and groups for the directory to make it easy for Mahara to put things in and to delete things.
Let's take a quick look at the file structure that we have just created for our Mahara installation:
So far we have downloaded and put the Mahara files into place on our server and seen how to create the database and dataroot
needed to store all the Mahara information.
Now, we have to hold Mahara's hand by letting it know how it can access the database and how to find the dataroot
. To do this we use an important file called config.php
.