|
Installation
Installation Instructions for BibApp
Table of Contents:
IntroductionBibApp is a Ruby on Rails 2.3 web application. If you are familiar with installing Ruby on Rails applications, BibApp should be no different! If this is your first time with Ruby on Rails, don't worry...we've tried to make things easy on you. At a basic level, Ruby on Rails applications require the following:
Currently, because of a small development/testing team, we have some recommendations for your Rails setup for BibApp. You may be able to get away with other non-recommended Ruby on Rails setups. But, we haven't verified they all work with BibApp, yet. So, without further ado... Software Pre-requisitiesBibApp should run on any Operating System. Currently we've had it successfully running on Linux, Mac OS X and Windows XP.
BibApp requires the following software to function properly:
gem update --system
BibApp gives you a few options when it comes to your database. Currently, we support either of the following:
OR
Optional: If you want to be able to pull down BibApp directly from our GoogleCode site, you may also wish to install Subversion (svn). That's everything you need to get started... Additional Pre-requisites for Ubuntu / Debian (not Mac OSX)Before trying an installation on Ubuntu or Debian-based operating systems, there are a couple of libraries you'll want to make sure you have installed:
In addition, if you are planning to install BibApp on MySQL, you will need to MySQL development package. This is unnecessary if you will be using PostgreSQL.
You should be able to install these packages quickly via apt-get. For example: sudo apt-get install libxml2 libxml2-dev ruby1.8-dev Additional Pre-requisites for Mac OSXYou'll need to install Apple's XCode tools. Header files are not delivered by default with Mac OS X, you need to install the Xcode Tools package after installing OSX. You can find it in the Optional Installs / Xcode Tools directory on the Leopard DVD. If you want to launch BibApp using Apache & Phusion Passenger, you will need to start up Mac OSX's built in Apache Web Server. Go to your 'System Preferences' > 'Sharing' > 'Services' and enable 'Personal Web Sharing'. This will start up Apache for you, and you should be able to access it by visiting http://localhost/ in your web browser. Stack InstallationUbuntu LinuxInstallation instructions for Ubuntu (Illinois) - InstallationUbuntuLinux. SolarisInstallation instructions for Solaris (Wisconsin) - InstallationSolaris. Get StartedBefore we jump in, it's worth explaining a bit about what software BibApp has bundled (Rails uses the term "frozen") within it. You don't need to understand what everything is doing, but we just want to let you know it's there! When you download BibApp, it already comes pre-packaged with the following:
Download CodeThere are two different ways to install BibApp:
svn checkout http://bibapp.googlecode.com/svn/trunk/ ~/bibapp/
Configure BibAppNext, you'll need to edit the configurations for your local settings. In the [bibapp]/config directory, look for the following "example" configurations:
You'll need to copy each of these files into a file without the .example extension and personalize the contents as necessary. Each of the above files include instructions within them describing how to configure them properly for your institution. In the end you should end up with a file list similar to the following (REQUIRED configuration files are bold):
Ruby Gem InstallationsUnfortunately, we cannot bundle everything within BibApp. We've tried to minimize your need to install Gems, but there are still a few you'll need to install yourself:
gem list rake gem install rake rake gems:install gem install mysql -- --with-mysql-dir=/path/to/mysql sudo env ARCHFLAGS="-arch i386" gem install mysql -- \
--with-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib \
--with-mysql-include=/usr/local/mysql/includegem install postgres -- --with-pgsql-dir=/path/to/pgsql gem install mongrel
gem install mongrel_cluster We are now recommending the Apache2 web server with Phusion Passenger (aka mod_rails). See the wiki page Mongrel2PassengerMigration for instructions. Common Warnings / Errors
Setup Your DatabaseNow, you'll need to setup a database for BibApp. You should already have installed either MySQL or PostgreSQL. So, it's just a matter of creating a new database! Make sure your database is named the same as the 'database' setting in your config/database.yml file! In addition, you should login as the user specified in your config/database.yml when creating your database (to ensure that user owns the database) For this example, we're just setting up a BibApp Development database. But, you can use the same concept to also setup a Test and Production database, when you are ready.
CREATE DATABASE bibapp_development CHARACTER SET = 'utf8';
GRANT ALL ON bibapp_development.* to 'bibapp'@'localhost' identified by 'PASSWORDHERE';
FLUSH PRIVILEGES;Obviously, remember to change PASSWORDHERE to the password you want set for your 'bibapp' database user.
createuser -dSRP bibapp
createdb -U bibapp -E UNICODE bibapp_developmentNow you can generate the BibApp database structure into your new database! From within your [bibapp] directory: rake db:schema:load You should see a large number of 'create table' messages scroll by. That's perfectly normal! But, if any errors appear, there are problems which you will have to resolve before BibApp will function properly! Before continuing, you also need to initialize your database with an Administrator account and the current SHERPA RoMEO publisher policy data. This data is used to help researchers determine which of their publications can be deposited in a local repository for safe keeping. From within your [bibapp] directory: rake db:seed Your database should now be setup and initialized properly! Startup BibAppYou're almost there! In order to startup BibApp on your server, you must do both of the following (from within your [bibapp] directory):
rake solr:start mongrel_rails start Try it out! Assuming your web server is on port 3000 (which is Mongrel's default), you should have BibApp running at: http://localhost:3000/ Updating BibApp (Bill - 2009.04.27 - Beta!)Steps for updating BibApp with the latest from Subversion. Run all commands as root (sudo).
cp -R bibapp/ bibapp.bak/ pg_dump -U bibapp -E UNICODE -f <backup_file_name_path> <database_name> mongrel_rails stop mongrel_rails cluster::stop cd bibapp/
svn update
svn statusrake db:migrate rake solr:stop
rake solr:start
rake solr:refresh_indexrake gems:install mongrel_rails start mongrel_rails cluster::start Using BibAppLogin For the First TimeBibApp comes with a pre-initialized "admin" user. The login for this user is "admin" (lowercase), and the default password is "bibapp" (lowercase). This "admin" user has System Administrator rights, and can do anything within BibApp. Therefore, it is absolutely necessary to login and change the password for this user as soon as possible. Repeat: it is absolutely necessary to login and change the password for this user as soon as possible. So, login and do it now!
Finally, (although not required at this time) you may wish to change the email account associated with this "admin" user. At this time, BibApp only uses that email address if you have forgotten your password and request a new one be generated. So, if you have any concerns about forgetting your "admin" user's password, change the email to point to a valid email address! Problems / Questions / More InformationWe're definitely aware that these instructions are a bit lacking. We're working on updates before our BibApp 1.0 release. If you run into any interesting problems or "gotchas" during the installation or setup, let us know! The easiest (and preferred) way to contact us is via our BibApp Google Group. If you ran into problems during the installation, try and send us the following:
|
Sign in to add a comment