Changes between Initial Version and Version 1 of QuickStartServer


Ignore:
Timestamp:
Mar 16, 2011, 12:41:31 PM (9 years ago)
Author:
work@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • QuickStartServer

    v1 v1  
     1= Setting up a dedicated server =
     2In this guide we will assume you use Linux as a hosting platform. While you will be able to run GSCF on Windows, using Linux is preferable. This guide is written with [http://www.debian.org/ Debian GNU/Linux] (or Ubuntu) as a hosting platform. As Linux distributions differ other distributions may require minor changes in setup, but following this guide you should be able to get things running on other distributions as well.
     3
     4== Assumptions ==
     5The tutorial is based on a number of assumptions:
     6* you have root access to the server
     7* we will set up a gscf test instance on test.mysite.com on IP (1.2.3.4)
     8* a DNS records is available for test.mysite.com
     9* our database will be named 'mytestdb' with username 'mydbuser' and password 'mydbpassword'
     10* we will have one administrator user (user 'admin', password 'adminpw')
     11* we will have one default user (user 'user', password 'userpw')
     12
     13== Requirements ==
     14Before we can set up the server, the following requirements should be met:
     15* Apache Tomcat ≥ 6.x.x
     16* Apache Webserver ≥ 2.x (+mod_proxy, +mod_rewrite)
     17* PostgreSQL database server ≥ 8.4
     18
     19Installation is quick and easy:
     20
     21{{{
     22apt-get install tomcat6 postgresql-8.4 apache2 libapache2-mod-proxy-html libapache2-mod-jk
     23}}}
     24
     25== Set Up the Database ==
     26su to user postgres and create the database:
     27
     28{{{
     29root@nmcdsp:~# su - postgres
     30postgres@nmcdsp:~$ psql
     31Welcome to psql 8.3.14, the PostgreSQL interactive terminal.
     32
     33Type:  \copyright for distribution terms
     34       \h for help with SQL commands
     35       \? for help with psql commands
     36       \g or terminate with semicolon to execute query
     37       \q to quit
     38
     39postgres=# create database 'mytestdb';
     40CREATE DATABASE
     41postgres=# create user mydbuser password 'mydbpassword';
     42CREATE ROLE
     43postgres=# grant all privileges on database mytestdb to mydbuser;
     44GRANT
     45postgres=# grant all privileges on database mytestdb to mydbuser;
     46GRANT
     47postgres=# alter database mytestdb owner to mydbuser;
     48ALTER DATABASE
     49postgres=# \l
     50           List of databases
     51    Name     |     Owner     | Encoding
     52-------------+---------------+----------
     53 mytestdb    | mydbuser      | UTF8
     54 postgres    | postgres      | UTF8
     55 template0   | postgres      | UTF8
     56 template1   | postgres      | UTF8
     57(16 rows)
     58
     59postgres=# \q
     60postgres@nmcdsp:~$ exit
     61logout
     62root@nmcdsp:~#
     63}}}
     64
     65== Set up the application configuration ==
     66Currently this is a manual step, but in the future the application will contain a getting started wizard which will do this for you (see #185).
     67
     68GSCF supports externalized configuration which it expects to be in a ''.grails-config'' folder on the homedir of the tomcat user. In this case the homedir of the ''tomcat6'' user is ''/usr/share/tomcat6/.grails-config'' so it will try to load the configuration file ''/usr/share/tomcat6/.grails-config/nmcdsptest-gscf.properties''.
     69
     70First, create the folder to hold the configuration file(s):
     71{{{
     72root@nmcdsp:~# cd /usr/share/tomcat6
     73root@nmcdsp:/usr/share/tomcat6# mkdir .grails-config;chown -R tomcat6.tomcat6 .grails-config;chmod gou+rx .grails-config
     74root@nmcdsp:/usr/share/tomcat6# cd .grails-config
     75}}}
     76
     77Then create the configuration file itself:
     78{{{
     79root@nmcdsp:/usr/share/tomcat6/.grails-config# nano nmcdsptest-gscf.properties
     80}}
     81
     82And paste the following configuration:
     83{{{
     84# Test build default configuration
     85# server URL
     86grails.serverURL=http://test.mysite.com
     87
     88# DATABASE
     89dataSource.driverClassName=org.postgresql.Driver
     90dataSource.dialect=org.hibernate.dialect.PostgreSQLDialect
     91dataSource.url=jdbc:postgresql://localhost:5432/mytestdb
     92dataSource.dbCreate=update
     93dataSource.username=mydbuser
     94dataSource.password=mydbpassword
     95#dataSource.logSql=false
     96
     97# E-MAIL
     98# use authenticated smtp (make sure your firewall allows
     99# outbound connections on port 465), or
     100#  - comment username and password to use non-authenticated
     101#    mail (on port 25)
     102#  - comment out all to use local mailer (e.g. postfix /
     103#    sendmail on port 25)
     104grails.mail.host=smtp.gmail.com
     105grails.mail.username=gscf.default.installation@gmail.com
     106grails.mail.password=s7udycap7r3
     107
     108# SpringSecurity E-Mail Settings
     109grails.plugins.springsecurity.ui.forgotPassword.emailFrom=gscf.default.installation@gmail.com
     110
     111# module configuration
     112#modules.sam.url=http://test.sam.nmcdsp.org
     113#modules.metabolomics.url=http://test.metabolomics.nmcdsp.org
     114#modules.metagenomics.url=http://test.metagenomics.nmcdsp.org
     115
     116# Number of seconds to keep rest results from modules in cache
     117modules.cacheDuration = 600
     118
     119# default application users
     120authentication.users.admin.username=admin
     121authentication.users.admin.password=adminpw
     122authentication.users.admin.email=admin@mysite.com
     123authentication.users.admin.administrator=true
     124authentication.users.user.username=user
     125authentication.users.user.password=userpw
     126authentication.users.user.email=user@mysite.com
     127authentication.users.user.administrator=false
     128}}}
     129
     130Press CTRL-X to save the file (and enter Y).
     131
     132== Install GSCF ==
     133Download and install the latest WAR from [https://trac.nbic.nl/gscf/downloads https://trac.nbic.nl/gscf/downloads] (make sure to replace the URL and WAR names with the most recent versions).
     134
     135{{{
     136root@nmcdsp:~# curl "https://trac.nbic.nl/gscf/downloads/8" > /tmp/gscf-0.6.6-nmcdsptest.war
     137  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
     138                                 Dload  Upload   Total   Spent    Left  Speed
     139100 47.8M  100 47.8M    0     0  6075k      0  0:00:08  0:00:08 --:--:-- 6602k
     140root@nmcdsp:~# cd /var/lib/tomcat6/webapps/
     141root@nmcdsp:/var/lib/tomcat6/webapps# cp /tmp/gscf-0.6.6-nmcdsptest.war .;chown tomcat6.tomcat6 *.war;chmod gou+rx *.war
     142root@nmcdsp:/var/lib/tomcat6/webapps#
     143}}}
     144
     145