Changes between Initial Version and Version 1 of QuickStartServer

Mar 16, 2011, 12:41:31 PM (9 years ago)



  • 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 [ 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.
     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 on IP (
     8* a DNS records is available for
     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')
     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
     19Installation is quick and easy:
     22apt-get install tomcat6 postgresql-8.4 apache2 libapache2-mod-proxy-html libapache2-mod-jk
     25== Set Up the Database ==
     26su to user postgres and create the database:
     29root@nmcdsp:~# su - postgres
     30postgres@nmcdsp:~$ psql
     31Welcome to psql 8.3.14, the PostgreSQL interactive terminal.
     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
     39postgres=# create database 'mytestdb';
     41postgres=# create user mydbuser password 'mydbpassword';
     43postgres=# grant all privileges on database mytestdb to mydbuser;
     45postgres=# grant all privileges on database mytestdb to mydbuser;
     47postgres=# alter database mytestdb owner to mydbuser;
     49postgres=# \l
     50           List of databases
     51    Name     |     Owner     | Encoding
     53 mytestdb    | mydbuser      | UTF8
     54 postgres    | postgres      | UTF8
     55 template0   | postgres      | UTF8
     56 template1   | postgres      | UTF8
     57(16 rows)
     59postgres=# \q
     60postgres@nmcdsp:~$ exit
     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).
     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/''.
     70First, create the folder to hold the configuration file(s):
     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
     77Then create the configuration file itself:
     79root@nmcdsp:/usr/share/tomcat6/.grails-config# nano
     82And paste the following configuration:
     84# Test build default configuration
     85# server URL
     88# DATABASE
     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)
     108# SpringSecurity E-Mail Settings
     111# module configuration
     116# Number of seconds to keep rest results from modules in cache
     117modules.cacheDuration = 600
     119# default application users
     130Press CTRL-X to save the file (and enter Y).
     132== Install GSCF ==
     133Download and install the latest WAR from [] (make sure to replace the URL and WAR names with the most recent versions).
     136root@nmcdsp:~# curl "" > /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