MIDAS3-Installation

From MIDAS Wiki

Jump to: navigation, search

< Back

Contents

Requirement

Apache version 2

PostgreSQL or MySQL or MongoDB (alpha)

ImageMagick version 6.0 and higher

PHP 5.2 or higher


Database server

MySQL 5.x, 6.x with the MySQL extension (recommended: 5.x)

PostgreSQL 7.2+, 8.x (recommended: 8.1.x)

MongoDB

Installation Preparation

  • Download a copy of MIDAS from the current repository
  • Unpack MIDAS in you web folder
  • Make sure the following directories (and all directories and files recursively below them) are writable by the web server user:
    • midas/core/configs
    • midas/log
    • midas/data
    • midas/tmp
  • Create a default database

For mysql 5.1 (assuming utf8):

create database midas character set = 'utf8'; 
grant all privileges on midas.* to 'midas'@'localhost' identified by 'password';


  • Enable apache mod rewrite in the configuration file:
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>

Installation

Open your browser and type in the following

http://www.example.com/midas/install

Substitute www.example.com with your actual domain name. When the site is loaded follow the 3 steps.

Mac

This is for an install of MIDAS3 on a Mac laptop already set up to run MIDAS2.

$ git clone <midas3-repo-url>
$ sudo ln -S midas3 /opt/local/apache2/htdocs/midas3
$ sudo vim /opt/local/apache2/conf/httpd.conf
at the end of the file, append:
<Directory "/opt/local/apache2/htdocs/midas3">
  Options Indexes FollowSymLinks MultiViews
  AllowOverride All
  Order allow,deny
  allow from all
</Directory>
$ sudo port install php5-mysql
$ sudo port install php5-iconv
$ sudo /opt/local/apache2/bin/apachectl restart
$ sudo port install mysql5 +server
$ sudo port install mysql5-server
$ sudo port load mysql5-server
$ sudo -u _mysql mysql_install_db5
$ sudo /opt/local/share/mysql5/mysql/mysql.server start
$ sudo mysqladmin5 -u root password 'mypassword'
$ mysql5 -u root -p
mysql> create database midas;
mysql> exit

Visit http://localhost/midas3 and follow the instructions. Use "127.0.0.1" instead of "localhost" for the database host.

Installing Cassandra on Ubuntu

Test with Ubuntu 10.10 (32 bits)

  • Make sure the system is up to date
 sudo apt-get update
 sudo apt-get upgrade 
  • Add the cassandra repository
 sudo nano /etc/apt/sources.list
 deb http://www.apache.org/dist/cassandra/debian unstable main
 deb-src http://www.apache.org/dist/cassandra/debian unstable main
  • Add the key
    • NOTE: You must replace the key value ‘F758CE318D77295D’ with the key value you received in your error message.
 gpg --keyserver wwwkeys.eu.pgp.net --recv-keys F758CE318D77295D
 sudo apt-key add ~/.gnupg/pubring.gpg
 sudo apt-get update
  • Install Cassandra
 sudo apt-get install cassandra
  • Change the Thrift interface to listen to all addresses (or keep localhost)
 vi etc/cassandra/cassandra.yaml
 change rpc_address: 0.0.0.0
  • Run Cassandra
 /etc/init.d/cassandra start
  • Test the installation (the default port is 9906)

PHP Client

Cassandra uses the Thrift protocol in order to communicate with the server. On the client machine

PHP Cassa

Already contains the wrapped libraries

Build the libraries from scracth

  • Download Cassandra source code
 http://cassandra.apache.org/download/
  • Download the Thirft binaries
 For windows: http://wiki.apache.org/thrift/ThriftInstallationWin32
  • Download the Thrift source code
 http://incubator.apache.org/thrift/download/
  • Compile php code for Cassandra using thrift
 d:\cassandra\trift\thrift-0.5.0.exe --gen php d:\cassandra\interface\cassandra.thrift
  • Copy the content of the newly created folder "gen-php" to C:\xampp\htdocs\cassandra\thrift-0.6.0\lib\php\src\packages (create it if it doesn't exist)

MIDAS3 Installation (Ubuntu 11.04 instructions)

MIDAS3 Installation (Ubuntu 11.04 instructions)

Personal tools