wiki:localhost

How to set up LIMS on your local system

First of all, download and install the full LAMP stack of programs. MySQL is the only database that LIMS works with, and you will need PHP and Apache too. Download these programs from these websites:

http://www.apache.org - make sure you get at least version 2.
http://www.php.net - at least version 5
http://dev.mysql.com - at least version 5

Alternatively, in Windows you might prefer the Apache Friends integrated installer:

http://www.apachefriends.org/en/xampp.html

Once you have the tools set up, go to the mysql command line and set up your LIMS environment:

mysql -u root -p

CREATE DATABASE yourdb;
GRANT ALL ON yourdb.* TO youruser@localhost IDENTIFIED BY 'yourpassword';

This last command creates a user, associates a password, and grants the user access rights to the new database, all in one command.

Now exit mysql and test your setup:

mysql -u youruser -p

USE yourdb;
SHOW TABLES;

Of course there aren't any tables yet, but it verifies that you have access as that user.

Request the latest copy of the mysql.sql file. It is a script file that will establish the LIMS db. Load into your new database like this:

mysql -u youruser -p yourdb <mysql.sql

Just for your notes, there is another similar command that will do the opposite, create a script from an existing db:

mysqldump -u youruser -p yourdb >yourbackup.sql

These two commands can be used to backup or move entire databases from one server to another, as long as they aren't too large.

Now check out the LIMS source code using subversion (documented elsewhere on this site). If you put the code under your web server's document root you should be able to navigate in your browser to localhost and see it. Now you need to set up your php environment to talk to your new database:

cd user
cp config.php.template config.php

Modify config.php with the youruser, yourpassword, and yourdb information. The host will be localhost for a local setup. There are some other things you probably want to put in there too. Getting your localhost setup to send email would require additional setup in php.ini.

Set up a data directory and make sure the apache user has read and write access to it. There is a variable in config.php that needs to know where that is, and make sure there is a trailing slash.

Last modified 10 years ago Last modified on Sep 30, 2009 7:56:44 PM