You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Petteri Sulonen <ps...@gmail.com> on 2010/02/20 11:02:11 UTC

Running Lenya 2 as daemon

Hi, folks --

Is there an init script available somewhere to run Lenya 2
(standalone) as a Unix daemon? I found one for Lenya 1.2.5, but not
2.0.3, but it appears that ./lenya.sh for 2.0.3 doesn't accept 'stop'
as a parameter, so it's not easily portable.

If not, what's the recommended way of accomplishing this?

TIA,

/Petteri

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Running Lenya 2 as daemon

Posted by Andreas Hartmann <an...@apache.org>.
Am 20.02.10 11:02, schrieb Petteri Sulonen:
> Is there an init script available somewhere to run Lenya 2
> (standalone) as a Unix daemon? I found one for Lenya 1.2.5, but not
> 2.0.3, but it appears that ./lenya.sh for 2.0.3 doesn't accept 'stop'
> as a parameter, so it's not easily portable.

Maybe this helps:

http://code.google.com/p/debian-tomcat-scripts/source/browse/trunk/multiple-instances/init.d/tomcat6

-- Andreas




-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Running Lenya 2 as daemon

Posted by Martin Dominguez <ma...@wbsgo.com>.
I made an script to run Lenya 2, and to stop it, I kill the process. It's a
simple solution that works fine.

A code example:
************************************************
pid=`ps -ef | grep Djava | grep -v grep | cut -c 10-15`
      if [ $pid ]; then
         echo "Stoping Lenya ...."
         kill -9 $pid > /dev/null 2>&1
         echo "Lenya Stoped!"
************************************************
Regards.

Martin.-


Petteri Sulonen-2 wrote:
> 
> Hi, folks --
> 
> Is there an init script available somewhere to run Lenya 2
> (standalone) as a Unix daemon? I found one for Lenya 1.2.5, but not
> 2.0.3, but it appears that ./lenya.sh for 2.0.3 doesn't accept 'stop'
> as a parameter, so it's not easily portable.
> 
> If not, what's the recommended way of accomplishing this?
> 
> TIA,
> 
> /Petteri
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Running-Lenya-2-as-daemon-tp27664915p27665185.html
Sent from the Lenya - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Running Lenya 2 as daemon

Posted by Andreas Hartmann <an...@apache.org>.
Am 20.02.10 11:02, schrieb Petteri Sulonen:
> Is there an init script available somewhere to run Lenya 2
> (standalone) as a Unix daemon? I found one for Lenya 1.2.5, but not
> 2.0.3, but it appears that ./lenya.sh for 2.0.3 doesn't accept 'stop'
> as a parameter, so it's not easily portable.

Maybe this helps:

http://code.google.com/p/debian-tomcat-scripts/source/browse/trunk/multiple-instances/init.d/tomcat6

-- Andreas




-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Re: Running Lenya 2 as daemon

Posted by ps...@gmail.com.
To summarize, for the benefit of someone who might eventually be searching  
this mailing list with a similar question, here's what I did to get Lenya  
running as a webapp under a "standard" Jetty, started and stopped via  
/etc/init.d in the usual way:

1. Build Lenya as per the instructions at http://lenya.apache.org/. It  
doesn't matter whether it's standalone or for a .war
2. Install Jetty 6.1 in your preferred way (eg aptitude install jetty on  
Debian-derivatives).
3. Copy the directory [LENYA_SRC]/build/lenya/webapp to  
[JETTY_HOME]/webapps, and name it whatever you want to see in the URI path  
(eg "lenya").
4. Install sun-java6-jdk and run Jetty with that, eg by making a symlink  
/usr/lib/jvm/default-java -> java-6-sun-1.6.0.15

Re: Running Lenya 2 as daemon

Posted by Petteri Sulonen <ps...@gmail.com>.
Yup, that did it. Thanks again!

/Petteri

On Sat, Feb 20, 2010 at 6:30 PM, Petteri Sulonen <ps...@gmail.com> wrote:
> Never mind, I found it. Hit another snag, but that's probably a
> misconfiguration with Jetty. Thanks for your help.
>
> /Petteri
>
> On Sat, Feb 20, 2010 at 6:25 PM, Petteri Sulonen <ps...@gmail.com> wrote:
>> No luck, fails with the same NoClassDefFound error. Would you happen
>> to know which library this is in?
>>
>> TIA, Petteri
>>
>> On Sat, Feb 20, 2010 at 6:08 PM, Richard Frovarp <rf...@apache.org> wrote:
>>> On 2/20/2010 9:11 AM, Petteri Sulonen wrote:
>>>>
>>>> Thanks. My preferred way would be to run it under the latest Jetty set
>>>> up with Tanuki's wrapper.
>>>>
>>>> I tried to run it under Jetty 6.1.20 installed on Ubuntu in the usual
>>>> way (with aptitude), but it failed with a NoClassDefFoundError
>>>> (org/apache/regexp/RESyntaxException, caused by
>>>> java.lang.ClassNotFoundException:
>>>> org.apache.regexp.RESyntaxException).
>>>>
>>>> I didn't do much work on this, though: I just took the webapp
>>>> directory from the standalone build and dropped it under
>>>> [JETTY_HOME]/webapps, and dropped the .jars under build/lenya/lib into
>>>> [JETTY_HOME]/lib/ext. That clearly didn't work. Do I need to build it
>>>> differently, e.g. using the instructions for Tomcat, or am I doing
>>>> something else wrong?
>>>>
>>>> Thanks again,
>>>>
>>>> (BTW, how do I go about submitting a patch? The TinyMCE editor is set
>>>> up very slightly wrong in the default configuration; some of the
>>>> buttons and functions don't quite work, and all it took to fix them
>>>> was to add the required elements (b, i, sub, sup) to
>>>> tiny_valid_elements.js.)
>>>>
>>>> /Petteri
>>>>
>>>
>>> Looks like the Tomcat instructions need to be updated. There is a war target
>>> for build
>>> ./build.sh war
>>>
>>> That will tell you the path to which it built the war. From there move the
>>> war into the webapp directory of Jetty, and make sure the libraries
>>> mentioned are in a path that Jetty looks. That should do it for you.
>>>
>>> Patches are submitted to our Bugzilla area. Follow the Bug Tracker link on
>>> the right hand side navigation.
>>> http://lenya.apache.org/community.html
>>>
>>> I'm not one of the TinyMCE users, so I'm not quite sure why that is setup
>>> the way it is. Submit your patch and we can take a look at it.
>>>
>>> Richard
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
>>> For additional commands, e-mail: user-help@lenya.apache.org
>>>
>>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Running Lenya 2 as daemon

Posted by Petteri Sulonen <ps...@gmail.com>.
Never mind, I found it. Hit another snag, but that's probably a
misconfiguration with Jetty. Thanks for your help.

/Petteri

On Sat, Feb 20, 2010 at 6:25 PM, Petteri Sulonen <ps...@gmail.com> wrote:
> No luck, fails with the same NoClassDefFound error. Would you happen
> to know which library this is in?
>
> TIA, Petteri
>
> On Sat, Feb 20, 2010 at 6:08 PM, Richard Frovarp <rf...@apache.org> wrote:
>> On 2/20/2010 9:11 AM, Petteri Sulonen wrote:
>>>
>>> Thanks. My preferred way would be to run it under the latest Jetty set
>>> up with Tanuki's wrapper.
>>>
>>> I tried to run it under Jetty 6.1.20 installed on Ubuntu in the usual
>>> way (with aptitude), but it failed with a NoClassDefFoundError
>>> (org/apache/regexp/RESyntaxException, caused by
>>> java.lang.ClassNotFoundException:
>>> org.apache.regexp.RESyntaxException).
>>>
>>> I didn't do much work on this, though: I just took the webapp
>>> directory from the standalone build and dropped it under
>>> [JETTY_HOME]/webapps, and dropped the .jars under build/lenya/lib into
>>> [JETTY_HOME]/lib/ext. That clearly didn't work. Do I need to build it
>>> differently, e.g. using the instructions for Tomcat, or am I doing
>>> something else wrong?
>>>
>>> Thanks again,
>>>
>>> (BTW, how do I go about submitting a patch? The TinyMCE editor is set
>>> up very slightly wrong in the default configuration; some of the
>>> buttons and functions don't quite work, and all it took to fix them
>>> was to add the required elements (b, i, sub, sup) to
>>> tiny_valid_elements.js.)
>>>
>>> /Petteri
>>>
>>
>> Looks like the Tomcat instructions need to be updated. There is a war target
>> for build
>> ./build.sh war
>>
>> That will tell you the path to which it built the war. From there move the
>> war into the webapp directory of Jetty, and make sure the libraries
>> mentioned are in a path that Jetty looks. That should do it for you.
>>
>> Patches are submitted to our Bugzilla area. Follow the Bug Tracker link on
>> the right hand side navigation.
>> http://lenya.apache.org/community.html
>>
>> I'm not one of the TinyMCE users, so I'm not quite sure why that is setup
>> the way it is. Submit your patch and we can take a look at it.
>>
>> Richard
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
>> For additional commands, e-mail: user-help@lenya.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Running Lenya 2 as daemon

Posted by Petteri Sulonen <ps...@gmail.com>.
No luck, fails with the same NoClassDefFound error. Would you happen
to know which library this is in?

TIA, Petteri

On Sat, Feb 20, 2010 at 6:08 PM, Richard Frovarp <rf...@apache.org> wrote:
> On 2/20/2010 9:11 AM, Petteri Sulonen wrote:
>>
>> Thanks. My preferred way would be to run it under the latest Jetty set
>> up with Tanuki's wrapper.
>>
>> I tried to run it under Jetty 6.1.20 installed on Ubuntu in the usual
>> way (with aptitude), but it failed with a NoClassDefFoundError
>> (org/apache/regexp/RESyntaxException, caused by
>> java.lang.ClassNotFoundException:
>> org.apache.regexp.RESyntaxException).
>>
>> I didn't do much work on this, though: I just took the webapp
>> directory from the standalone build and dropped it under
>> [JETTY_HOME]/webapps, and dropped the .jars under build/lenya/lib into
>> [JETTY_HOME]/lib/ext. That clearly didn't work. Do I need to build it
>> differently, e.g. using the instructions for Tomcat, or am I doing
>> something else wrong?
>>
>> Thanks again,
>>
>> (BTW, how do I go about submitting a patch? The TinyMCE editor is set
>> up very slightly wrong in the default configuration; some of the
>> buttons and functions don't quite work, and all it took to fix them
>> was to add the required elements (b, i, sub, sup) to
>> tiny_valid_elements.js.)
>>
>> /Petteri
>>
>
> Looks like the Tomcat instructions need to be updated. There is a war target
> for build
> ./build.sh war
>
> That will tell you the path to which it built the war. From there move the
> war into the webapp directory of Jetty, and make sure the libraries
> mentioned are in a path that Jetty looks. That should do it for you.
>
> Patches are submitted to our Bugzilla area. Follow the Bug Tracker link on
> the right hand side navigation.
> http://lenya.apache.org/community.html
>
> I'm not one of the TinyMCE users, so I'm not quite sure why that is setup
> the way it is. Submit your patch and we can take a look at it.
>
> Richard
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Running Lenya 2 as daemon

Posted by Richard Frovarp <rf...@apache.org>.
On 2/20/2010 9:11 AM, Petteri Sulonen wrote:
> Thanks. My preferred way would be to run it under the latest Jetty set
> up with Tanuki's wrapper.
>
> I tried to run it under Jetty 6.1.20 installed on Ubuntu in the usual
> way (with aptitude), but it failed with a NoClassDefFoundError
> (org/apache/regexp/RESyntaxException, caused by
> java.lang.ClassNotFoundException:
> org.apache.regexp.RESyntaxException).
>
> I didn't do much work on this, though: I just took the webapp
> directory from the standalone build and dropped it under
> [JETTY_HOME]/webapps, and dropped the .jars under build/lenya/lib into
> [JETTY_HOME]/lib/ext. That clearly didn't work. Do I need to build it
> differently, e.g. using the instructions for Tomcat, or am I doing
> something else wrong?
>
> Thanks again,
>
> (BTW, how do I go about submitting a patch? The TinyMCE editor is set
> up very slightly wrong in the default configuration; some of the
> buttons and functions don't quite work, and all it took to fix them
> was to add the required elements (b, i, sub, sup) to
> tiny_valid_elements.js.)
>
> /Petteri
>    

Looks like the Tomcat instructions need to be updated. There is a war 
target for build
./build.sh war

That will tell you the path to which it built the war. From there move 
the war into the webapp directory of Jetty, and make sure the libraries 
mentioned are in a path that Jetty looks. That should do it for you.

Patches are submitted to our Bugzilla area. Follow the Bug Tracker link 
on the right hand side navigation.
http://lenya.apache.org/community.html

I'm not one of the TinyMCE users, so I'm not quite sure why that is 
setup the way it is. Submit your patch and we can take a look at it.

Richard


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Running Lenya 2 as daemon

Posted by Petteri Sulonen <ps...@gmail.com>.
Thanks. My preferred way would be to run it under the latest Jetty set
up with Tanuki's wrapper.

I tried to run it under Jetty 6.1.20 installed on Ubuntu in the usual
way (with aptitude), but it failed with a NoClassDefFoundError
(org/apache/regexp/RESyntaxException, caused by
java.lang.ClassNotFoundException:
org.apache.regexp.RESyntaxException).

I didn't do much work on this, though: I just took the webapp
directory from the standalone build and dropped it under
[JETTY_HOME]/webapps, and dropped the .jars under build/lenya/lib into
[JETTY_HOME]/lib/ext. That clearly didn't work. Do I need to build it
differently, e.g. using the instructions for Tomcat, or am I doing
something else wrong?

Thanks again,

(BTW, how do I go about submitting a patch? The TinyMCE editor is set
up very slightly wrong in the default configuration; some of the
buttons and functions don't quite work, and all it took to fix them
was to add the required elements (b, i, sub, sup) to
tiny_valid_elements.js.)

/Petteri

On Sat, Feb 20, 2010 at 4:56 PM, Richard Frovarp <rf...@apache.org> wrote:
> On 2/20/2010 4:02 AM, Petteri Sulonen wrote:
>>
>> Hi, folks --
>>
>> Is there an init script available somewhere to run Lenya 2
>> (standalone) as a Unix daemon? I found one for Lenya 1.2.5, but not
>> 2.0.3, but it appears that ./lenya.sh for 2.0.3 doesn't accept 'stop'
>> as a parameter, so it's not easily portable.
>>
>> If not, what's the recommended way of accomplishing this?
>>
>> TIA,
>>
>> /Petteri
>>
>
> My recommended way would be to run it under a properly configured Java
> application server that is setup as a daemon. You of course could use Jetty
> or Tomcat for the job. While I have ran it for demonstration purposes from
> the script, I don't like doing that long term.
>
> Richard
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Running Lenya 2 as daemon

Posted by Richard Frovarp <rf...@apache.org>.
On 2/20/2010 4:02 AM, Petteri Sulonen wrote:
> Hi, folks --
>
> Is there an init script available somewhere to run Lenya 2
> (standalone) as a Unix daemon? I found one for Lenya 1.2.5, but not
> 2.0.3, but it appears that ./lenya.sh for 2.0.3 doesn't accept 'stop'
> as a parameter, so it's not easily portable.
>
> If not, what's the recommended way of accomplishing this?
>
> TIA,
>
> /Petteri
>    
My recommended way would be to run it under a properly configured Java 
application server that is setup as a daemon. You of course could use 
Jetty or Tomcat for the job. While I have ran it for demonstration 
purposes from the script, I don't like doing that long term.

Richard

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org