My favorites | Sign in
Project Logo
                
Downloads  
Downloading and installing RubyCAS-Server

The Easy Way

If you already have a base Ruby installation configured for your system, you should be able to install RubyCAS-Server by running the following command:

gem sources -a http://gems.github.com
gem install gunark-rubycas-server

A number of dependencies will be installed, and you should be good to go. Head over to the QuickStart and HowToConfigure wiki pages for further info. However if the above doesn't work for you, read on for detailed installation instructions.

The Hard Way

You can obtain the RubyCAS-Server RubyGem source code directly from the RubyCAS-Server Github repository. However, the preferred method is to install via the RubyGems, since this will automatically grab the required dependencies for you.

Installing via RubyGems

  1. Make sure that you have a Ruby interpreter installed. Version 1.8.6 or later is recommended. If you're on Windows, the quick and easy way to install Ruby is the One-Click Installer.
  2. You will also need the RubyGems package management system. Generally this is automatically installed for you along with the Ruby interpreter. To see if you have RubyGems installed, open up a command prompt and type gem. If that doesn't work, you will need to install it manually.
  3. Once RubyGems is installed, you should be able to install RubyCAS-Server by running the command: gem install rubycas-server
  4. Answer 'Yes' when asked about installing dependencies.

RubyCAS-Server should now be installed. Try running rubycas-server from your command line. By default RubyCAS-Server is pre-configured for operation on Linux. The program has to be able to write some configuration files to /etc and its log to /var/log/casserver.log, so you will have to run the rubycas-server command as root (i.e. sudo rubycas-server). If you prefer to store your configuration files elsewhere, try running rubycas-server with the -h flag for a list of command-line options. If you are running on Windows, you will have to translate some of this Linux jargon into appropriate equivalents for your system.

The first time you run RubyCAS-Server, the server will try to create a default configuration file for you in /etc/rubycas-server/config.yml and will then exit. Have a look inside this file and edit it to your needs. RubyCAS-Server requires a SQL database; configuration examples are provided for various database servers (MySQL, PostgreSQL, SQLite, etc.). Before running the rubycas-server command again, make sure that the database you've configured is ready to be used. For example, if you're using mysql, you'll have to create the database first:

mysqladmin -u root -p create casserver

Once you've configured everything and granted access to the database, run rubycas-server again. The server should start up this time and run in the foreground.

You can also use rubycas-server-ctl start to start the server in the background. See the QuickStart and HowToConfigure wiki pages for further info.

Installing Manually

The RubyGem method describe above is preferred, but if you insist...

  1. Make sure you have a Ruby interpreter installed. Version 1.8.6 or later is recommended.
  2. Download the dependencies. You will need (at least):
  3. Install the dependencies as per their individual install instructions. If for some insane reason you're trying to avoid RubyGems, the general procedure is to install the libraries somewhere in Ruby's include path (for example /usr/lib/ruby/site_ruby/1.8 on some Linux systems).
  4. Make sure you have git source control management tools installed.
  5. Clone the Picnic development source code from the Github repo (Picnic is a middleware layer that underlies some of RubyCAS-Server's functionality)
    • git clone git://github.com/gunark/picnic.git
  6. Clone the RubyCAS-Server development source code from the Github Repo
    • git clone git://github.com/gunark/rubycas-server.git
  7. cd into the rubycas-server directory.
    • You can run RubyCAS-Server directly from here by issuing the command: bin/rubycas-server
    • or you can install it into your system using: ruby setup.rb.

See the HowToConfigure wiki page for further instructions.

Obtaining the Source Code

RubyCAS-Server is written in a interpreted language (Ruby), so there really isn't a difference between the runable distribution and the "source code" (i.e. the RubyGem and tar packages include all of the source code).

However, if you want to grab a copy of the latest development source, have a look at RubyCAS-Server's Github repository, or the mirrored Subversion repo.

Hosted by Google Code