forked from kashmatic/mGSV
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALLATION
93 lines (65 loc) · 4.67 KB
/
INSTALLATION
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
System Requirements
-------------------
The current version of multi-Genome Synteny Viewer was only tested on Ubuntu 10.04 OS. The minimum requirements include:
- Apache 1.3 or higher (http://www.apache.org)
- PHP 5.3.3 or higher (http://www.php.net/)
- MySQL 5.0 or higher (http://dev.mysql.com/)
- GD library. (http://php.net/manual/en/book.image.php)
Section I: Install Prerequisites
--------------------------------
On our Ubuntu OS, Apache, PHP, GD library, and MySQL were installed using apt-get. The commands are listed below. You can also use yum, rpm, dpkg, etc., depending on the operating system- speak to your systems administrator about it.
shell> sudo apt-get install apache2
shell> sudo apt-get install php5
shell> sudo apt-get install libapache2-mod-php5
shell> sudo apt-get install mysql-server
shell> sudo apt-get install php5-mysql
Section II: MySQL Database Setup
--------------------------------
mGSV requires a MySQL database to store data. Listed below are steps to create a user, database, and one table within the database.
1. Log into MySQL, replace <password> with root password
shell> mysql -u root -p <password>
2. Create 'mgsv' database
mysql> CREATE DATABASE mgsv;
3. Create a user 'mgsv_user'
mysql> CREATE USER 'mgsvuser'@'localhost' IDENTIFIED BY 'mgsvpass';
4. Set privileges to 'mgsv_user' to use database
mysql> GRANT SELECT, INSERT, CREATE, DROP ON mgsv.* TO 'mgsvuser'@'localhost';
5. Create table "userinfo" in 'mgsv' database by executing the following MySQL command
mysql> use mgsv;
mysql> CREATE TABLE IF NOT EXISTS `userinfo` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`email` text NOT NULL,
`hash` text NOT NULL,
`synfilename` text NOT NULL,
`annfilename` text NOT NULL,
`url` text NOT NULL,
`session_id` text NOT NULL,
`annImage` int(5) NOT NULL,
`create_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
If you use different database settings, please refer to the MySQL document for instructions on how to configure the database.
Section III: Set up the multi-Genome Synteny Viewer
-----------------------------------------
1. Download the source code from the mGSV website http://cas-bioinfo.cas.unt.edu/mgsv/software.php
2. Unzip the file mgsv.v1.0.tar.gz. This should create a folder called 'mgsv'.
shell> tar zxvf mgsv.v1.0.tar.gz
3. Move the folder 'mgsv' to DocumentRoot of Apache web server. By default, the DocumentRoot of Apache is /var/www/ (speak to the system administrator to know the exact DocumentRoot).
shell> mv mgsv /var/www/.
4. Enter 'mgsv' directory and you should see another directory called 'syn'. Execute Linux commands to create and change permission for 'tmp' folder. It has to be world accessible to store the uploaded files.
shell> cd /var/www/mgsv
shell> mkdir tmp
shell> chmod -R 777 tmp
5. If you have set up the MySQL database name, user and password as mentioned in STEP II, you can skip this step. However, if your MySQL setting is different, you must open the file 'settings.php' in 'mgsv/lib/' directory with any text editor you are comfortable with (e.g., pico, emacs, or vi), and modify lines 4, 5, 6, and 7 to change the variables $database_name, $database_user, $database_pass, and $database_host.
6. Under 'mgsv' folder you should see a file called 'Arial.tff'. Copy it to '/usr/share/fonts/truetype/.'. You may need the sudo privilege- talk to your system administrator if necessary.
shell> cp Arial.ttf /usr/share/fonts/truetype/.
7. Cleanup scripts are provided to drop database synteny and annotation tables, remove entries from database table 'userinfo' and delete the folder containing image files which are older than 60 days. This task is accomplished by cron job to run the cleanup script every day. To create a cron job, use the command below:
shell> crontab -e
At the last line of crontab, copy and paste the line below, and provide the exact path to mgsv/lib/cleanup.php
30 04 * * * /var/www/mgsv/lib/cleanup.php
The script cleanup.php will be executed at 4:30 AM every morning.
8. mGSV uses the mail function from PHP to send email to users. Speak to your system administrator to provide required information in the PHP configuration file called 'php.ini'.
9. When installation completes, you can now open Install/index.php (i.e., http://<YOUR_SERVER_DOMAIN_NAME>/mgsv/Install/), which verifies prerequisites, database setup, and installation. YOUR_SERVER_DOMAIN_NAME refers to the domain name of your server.
Section IV: Additional notes:
1. For troubleshooting, please use the contact details at http://cas-bioinfo.cas.unt.edu/mgsv/mgsvcontact.php
2. Refer to the ARCHITECTURE.txt file to understand the architecture of mGSV.