LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-30-2010, 04:59 AM   #1
tkmsr
Member
 
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798

Rep: Reputation: 39
embedding grails-1.2.2 in apache2


I downloaded grails http://grails.org and installed it.
Created a sample application hello world. It was running successfully.
In browser http://localhost:8080/helloworld
I was able to see grails running.
Now comes the problem.


To be able to always start the grails application running after boot
I wrote a script in /etc/init.d/software_grails

its contents are
Code:
#! /bin/sh
echo "Starting script grails for software"
cd /root/helloworld/
grails run-app
then update-rc.d software_grails default
so it create the scripts
now I reboot it the application could not be opened in browser

http://localhost:8080/helloworld

I have to open command prompt and go to /root/helloworld
and then execute
grails run-app

you dont have to write the name of application to run it.
logging of boot messages is enabled
/etc/default/bootlogd
BOOTLOGD_ENABLE=Yes

then I opened
/var/log/boot.
Code:
Fri Apr 30 06:10:14 2010: Starting script grails for software
Fri Apr 30 06:10:14 2010: /etc/rc2.d/S20software_grails: line 4:
grails: command not found
where as in .bashrc
Code:
export GRAILS_HOME=/root/grails
export PATH="$PATH:$GRAILS_HOME/bin"
and in /etc/profile
[/code]
PATH="$JAVA_HOME/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
[/code]
But it does not work. If I am not wrong then above method will work ONLY WHEN some one Logs in not on boot time.

Is there a way where I can embed grails in apache2
they http://www.grails.org/Deployment/ have not mentioned any thing about apache2 to deploy my applications.
 
Old 04-30-2010, 07:17 AM   #2
stuart_cherrington
Member
 
Registered: Aug 2008
Location: Get back in your Cube Unix Boy!
Distribution: rh5, oel5, debian etch, solaris
Posts: 228

Rep: Reputation: 36
In your RC script, where you have 'grails run-app' why not put the fullpath name for grails, I.e. /usr/local/bin/grails?
 
Old 04-30-2010, 07:28 AM   #3
tkmsr
Member
 
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798

Original Poster
Rep: Reputation: 39
Quote:
Originally Posted by stuart_cherrington View Post
In your RC script, where you have 'grails run-app' why not put the fullpath name for grails, I.e. /usr/local/bin/grails?
Well I extracted grails in /root so it is currently being called from /root/grails/bin.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in using GRAILS on network tkmsr Linux - Software 2 04-30-2010 07:47 AM
grails 1.0-RC2 and 2.6.26.2-xen error log to a newbie to grails tkmsr Linux - Software 0 04-28-2010 02:28 AM
some findings for reverse proxy apache2 and CMS's like joomla drupal grails etc tkmsr Linux - Server 0 04-24-2010 02:30 AM
LXer: Embedding Python In Apache2 With mod_python (Debian/Ubuntu, Fedora/CentOS, Mand LXer Syndicated Linux News 0 07-22-2008 07:20 AM
LXer: Embedding Python In Apache2 With mod_python (Debian Etch) LXer Syndicated Linux News 0 06-22-2008 08:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration