Hi,

I've read and followed the excellent tomcat installation guide. I was wondering could anyone point me to a similar webfaction specific grails installation guide?

Thank you

asked 19 Jan '12, 09:54

Tony%20Cronin's gravatar image

Tony Cronin
32
accept rate: 0%

edited 19 Jan '12, 10:20

iliasr's gravatar image

iliasr ♦♦
9364


Here's how to get a bare Grails application up and running:

  1. Go to Apps in the control panel and create a new 'custom app listening on port' application. Name it as you please and make a note of the port number assigned to the app. For this example, I'll name it 'hello_grails'.

  2. Edit a website record, or add a new one, to host your grails app. Let's say that we will host this app at ilias.webfactional.com

  3. Login to your server via SSH and download Grails source and place it to the lib directory.

      cd ~/lib
      wget http://dist.springframework.org.s3.amazonaws.com/release/GRAILS/grails-2.0.0.zip
      unzip grails-2.0.0.zip
      ln -s grails-2.0.0 grails
      rm grails-2.0.0.zip
      cd ..

  4. Edit your .bashrc file with your favourite editor and add the following exports:

      export JAVA_HOME=/usr/lib/jvm/java
      export GRAILS_HOME=$HOME/lib/grails
      export PATH="$PATH:$GRAILS_HOME/bin"

  5. This should make your grails executable available:

      $ grails -version
      Grails version: 2.0.0

  6. Create a new grails app and start your server:

      cd ~/webapps/
      grails create-app hello_grails
      cd hello_grails
      grails -Dserver.port=YOUR_PORT run-app &

  7. Visit your website at http://ilias.webfactional.com/hello_grails and you'll be welcomed with a friendly Grails page.

Of course, serving your website from the developer server is not a best practice, and while it might handle a small amount of traffic, it would be better export a war file of your application and deploy it using a servlet like Tomcat.

link

answered 19 Jan '12, 11:20

iliasr's gravatar image

iliasr ♦♦
9364
accept rate: 33%

thank you ilisar that worked brilliantly. just had to edit .bashrc as you said, log out and login again. And i'm ready to rock.

working through this [tutorial] (https://www.ibm.com/developerworks/java/library/j-grails01158/)

tony

(19 Jan '12, 15:16) Tony Cronin Tony%20Cronin's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×1

Asked: 19 Jan '12, 09:54

Seen: 648 times

Last updated: 19 Jan '12, 15:34

Related questions

Plans & prices    Sign up    Why WebFaction?    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited