login community faq

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 Jan 19 '12 at 09:54

Tony%20Cronin's gravatar image

Tony Cronin
32

edited Jan 19 '12 at 10:20

iliasr's gravatar image

iliasr ♦♦
7013


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.

answered Jan 19 '12 at 11:20

iliasr's gravatar image

iliasr ♦♦
7013

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

(Jan 19 '12 at 15:16) Tony Cronin Tony%20Cronin's gravatar image
Your answer
If you have an answer to the above question, then use the form below. Otherwise, use the appropriate 'add new comment' button above to post your feedback.
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

Tags:

×1

Asked: Jan 19 '12 at 09:54

Seen: 438 times

Last updated: Jan 19 '12 at 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