NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Installing/running on Linux (specifically Ubuntu) with Glassfish/J2EE

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
karlkras



Joined: 24 Feb 2009
Posts: 57

PostPosted: Sat Mar 05, 2011 10:05 pm    Post subject: Installing/running on Linux (specifically Ubuntu) with Glassfish/J2EE Reply with quote

I see no special instructions for this in the install information for Linux so if someone here might shed some light on this.
In my attempts to get the NB J2EE bundle (NB 6.9 w/ GF 3) installed on a Ubuntu 10.10 system I've run into a number of permission issues which has had me doing the Google 2 step the past couple days in order to fix. I wound up installing GF and NB separately in order to get GF configured under proper (and safe) permissions so I can assign non-root users to administrate and start the server.

I've figured this part out, found some good on-line discussion about this, but on the flip side it appears that I am forced to run Netbeans as administrator (root) since out of the box when run out of a non-root user environment it is unable to modify necessary GF files when an attempt is made to define it through the Add Server interface of NB. It also doesn't mention why it fails, had to look that bit up too.
While it works as expected while running as root, this is far from ideal and defeats my purpose. I would rather not have to store all of my NB settings and (if not manually modified) project images under the root account and shouldn't have to.
Is there a cheat sheet/bullet list of installation procedures/options recommended by the Netbeans brain trust that will allow an actual machine sharable installation of the development system?

thanks,
Karl
Back to top
karlkras



Joined: 24 Feb 2009
Posts: 57

PostPosted: Mon Mar 07, 2011 1:53 am    Post subject: So apparently the panel is stumped again? Reply with quote

Okay, so if there are any NBs J2EE users on Linux systems anywhere in the building, how do you configure/run the integrated development system? Do you all run as root? Or is "all" really none?
Certainly there must be some out there not stapled to Windows? Please tell me there are...
If not, the industry has take a huge step backwards.
Back to top
Glenn Holmer
Posted via mailing list.





PostPosted: Tue Mar 08, 2011 3:02 am    Post subject: Installing/running on Linux (specifically Ubuntu) with Glassfish/J2EE Reply with quote

----- Original Message -----
From: karlkras
[mailto:address-removed]
To: address-removed
Sent: Sun, 06 Mar
2011 19:54:09 -0600
Subject: [nbusers] Installing/running on Linux
(specifically Ubuntu) with Glassfish/J2EE

Quote:
Okay, so if there are any NBs J2EE users on Linux systems anywhere in
the building, how do you configure/run the integrated development
system? Do you all run as root?

On our servers, we run GlassFish as his own user (with the installation
owned by glassfish:glassfish). On developer machines, we would like to
do the same, but if you do, you won't be able to register it as a server
in NetBeans. What we've done is to have a flag in the GlassFish startup
script which adjusts the permissions:

if [ "$DEVELOPER" != "" ]; then
echo "verifying developer permissions" | tee -a $LOG
chgrp -R coders $GFHOME
find $GFHOME -type d -exec chmod g+rwx {} \;
find $GFHOME -type f -exec chmod g+rw {} \;
else
echo "not verifying developer permissions" | tee -a $LOG
fi

(where $GFHOME is the GlassFish installation directory). The developer
whose machine this runs on has to be in the "coders" group, of course.
It's a bit extreme, but it works, and it allows us to use the same
scripts on the developers' machines that we do on the servers.

--
____________________________________________________________
Glenn Holmer address-removed
Software Engineer phone: 414-908-1809
Weyco Group, Inc. fax: 414-908-1601
Back to top
karlkras



Joined: 24 Feb 2009
Posts: 57

PostPosted: Thu Mar 10, 2011 5:32 pm    Post subject: Reply with quote

Very cool Glenn, thanks. I'll give this a try.
I've filed a defect against the NBs J2EE install to at least provide some configuration errata on possible solutions, this sounds more straight forward then going through a separate glassfish install process as I've done (and still not getting around the problem).
Would you mind (after I've tried it myself of course) if I suggested this to NB support as an option?
Back to top
Glenn Holmer
Posted via mailing list.





PostPosted: Thu Mar 10, 2011 9:10 pm    Post subject: Installing/running on Linux (specifically Ubuntu) with Glassfish/J2EE Reply with quote

On Thu, 2011-03-10 at 17:32 +0000, karlkras wrote:
Quote:
I've filed a defect against the NBs J2EE install to at least provide
some configuration errata on possible solutions, this sounds more
straight forward then going through a separate glassfish install
process as I've done (and still not getting around the problem).

What specifically is it that you're finding problematic? In your
original message, you mentioned running it as root; do you want NetBeans
and/or GlassFish in a reserved location like /usr/share or /opt but need
to run it as a regular user?

Quote:
Would you mind (after I've tried it myself of course) if I suggested
this to NB support as an option?

I don't know that this is a NetBeans problem as much as it is a systems
administration issue.

--
____________________________________________________________
Glenn Holmer address-removed
Software Engineer phone: 414-908-1809
Weyco Group, Inc. fax: 414-908-1601
Back to top
mdeggers



Joined: 28 Jan 2009
Posts: 208

PostPosted: Fri Mar 11, 2011 8:34 pm    Post subject: Installing/running on Linux (specifically Ubuntu) with Glassfish/J2EE Reply with quote

Here's how I set up my Fedora 14 system. It should be more or less the
same on Ubuntu.

I'll assume that you have Oracle's Java already installed and configured
properly in Ubuntu. If not, do so.

First, download the basic NetBeans installation package. This means use
the simple Java SE package.

Run the installer as root and choose an appropriate location. I put my
installation in /opt/netbeans-6.9.1 (for NetBeans 6.9.1). For Ubuntu, I
imagine this is along the lines of:

chmod 755 netbeans-6.9.1-ml-javase-linux.sh
sudo ./netbeans-6.9.1-ml-javase-linux.sh

Now launch the IDE as a normal user, and add all of the plugins you
think you will need. If you are doing J2EE development. This means you
will need at least the Java Web Applications and the EJB and EAR
plugins. You'll probably want a lot more, including:

Spring Web MVC
JSF
(lots of others)

Next you'll need to get a copy of Glassfish. Go over to the Glassfish site
and download the Linux copy from:

http://glassfish.java.net/downloads/3.1-final.html.

Install this as your normal user. For example:

chmod u+x glassfish-3.1-unix.sh
./glassfish-3.1-unix.sh

Choose a directory that you have write permissions to. I put all of my
servers in <home-directory>/Servers. I have Tomcat (various versions),
JBoss, Glassfish (various versions), and some portal servers.

Finally, start up NetBeans, go to the Services window, and add the
Glassfish server you installed as a v3 Glassfish server.

When you get done with all of this, you'll have the following:

1. A NetBeans installation that a normal user can update
2. A Glassfish installation that a normal user can update
3. A Glassfish server started and stopped by a user
4. A NetBeans installation talking to a developer copy of Glassfish

Mulitple users running multiple copies of Glassfish on a single machine
means that you'll have to change all of the ports that Glassfish uses.

To install Glassfish system-wide, you should create a special Glassfish
user, install the server there, and then manipulate the services
appropriately. It's not a good idea to run services such as Apache httpd,
Apache Tomcat, or Glassfish as root.

If you install the server system-wide, then you should do all your
deployment / configuration through the Glassfish administrator account
and not through NetBeans.

In short, do the following:

1. Install the base NetBeans IDE system wide as root
2. Customize a user's NetBeans with plugins as a user
3. Install a user copy of Glassfish separately
4. Add the copy of Glassfish to NetBeans in Services->Servers

At least that's how I manage my development environment, and it seems
to work well.

. . . . just my two cents.

/mde/
Back to top
markwade



Joined: 04 Dec 2010
Posts: 140

PostPosted: Sat Mar 12, 2011 6:53 am    Post subject: Re: So apparently the panel is stumped again? Reply with quote

karlkras wrote:
Do you all run as root?


Maybe it's a bit simplistic but I install the full netbeans distribution for linux, including glassfish and tomcat. I run the installer as root, the install defaults to /usr/local/netbeans-6.9.1 and /usr/local/glassfish-3.0.1. I create a group dev and execute:

chgrp -R dev /usr/local/glassfish-3.0.1
chmod -R g+rwx /usr/local/glassfish-3.0.1

Then I run netbeans as a user belonging to that group. All seems well.

On another note netbeans doesn't work well with kde kwallet. I've just installed a new distro, it was a nuisance before but now I need to kill kwalletd or I can't proceed through the cvs wizard, it chokes on an exception trying to save a password.
Back to top
Todor Kostadinov
Posted via mailing list.





PostPosted: Tue Mar 15, 2011 7:18 am    Post subject: Installing/running on Linux (specifically Ubuntu) with Glassfish/J2EE Reply with quote

Hi,

first the good news. The installation of NetBeans on Linux is not significantly different than the installation on different OS's. I have tested it. It works fine.

Now the bad news. Bad news are not available to this topic.

If you have additional questions to this topic you can contact me further.



Mit besten Gr
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo