Solved

jetty on ubunutu

Posted on 2011-03-09
6
400 Views
Last Modified: 2013-12-16
Hi

I need to install jetty on ubuntu but i'm not really sure what i'm doing.

I did apt-get install jetty

and then it said it couldn't start the service as NO_START = 1 so i editted the file to N0_START = 0 as recommended and then started the service by service jetty start

I really don't know much about services under linux
Is this the correct way to start the service?

What permissions is the service running with? What user/group is it running under and how do i find out these details for a service?

thanks
0
Comment
Question by:andieje
  • 3
  • 2
6 Comments
 
LVL 4

Expert Comment

by:Joseph Ruiz
ID: 35085721
If you've edited that file while Jetty was still running, you may have caused an error that forced the service to stop.

These are the commands used to stop and start the service.
 
sudo /etc/init.d/jetty stop
sudo /etc/init.d/jetty start

Open in new window

To install Jetty:
 
sudo apt-get install jetty

Open in new window

Also, these libraries are also needed for Jetty to run correctly:
 
sudo apt-get install libjetty6-java
sudo apt-get install libjetty6-extra-java
sudo apt-get install jetty

Open in new window

If you've ran all these commands with sudo, you have installed them under ~root and they are running as such; with root permissions. I always check ubuntu forums for unbuntu related stuff.
0
 

Author Comment

by:andieje
ID: 35085907
i editted the file before i started the service

I coulnd't install the 2 packages:
 sudo apt-get install libjetty6-java
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Package libjetty6-java is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package libjetty6-java has no installation candidate
0
 

Author Comment

by:andieje
ID: 35085939
sudo apt-get install libjetty6-extra-java
Reading package lists... Done
Building dependency tree      
Reading state information... Done
E: Couldn't find package libjetty6-extra-java
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 9

Accepted Solution

by:
svs earned 500 total points
ID: 35086213
jetty is running under JETTY_USER (jetty by default).  that variable is set in /etc/default/jetty.

in Ubuntu (and Debian), services usually are configured via files in /etc/default, which are sourced (included) by service's startup script (in /etc/init or /etc/init.d).

the NO_START trick is a common way to install a service in disabled state.

libjetty6-* packages are obsolete, use libjetty-* ones.
0
 

Author Comment

by:andieje
ID: 35098358
ah this sounds familar - i think i have been told this before: services start off as root and then drop down to the user specified in the config files. is that right?
0
 
LVL 9

Expert Comment

by:svs
ID: 35099710
Yes
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
AWS Central Authentication 1 103
cannot rename datastore 3 98
I NEED A "BARE" LINUX ... 9 91
Install XRDP on Ubuntu Server 16.10 x64 3 63
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question