|
|
Mahara Wiki > System Administrator's Guide > Installing Mahara
Installing MaharaFrom $1Table of contentsNearby: Upgrading Mahara This is a guide to installing Mahara. It's mainly targeted at the main platform on which people will install it (Linux with Apache), though Mahara can be installed on other platforms. Mahara is a web application. This means it's not just an executable file you can download and run. You need a server to put it on (you can use your desktop as a server if you're just trialling it). You'll need to install other software for it to run too - such as the Apache web server and PostgreSQL database system. Another alternative is to use shared hosting - but this isn't as good as having a machine where you can have administrator access. If you're running Debian/Ubuntu, a lot of the required software (and even Mahara itself) can be installed using DependenciesMahara is mainly designed for use on Linux, using the Apache web server, PostgreSQL database server and PHP. We also support its use with the MySQL database server. In addition, members of the community have successfully got Mahara running on Mac OSX and Windows, and have also managed to use nginx instead of Apache. The Mahara developers fix bugs found that prevent running on these platforms, but don't explicitly test them from day to day, so you may have less luck than using a Linux box with Apache. Hardware
See the scalability article for more information on the hardware required, and how you can calculate how much you need. One modern entry-level server will handle an average school or college quite sufficiently. In many cases, you can get away with a virtual environment such as a VPS. Software
More details about the Software Requirements are available, including what you can substitute for any of them. Get the code, and put on your webserverIn order for your Mahara to run, you need to put a copy of the code on your own server. You can either download a standard build of Mahara, or check out the project from the git repository if you know how git works (this option is mainly for developers). Once you have the code, copy the contents of the
If you are unfamiliar with Ubuntu and need an in more detailed explanation about how to install the files and configure Apache, go to the step-by-step guide. Create the DatabaseYou need to create a database for Mahara and ensure that the webserver is able to connect to it. Instructions for the command line follow, if you have access to a CPanel or similar software you can create the database using it instead. Your database must be UTF8 encoded. The commands below create a UTF8 encoded database, if you use CPanel etc., then you will have to make sure it creates you a UTF8 database. Command line instructions for Postgres: # Run these commands while su'd to the 'postgres' user # If you need to create a database user: createuser -SRDP (username) # Actual database creation createdb -O (username who will be connecting) -EUTF8 (databasename) Command line instructions for MySQL: mysql -Uroot [enter password] create database (databasename) character set UTF8; grant all on (databasename).* to 'username'@'localhost' identified by 'password'; By the way, if possible, try to use PostgreSQL for your database if you can. Create the Dataroot DirectoryThis is a directory where Mahara will write files that are uploaded to it, as well as some other files it needs to run. The main point about this directory is that it is one that the web server can write to. The other main point is that it cannot be inside the directory where your Mahara code is! In fact, if you have a public_html directory, it should not be inside that at all. On your webserver, you will need to make this directory. If you have a public_html directory, make the directory alongside it. You can give it a name like 'maharadata'. Once you are done, you should have this directory structure (ignoring files):
You will need to make the maharadata directory writable by the web server user. You can either change its owner to be the web server user, or you can Create Mahara's config.phpIn the Mahara htdocs directory is
Apache ConfigurationNote: If you're on shared hosting, you probably are not able to change this, so you can ignore this section. The simplest of Apache VirtualHost configurations will be sufficient: <VirtualHost *:80>
ServerName example.org
DocumentRoot /path/to/mahara/htdocs
ErrorLog /var/log/apache2/mahara.error.log
CustomLog /var/log/apache2/mahara.access.log combined
<Directory /path/to/mahara/htdocs>
AllowOverride All
</Directory>
</VirtualHost>
Please note that your apache configuration should contain no ServerAliases. Mahara expects to be accessed through ONE URL. This gives certainty that cookies are set for the right domain, and also means that SSL certificates for the networking functionality can be generated for this one URL. If you use a server alias, you should expect to see problems like having to log in twice, and potentially SSO between your site and others breaking. However, you can still make both example.org and www.example.org work for your site, if you use a second VirtualHost directive as well as the one above: <VirtualHost *:80>
ServerName www.example.org
# You _can_ add ServerAliases here if you want more than one URL to
# redirect to your main site
# ServerAlias foo.example.org
Redirect Permanent / http://example.org/
</VirtualHost>
Run the Web Based InstallerOnce you have set up your config.php (and apache configuration, if not on shared hosting), you should now be able to navigate to the Mahara installation using your web browser. This will pop up a page stating the conditions of using Mahara, and will ask for agreement. If you agree with the conditions, click "agree" and Mahara will install itself into your database. Click continue, and you will be asked to change the administrator's password, then you'll be logged in to your new Mahara installation. Congratulations! Note: The admin's username is 'admin'. Before Mahara 1.2, you will have to log in before you can change your password. The admin's default password is mahara. What if the installation process breaks with an error?Sometimes this can happen. Normally this is because of some misconfiguration in your system - for example, you haven't granted your database user permission to create tables, or you aren't using a high enough version of your database (see the dependencies). Sometimes, it's because of a bug in the Mahara installer. In order to find out, you will need to check the error log for your webserver. Mahara dumps detailed information in there where a bug occurs. The message might show you that the problem is with your configuration, but if it looks like a problem with Mahara, you should make a bug report with the information from your logs, so we can fix it. If you were able to fix the problem, you might need to drop and re-create your database again, so you're starting the installation again without any of the previously installed tables in the way. Final Task (don't forget!): Cron JobYou will need to set up a cron job to hit htdocs/lib/cron.php every minute. Mahara implements its own cron internally, so hitting cron every minute is sufficient to make everything work. If you don't set up the cron job, you will find that RSS feeds will not update, and some email notifications won't be sent out, such as forum post notifications. You can set it up using the command line 'php' command to run the cron script, or by using a command line web browser such as lynx or w3m. Something like the following in a crontab file will be sufficient: * * * * * curl http://your-mahara-site.org/lib/cron.php If you run cron using curl, the cron output will be logged in your apache error log. If you wish to separate where it's logged to away from your apache logs (which is a particularly good idea, though slightly harder to set up), read the separate article about Mahara's cron. My Mahara is installed - now what?Congratulations on getting your Mahara installed! Now read the Next Steps article to see what you can do now - for example, installing a new language pack and theme. And if you haven't already, now might be a good time to join the Mahara community - you can get help and ideas for your Mahara from a world-wide community of enthusiastic users. We hope to see you on the forums soon! TroubleshootingIf you are having problems installing Mahara, please check out the Installation Instructions Troubleshooting Page for answers to some common problems.
Tags:
|
Powered by MindTouch Deki Open Source Edition v.8.08.1a |