Install/Upgrade Documentation

OERbit Installation and Upgrade Documentation = Install =

There are a few options for an installation. If you want to quickly demo OERbit on your laptop/desktop, go to the demo section and follow those instructions. If you'd like to get OERbit running on a Windows Server 2003 system, follow these instructions (CAUTION: incomplete). Otherwise, if you're looking to get OERbit up and running on a RHEL/CentOS, Ubuntu, or MacOS - read the requirements below!


 * Install on Windows Server 2003
 * Install on a Windows Desktop/Laptop
 * Install on a Mac Desktop/Laptop

Requirements
We are currently running on RHEL/CentOS 5.5. We have successfully deployed on Ubuntu 8.10, 9.04, 9.10 but don't have extensive experience. We have also deployed on MacOS 10.5, 10.6, but only for development purposes.

You need to have root access or have root privileges via sudo. You also need to have privileges to create databases in MySQL.

Unless otherwise noted, all the required components have been installed from the RHEL/CentOS software repositories or from EPEL.


 * Apache &gt; 2. We run Apache httpd 2.2.3
 * mod_php from PHP 5.2.x. We run PHP 5.2.17, for which we built RPMs since the PHP available via the software repositories is PHP 5.1.x. The RPM Specfile used creates many packages, which in turn have their own build dependencies. We will provide a more detailed list of all the packages used soon. Note that we haven't had much success with PHP 5.1.x and we're pretty sure 5.3.x will NOT work since Drupal 6.x doesn't run on PHP 5.3.x and OERbit is based on Drupal 6.x.
 * MySQL 5 or greater. We run MySQL 5.0.77
 * A working MTA such as sendmail, postfix, exim or qmail. (Use the Google Luke, for further information on MTAs and how to configure them.)
 * A reasonably recent version of Git (&gt; 1.6). We have installed Git 1.7.1 from source on our RHEL/CentOS machines since the version available via Yum is too old to be useful. If you find a reliable repo that offers RPMs, please let us know via the Google group.

The base install uses approximately 375MB of disk space, which does not include the space used by MySQL for the DB tables. Any content you upload will require additional disk space, so space requirements largely depend on the content you will be publishing. 5GB for a small site is a good starting point.

OERbit Installation
The current system is configured to run from the webroot which will disrupt any other applications or pages you are serving from within the webroot. If you want to continue to run your old applications and serve existing pages, you will have to fiddle with web server configuration and the .htaccess file provided with OERbit distribution. The following steps will get the system installed. All the steps below are typed into a terminal window. Press enter after each of the code snippets given below, to run the commands.


 * 1) Change to the /var/www directory.
 * 2) If the html directory exists rename it.
 * 3) Clone the Git repository from git://github.com/openmichigan/OERbit.git to the html directory.
 * 4) Create the MySQL database.
 * Enter the MySQL root password at the  prompt.
 * 1) Create the OERbit database user and grant privileges to that user. You need to replace  with the password you want to use for the DB user. You will need to specify this same database user and password in the Drupal configuration file. This needs to be done within the MySQL client.
 * Exit the mysql client.
 * 1) Change to the scripts directory within the html/sites/all/modules/openmichigan/scripts directory.
 * If the above doesn't work because of denied permission, try it as the root user instead. How to become the root user is left as an exercise to the reader.
 * 1) Load the base data into the oerpublish database.
 * Enter the password specified for the previously created oerpublisher user at the  prompt.
 * The above step has you loading data from within the MySQL client. Doing so is recommended over redirecting output via shell input redirection using the '&lt;' character to read from the sql dump file.
 * Exit the mysql client.
 * 1) Change to the top level directory.
 * 2) Copy the sample .htaccess file
 * 3) Change to the site configuration directory.
 * 4) Make a copy of the default.settings.php file
 * 5) Open the settings.php file in a text editor. No, you won't get us to pick one for you. We know better than that! Just use whichever one you like as long as it doesn't mess up line endings.
 * 6) Locate the line that starts with
 * 7) Replace the text in single quotes with the information relevant to your system. If you have used the same database name and database user as above, and have used the password  the line would read as below.
 * 8) Save the changes made to the file and exit the text editor.
 * 9) Assign ownership of the /var/www/html directory to the apache user and group. This assumes that the web server (assuming you are running Apache httpd) is runs as the apache user and is assigned the apache group by default. This is the default on CentOS/RHEL 5.5.
 * 10) Extract the included apache solr to /var/www. This will overwrite stuff in /var/www/solr if this directory exists. So make sure you have a backup if it does in fact exist.
 * 11) Assign ownership of the solr directory to the apache user.
 * 12) Copy the SOLR configuration files from /var/www/html/sites/all/modules/apachesolr to /var/www/solr/solr/conf
 * 13) Set Apache SOLR to start automatically on RHEL/CentOS by following the directions provided at http://wiki.apache.org/solr/SolrJetty.
 * 14) Open a web browser and go to the root location for your web server. For example,.
 * 15) Log in as the system superuser by adding "/user" after the URL in the address bar of the browser window/tab from which you have accessed the newly installed system. There is only one user defined in the provided database.
 * Username: oerbit-admin
 * Password: 2ndStage
 * 1) Make a copy of the default.settings.php file
 * 2) Open the settings.php file in a text editor. No, you won't get us to pick one for you. We know better than that! Just use whichever one you like as long as it doesn't mess up line endings.
 * 3) Locate the line that starts with
 * 4) Replace the text in single quotes with the information relevant to your system. If you have used the same database name and database user as above, and have used the password  the line would read as below.
 * 5) Save the changes made to the file and exit the text editor.
 * 6) Assign ownership of the /var/www/html directory to the apache user and group. This assumes that the web server (assuming you are running Apache httpd) is runs as the apache user and is assigned the apache group by default. This is the default on CentOS/RHEL 5.5.
 * 7) Extract the included apache solr to /var/www. This will overwrite stuff in /var/www/solr if this directory exists. So make sure you have a backup if it does in fact exist.
 * 8) Assign ownership of the solr directory to the apache user.
 * 9) Copy the SOLR configuration files from /var/www/html/sites/all/modules/apachesolr to /var/www/solr/solr/conf
 * 10) Set Apache SOLR to start automatically on RHEL/CentOS by following the directions provided at http://wiki.apache.org/solr/SolrJetty.
 * 11) Open a web browser and go to the root location for your web server. For example,.
 * 12) Log in as the system superuser by adding "/user" after the URL in the address bar of the browser window/tab from which you have accessed the newly installed system. There is only one user defined in the provided database.
 * Username: oerbit-admin
 * Password: 2ndStage
 * 1) Copy the SOLR configuration files from /var/www/html/sites/all/modules/apachesolr to /var/www/solr/solr/conf
 * 2) Set Apache SOLR to start automatically on RHEL/CentOS by following the directions provided at http://wiki.apache.org/solr/SolrJetty.
 * 3) Open a web browser and go to the root location for your web server. For example,.
 * 4) Log in as the system superuser by adding "/user" after the URL in the address bar of the browser window/tab from which you have accessed the newly installed system. There is only one user defined in the provided database.
 * Username: oerbit-admin
 * Password: 2ndStage
 * Username: oerbit-admin
 * Password: 2ndStage

Please change the password on initial login otherwise anyone who reads this documentation will have administrative privileges on your system.


 * 1) Click on the block M at the top left of the browser window and select "Run cron". Your browser should work away for a little while and then bring up a yellow alert box, one of the lines should read "Cron ran successfully". This script needs to be run periodically, so browsing to this URL is not a particularly good solution other than for the initial usage. Instructions on setting up a script that periodically runs cron are available at http://drupal.org/cron. This should trigger indexing of the search functionality and other nice stuff.
 * 2) You will notice that warnings are issued for Google Analytics and reCAPTCHA. If you wish to use Google Analytics, visit  on your site to configure your "Web Property ID". Otherwise, you should disable the Google Analytics module. If you wish to use reCAPTCHA, visit   on your site to set valid public and private keys.

Congratulations. You should now have a working install of OERbit. It has some minimal sample content. It is your blank slate. An infinitely extensible, unsullied canvas on which you can paint your OER masterpieces. A tabula rasa provided for you to unleash your and your associates' shining brilliance to the world. Thank you for bearing with us and powering through to install OERbit. We hope you find it useful.

= Upgrade =

If you used the instructions above, the OERbit system is a Git repository. We will be tracking all changes within this Git repository. We will keep the public branch of the Git repository updated since we use it at Open.Michigan.


 * 1) Change to the OERbit install directory which is /var/www/html if you followed the above install instructions.
 * 2) Pull changes from the remote Git repository.
 * 3) Log in as the system superuser by adding "/user" after the URL in the address bar of the browser window/tab from which you have accessed the newly installed system. You have hopefully changed the password of the administrative user. If not, the password is "2ndStage" (no quotes). Please log in and change the password. See above for why doing so is a very good idea.
 * 4) Click on the block M at the top left of the browser window and select "Flush all caches". Your browser should work away for a little while and then the page should update with an alert that reads "Caches cleared".
 * 5) Click on the block M at the top left of the browser window and select "Run cron". Your browser should work away for a little while and then bring up a yellow alert box, one of the lines should read "Cron ran successfully". This script needs to be run periodically, so browsing to this URL is not a particularly good solution other than for the initial usage. Instructions on setting up a script that periodically runs cron are available at http://drupal.org/cron.
 * 6) Click on the block M at the top left of the browser window and select "Run updates".
 * Click "Continue" on the following page.
 * Click "Update" on the following page.
 * You can choose to browse back to the main page of your site or to the administration pages.
 * You can choose to browse back to the main page of your site or to the administration pages.

You should now have an updated install of OERbit. Wasn't that easy? Isn't Git terrific?

= Gotchas =

Once you have added content to the system, you can no longer simply reload the database. Doing so will result in the loss of all your settings and all uploaded content and authored pages will disappear. So be warned.

Updating individual modules
This system uses patched versions of certain modules. If you are using our git repository, we will keep track of module updates and these patches, so you don't need to be concerned! However, if you are working from a tar of the source (which will be covered at some later point), and will be updating Drupal modules in the standard recommended way, you'll want to keep these changes in mind and re-apply the patches after updating any of the the modules mentioned below.

The following modules have been patched:

(Note that the patch files have been named with the ".doc" extension to make MediaWiki happy. You'll want to remove that extension after downloading.)


 * sites/all/modules/creativecommons [[Media:Creativecommons.patch.doc|patch]]
 * sites/all/modules/cck/modules/nodereference [[Media:Cck-nodereference-1.patch.doc|patch1]] [[Media:Cck-nodereference-2.patch.doc|patch2]]
 * sites/all/modules/filefield [[Media:Filefield.patch.doc|patch]]
 * sites/all/modules/menu_breadcrumb [[Media:Menu_breadcrumb-1965.patch.doc|patch1]] [[Media:Menu_breadcrumb-470336.patch.doc|patch2]]
 * sites/all/modules/module_grants [[Media:Module_grants.patch.doc|patch]]
 * sites/all/modules/nodereferrer_create [[Media:Nodereferrer_create-1.patch.doc|patch1]] [[Media:Nodereferrer_create-2.patch.doc|patch2]]
 * sites/all/modules/rdf [[Media:Rdf-1.patch.doc|patch1]] [[Media:Rdf-2.patch.doc|patch2]]