====== Install & Configure ReadingRecord ======
===== Installation =====
WARNING: These directions assume you will be running ReadingRecord on a server with no other web pages in '/var/www/'. If this is not the case, please ensure that existing content won't be overwritten or install ReadingRecord in another directory. (This may require configuring an Apache virtual host.)
* Download the latest version of ReadingRecord from [[software:software_releases|here]].
* Unzip & untar the software to '/var/www/'. The tarball will create various files & directories in '/var/www/' and '/var/www/html/'.
* The following files & directories are created in '/var/www/' (ownership & permissions are also listed):
*
[root@demo www]# ll -R ReadingRecord/
ReadingRecord/:
-rw-r--r-- 1 root root 227809 Apr 4 17:02 classes.php
drwxr-xr-x 2 root root 4096 Apr 4 17:02 config
-rw-r--r-- 1 root root 810 Apr 4 17:02 COPYING
drwxr-xr-x 2 root root 4096 Apr 4 17:02 database_templates
-rw-r--r-- 1 root root 2099 Apr 4 17:02 footer.php
-rw-r--r-- 1 root root 1605 Apr 4 17:02 header.php
-rw-r--r-- 1 root root 34520 Apr 4 17:02 LICENSE
-rw-r--r-- 1 root root 2103 Apr 4 17:02 staffFooter.php
-rw-r--r-- 1 root root 2057 Apr 4 17:02 staffHeader.php
-rw-r--r-- 1 root root 889 Apr 4 17:02 VERSION
ReadingRecord/config:
-rw-r--r-- 1 root root 1382 Apr 4 17:02 SAMPLE_prepend.php
-rw-r--r-- 1 root root 1283 Apr 4 17:02 SAMPLE.readingrecord.org_config.php
ReadingRecord/database_templates:
-rw-r--r-- 1 root root 13009 Apr 4 17:02 template_db.sql
* The following files & directories are created in '/var/www/html/' (ownership & permissions are also listed):
*
[root@demo www]# ll -R html/
html/:
-rw-r--r-- 1 root root 1548 Apr 4 17:02 duplicateRegistration.php
drwxr-xr-x 3 root root 4096 Apr 4 17:02 images
drwxr-xr-x 2 root root 4096 Apr 4 17:02 includes
-rw-r--r-- 1 root root 1454 Apr 4 17:02 index.php
-rw-r--r-- 1 root root 2337 Apr 4 17:02 register.php
-rw-r--r-- 1 root root 1792 Apr 4 17:02 registrationFailure.php
drwxr-xr-x 3 root root 4096 Apr 4 17:02 staff
-rw-r--r-- 1 root root 1541 Apr 4 17:02 testIncludePath.php
html/images:
-rw-r--r-- 1 root root 894 Apr 4 17:02 favicon.ico
drwxr-xr-x 2 root root 4096 Apr 4 17:02 SAMPLE.readingrecord.org
html/images/SAMPLE.readingrecord.org:
-rw-r--r-- 1 root root 7641 Apr 4 17:02 header.gif
html/includes:
-rw-r--r-- 1 root root 1817 Apr 4 17:02 main.css
-rw-r--r-- 1 root root 1826 Apr 4 17:02 staff.css
html/staff:
-rw-r--r-- 1 root root 2539 Apr 4 17:02 copyRegistration.php
-rw-r--r-- 1 root root 2534 Apr 4 17:02 deleteRegistration.php
-rw-r--r-- 1 root root 1432 Apr 4 17:02 duplicateRegistration.php
-rw-r--r-- 1 root root 1388 Apr 4 17:02 index.php
-rw-r--r-- 1 root root 2099 Apr 4 17:02 login.php
-rw-r--r-- 1 root root 1354 Apr 4 17:02 logout.php
-rw-r--r-- 1 root root 2321 Apr 4 17:02 register.php
drwxr-xr-x 2 root root 4096 Apr 4 17:02 reports
-rw-r--r-- 1 root root 3198 Apr 4 17:02 search.php
-rw-r--r-- 1 root root 2726 Apr 4 17:02 staffNotes.php
-rw-r--r-- 1 root root 2485 Apr 4 17:02 track.php
-rw-r--r-- 1 root root 2540 Apr 4 17:02 update.php
html/staff/reports:
-rw-r--r-- 1 root root 1940 Apr 4 17:02 countLevelsByAge.php
-rw-r--r-- 1 root root 1942 Apr 4 17:02 countLevelsByCity.php
-rw-r--r-- 1 root root 1944 Apr 4 17:02 countLevelsByGrade.php
-rw-r--r-- 1 root root 1964 Apr 4 17:02 countLevelsByLevelAndLibrary.php
-rw-r--r-- 1 root root 1948 Apr 4 17:02 countLevelsByLibrary.php
-rw-r--r-- 1 root root 1946 Apr 4 17:02 countLevelsBySchool.php
-rw-r--r-- 1 root root 1948 Apr 4 17:02 countLevelsByZipcode.php
-rw-r--r-- 1 root root 1941 Apr 4 17:02 countReadersByAge.php
-rw-r--r-- 1 root root 1943 Apr 4 17:02 countReadersByCity.php
-rw-r--r-- 1 root root 1945 Apr 4 17:02 countReadersByGrade.php
-rw-r--r-- 1 root root 1949 Apr 4 17:02 countReadersByLibrary.php
-rw-r--r-- 1 root root 1947 Apr 4 17:02 countReadersBySchool.php
-rw-r--r-- 1 root root 1949 Apr 4 17:02 countReadersByZipcode.php
-rw-r--r-- 1 root root 1967 Apr 4 17:02 countValidatedReadersByLibrary.php
-rw-r--r-- 1 root root 2559 Apr 4 17:02 exportData.php
-rw-r--r-- 1 root root 1928 Apr 4 17:02 listAllReaders.php
-rw-r--r-- 1 root root 2568 Apr 4 17:02 randomDrawing.php
-rw-r--r-- 1 root root 1929 Apr 4 17:02 reportsIndex.php
* Change ownership & permissions of ReadingRecord files & directories.
* Normal ownership is root & root.
* Normal directory permissions are owner:read,write,execute | group:read,execute | other:read,execute (octal 755).
* Normal file permissions are owner:read,execute | group:read | other:read (octal 644).
===== Configuration =====
* Copy the file 'ReadingRecord/config/SAMPLE_prepend.php' to 'ReadingRecord/config/prepend.php'
* Edit the file, changing the value of '$rrPath' to the full path where ReadingRecord will live, MINUS the 'html' directory.
* Open a web browser & go to the URL 'http://yourRRserver.yourdomain.com/testIncludePath.php' (Note the capital "I" & "P" in the PHP file name.) You should see the following page:
* {{:docs:rr_testincludepath_page.png|}}
* If the path does not include the absolute path to your instance of ReadingRecord or the path is incorrect, double-check the value of '$rrPath' in the file 'ReadingRecord/config/prepend.php'.
* If the page is blank or doesn't display, ensure you have completed the configuration section of the Install & Configure Apache page.
* Using phpMyAdmin, import the 'ReadingRecord/database_templates/template_db.sql' DB included with ReadingRecord:
* {{:docs:import_template_db.png|}}
* When successful, you will see the 'template_1' & 'template_config' databases listed in phpMyAdmin:
* {{:docs:import_template_db_success.png|}}
===== Security Considerations =====
The following are optional, but recommended, steps to help improve the security of your ReadingRecord server:
* The 'html/testIncludePath.php' script exposes PHP's include path. While this poses a low security risk, it is safe to remove the file once the you see the page above and the include path is correct.
===== Navigation =====
Previous: [[docs:install_configure_phpmyadmin|]] | Next: [[docs:setting_up_a_readingrecord_site|]]