Installation Detail
From Online Grades Documentation
(If you are upgrading from a previous version of Online Grades please see the "upgrading" document on http://www.OnlineGrades.org .)
- Have the prerequisite programs installed, configured, and already working independently of beginning to install Online Grades. This means having a working web server, php module, and MySQL database.
- Download the latest released version of the Online Grades software from http://www.OnlineGrades.org and save it on your server. For Linux you may want to download using “wget” from the command line.
- Unpack the Online Grades software in its own directory somewhere where your web server will find it.
- On windows use any of many "unzip" programs (7-zip.org is one free option).
- On Linux run something like: unzip onlinegrades-3.2.0.zip
- By default, Online Grades should create its own directory when you unpack it. The new directory name will typically contain the version name (such as OnlineGrades-3.2.0). You can rename this directory after unpacking the files if you prefer a directory name like grades or onlinegrades. Keep in mind that unless you remap the directory (via your web server's configuration settings), the folder name will be part of the URL for the grade display.
- On Linux to rename the folder using the mv command: mv onlinegrades-3.2.0.zip grades
- Configure config.php, located in the “includes” directory, using your favorite text editor. Each option in the file is commented to help you make fill in the correct information. If you have questions feel free to ask them in the help forum at http://www.OnlineGrades.org.
- On Linux, a basic text editor is pico or nano: nano includes/config.php
- On Windows a good free text editor is Crimson Editor, downloadable from [1], though WordPad (included with windows) will also work.
- Make sure that the permissions are correct for the Online Grades files on your server. On Linux, we suggest that the entire Online Grades installation be owned by the web server user and web server group (or “nobody”). Both should have read and write, but “other” should not have read or write. The point is to make sure that your config.php (which contains your database username and password) is not readable by anyone except for the web server user/group.
- Our example will be for Debian Linux, where the web server runs as www-data. Other distributions will be similar. The correct permissions would be set as follows:
- chown -R www-data:www-data onlinegrades
- chmod -R o-rwx onlinegrades
- After this has been run the permissions can be checked. Note that the “other” users can’t read the files in the onlingrades directory:
- ls –l
- drwxr-x--- 8 www-data www-data 4096 Apr 29 07:21 onlinegrades
- Our example will be for Debian Linux, where the web server runs as www-data. Other distributions will be similar. The correct permissions would be set as follows:
- New we will create the MySQL database to store the Online Grades data. This guide will demonstrate how to do each step via the command line, though if you have something like phpMyAdmin (http://www.phpMyAdmin.org/) installed you are free to use it instead. There are some hints for doing this portion of the install using phpMyAdmin in the FAQ section towards the end of this document.
- Step one is to create a database named "ogdb". We are assuming that you have set up your mysql to require a password and a username (in this case the MySQL user we will log in as is root). If you have not set up MySQL to require passwords, you should read the manual at mysql.org and do so before proceeding further. When you run the following command if it is successful you will just be returned to the command prompt.
- mysqladmin -p -u root create ogdb
- Now that we have the “shell” of the MySQL database set up we can create the user account that will be used to access the ogdb database and set the permissions that account will be allowed to have. We will do this from inside the MySQL command line, which we can access via running the mysql program. The following command says run the mysql program, using a password to get in, as the user root, and once in use the mysql database:
- mysql -p -u root mysql
- Once logged in your prompt will change to “mysql>” since you are inside the mysql program. We will now run a single command that will create the OG user, give it access to the ogdb database that we created earlier, and set the password for access. Be sure to insert your own (harder!) password:
- mysql> GRANT ALL ON ogdb.* TO ogdbuser@localhost IDENTIFIED BY 'ogdbuserpassword1' WITH GRANT OPTION;
- Note: If you are running MySQL 4.1 with PHP 4.x you will need to use the “old” MySQL password hashing format as the new one is not yet compatible with PHP (at the time of this writing). Simply update run the following command to insert the password in the old format:
- mysql> SET PASSWORD FOR 'some_user'@'some_host' = OLD_PASSWORD('newpwd');
- All that remains here is to tell MySQL that you want those changes to “take” and then exit out of the mysql program:
- mysql> FLUSH PRIVILEGES;
- mysql> QUIT
- Our remaining step is to load the table structure and the default data into the Online Grades database shell that we created earlier. We will do this by feeding the mysql program the “onlinegrades.sql” file in the docs directory and telling to add this info to the ogdb database. Make sure that you are able to read the onlinegrades.sql file from the command line before you do this step. You might have to modify the file permissions to make sure you can read the file or run this command as root:
- mysql –p –u root ogdb < docs/onlinegrades.sql
- Step one is to create a database named "ogdb". We are assuming that you have set up your mysql to require a password and a username (in this case the MySQL user we will log in as is root). If you have not set up MySQL to require passwords, you should read the manual at mysql.org and do so before proceeding further. When you run the following command if it is successful you will just be returned to the command prompt.
- We are now ready to log into Online Grades. Go to your web address and to the admin directory (http://<_path_to_your_install_>/admin/) and log in with a user and password of admin and admin.
- Before you go any further we should change the password for the admin account (alternatively you could set up a new admin account, log out, and after logging back in as the new admin user delete the original admin account). The admin account password can be changed via the “Edit/Delete Administrator” link.
- Next add your school. If you set up more than one school per Online Grades install be aware that this will require the students to choose the correct school when logging in. It is simpler if there is only one school, where possible. For example a school might have an Elementary and a High School that share the same school name but are in different buildings. If possible, both should be set up as the same school in Online Grades in order to simplify logins for the students.
- Next you are ready to add faculty members who will be able to view and upload grades. The suggested passwords generated by the admin interface can be used if you wish, or you can supply your own.
- The "Further Customizations" section of the manual explains how to customize the text that is sent with the welcome email.
- Student accounts do not have to be added via the admin interface, though there are forms in the admin interface for adding them one at a time. Student accounts will be created automatically when a teacher uploads a grade file containing the student’s id. At that time a random password is set for the student.
- If you want to upload student accounts in mass you can use a tool such as phpMyAdmin or something similar. If you choose this route, uploading a student’s name is optional. Only their school, student id, and passwords are required.
- If you upload the Student IDs and passwords in mass the advantage is that you can use that same data in a spreadsheet to generate a mail-merge for sending home to the parents.
- Training your teachers. For training you may use any of the documents posted online to help in training your staff. If you come up with some good additional training materials, feel free to share them so that other schools don't have to start from scratch.
- Spread the word among teachers and schools that use Easy Grade Pro that their school could use this software for displaying school grades online. Support Free Software!


