Solved

jetty on ubunutu

Posted on 2011-03-09
6
388 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:Xiurzeph
Comment Utility
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
Comment Utility
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
Comment Utility
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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 9

Accepted Solution

by:
svs earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
Yes
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now