Developer:FedoraInstallation/Old Instructions

From myExperiment
Jump to: navigation, search


Warning: These installation instructions are obsolete. They are for the Rails 1 version of myExperiment. In addition, Fedora has deprecated System V style init scripts in favour of Systemd.

This guide was produced by installing myExperiment onto a newly installed Fedora 12 virtual machine. Some packages may already be installed on your system depending on which options you chose during the installation. You may still use the line below to install the ones that aren't already installed.


Install and configure the required packages

The following was used to install the packages. In addition to installation, apache and mysql need to be started and instructed to start again on reboot.

$ sudo yum install subversion httpd mysql-server mysql-devel
$ sudo yum install ruby ruby-devel rubygems graphviz ImageMagick-devel java

$ sudo chkconfig httpd on
$ sudo chkconfig mysqld on

$ sudo /etc/init.d/httpd start
$ sudo /etc/init.d/mysqld start

Check out a local copy of the myExperiment code

$ svn checkout -r 2844 http://myexperiment.rubyforge.org/svn/trunk
$ cd trunk

Install the required gems

$ sudo gem install -v 1.2.6 rails
$ sudo gem install mysql -- --with-mysql-config=/usr/bin/mysql_config
$ sudo gem install mongrel_cluster rubyzip oauth libxml-ruby
$ sudo gem install rmagick dsl_accessor ruby-openid openurl
$ sudo gem install curb marc htmlentities

Prepare the database

Copy the default database template

$ cp config/database.yml.pre config/database.yml

Edit the config/database.yml file to match the credentials of your databse. By default, Fedora installs MySQL without a root password, so I only needed to add socket line to the configration. E.g.:

development:
  adapter: mysql
  database: m2_development
  username: root
  password:
  host: localhost
  socket: /var/lib/mysql/mysql.sock

Create the database with the following:

$ mysql -u root -e 'create database m2_development'

And instruct Rails to prepare the database for use.

$ rake db:migrate

Prepare the search engine for use

Create a config/settings.yml file from scratch and add the following line:

solr_enable: true

You can add more settings to the file. The default settings are shown in config/default_settings.yml.

Start the server and test

Fedora has a firewall installed by default. Adjust the firewall to allow incoming TCP connections on port 3000 using the following tool:

$ sudo setup

Start the search engine:

$ rake solr:start

And finally start the server in development mode with:

$ ruby script/server -e development

Use a web browser and test the installation. If you are using a web browser on the same computer as the installation, then try http://localhost:3000/. If not, you will need to substitute localhost for the domain name of the computer it is installed on.