Before downloading and installing BOWS, make sure that your computer or server fulfills the following requirements:
BOWS requires MySQL. If you are not familiar on how installing MySQL in a UNIX platform, follow these steps:
If you're using Fedora, CentOS or RedHat, type this command to download and install MySQL:
> su -c "yum install mysql mysql-server"
In case you’re using Debian or Ubuntu, use this command:
> sudo apt-get install mysql mysql-server
After the installation, type these commands to configure your MySQL appropriately:
> chkconfig mysqld on
> mysql_install_db
> service mysqld start
Then, create an administrator account (usually referred as root) and a password for it by typing:
> mysqladmin -u root password “[yourpassword]”
Now you are able to access the administrator account of your MySQL with the username “root” and password “[yourpassword]” by typing in the Terminal:
> mysql -u root -p
Log in as root to create a new user called "bows" and grant permissions to create databases by typing the commands:
mysql> CREATE USER 'bows'@'localhost' IDENTIFIED BY 'bows123';
mysql> GRANT ALL PRIVILEGES ON * . * TO 'bows'@'localhost';
This user account is required by BOWS (see 2.3. Creating and configuring BOWS database).
The main code of MaLe-PSI-BLAST was developed in Java (v.1.6.0). To install Java in your computer, type on Terminal the following command line according to your Unix distribution:
Debian, Ubuntu, etc.
> sudo apt-get install openjdk-7-jre
Fedora, Oracle Linux, Red Hat Enterprise Linux, etc.
> su -c "yum install java-1.7.0-openjdk"
To install Tomcat you simple extract the archive and start the tomcat server. Tomcat by default start on port 8080. To allow access in this port edit iptables. Log in as root, then type:
> vi /etc/sysconfig/iptables
Add this line above the "-A INPUT -j REJECT" lines: (press key "i" to edit) -A INPUT -p tcp -m state --state NEW -m tcp --dport 8080 -j ACCEPT
You should have something like this:
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [4:464]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 8080 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
To close and save alterations press "Esc" then ":x!"
After that restart iptables, typing the command:
> /etc/init.d/iptables restart
We recommend install Apache Tomcat into /usr/local/ folder, to do this log in as root typing in the Terminal:
> su
Then go to directory /usr/local by typing in the Terminal:
> cd /usr/local/
After that download Apache Tomcat7 typing:
> wget http://ftp.unicamp.br/pub/apache/tomcat/tomcat-7/v7.0.53/bin/apache-tomcat-7.0.53.tar.gz
Decompress the file typing the following command:
> tar xvzf apache-tomcat-7.0.53.tar.gz
And finally start tomcat:
> cd apache-tomcat-7.0.53
> bin/startup.sh
To configure Tomcat as service type the following commands:
Change to the /etc/init.d directory and create a script called 'tomcat' as shown below:
> cd /etc/init.d/
> vi tomcat
Attention to copy this script, check if JAVA_HOME folder is correct:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | |
Then change file permission:
> chmod 755 tomcat
Now we use the chkconfig utility to have Tomcat start at boot time typing the commands:
> chkconfig --add tomcat
> chkconfig --level 234 tomcat on
BOWS is available at https://sourceforge.net/projects/bows/files/latest/download
After downloading the file, open a terminal, go to the directory where BOWS was downloaded and extract the content of BOWS.tar.gz by typing:
> tar -xzvf BOWS.tar.gz
BOWS is configured to access MySQL as user "bows" with password "bows123". Here we assume that you have MySQL installed in your computer and create this user account (If not, see section MySQL in Requirements). To create and fill a MySQL database for BOWS usage, follow this procedures:
Open a Terminal and access the bows account on MySQL by typing the command:
> mysql -u bows -pbows123
In the MySQL environment, create a database named bows by typing this command:
mysql> create database bows;
To ensure that the database was created type the command:
mysql> show databases;
You will find the file "bows.sql" corresponding to database dump into the folder BOWS/
To restore the tables into database, type the following command in the Terminal:
> mysql --user=bows --password=bows123 bows < bows.sql
To install the BOWS service, copy the file "BOWS.war" file into "webapps" folder of Apache Tomcat:
> cp BOWS.war /usr/local/apache-tomcat-7.0.53/webapps/
Then restart the tomcat service by typing:
> service tomcat restart
After that BOWS will be working at address http://localhost:8080/BOWS/