Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo and Glassfish
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Cruel
n00b
n00b


Joined: 25 Jun 2011
Posts: 54

PostPosted: Thu Sep 08, 2011 2:38 pm    Post subject: Gentoo and Glassfish Reply with quote

Hello guys.
I've a Server running Gentoo x64 Hardened with it.
Portage is up to date. My only problem is that I can't find glassfish in the
portage tree. So I searched a little bit and found this post: https://forums.gentoo.org/viewtopic-t-643250-start-0.html
It seems like glassfish isn't supported on gentoo. But why?
And how can I install glassfish on gentoo?
The link from the answers are broken. It happens nothing wenn I click on it.

Thank you in advance
Back to top
View user's profile Send private message
GES
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jun 2005
Posts: 107
Location: Budapest, Hungary

PostPosted: Thu Sep 08, 2011 7:00 pm    Post subject: Reply with quote

Code:
# esearch -S glassfish
[ Results for search key : glassfish ]
[ Applications found : 7 ]

*  dev-java/glassfish-connector-api
      Latest version available: 1.1.2.2.04
      Latest version installed: [ Not Installed ]
      Size of downloaded files: 38,883 kB
      Homepage:    https://glassfish.dev.java.net/
      Description: Java Transaction API
      License:     || ( CDDL GPL-2 )

*  dev-java/glassfish-deployment-api
      Latest version available: 1.2
      Latest version installed: [ Not Installed ]
      Size of downloaded files: 38,883 kB
      Homepage:    https://glassfish.dev.java.net/
      Description: J2EE Application Deployment Specification
      License:     || ( CDDL GPL-2 )

*  dev-java/glassfish-jms-api [ Masked ]
      Latest version available: 1.1.2.2.04
      Latest version installed: [ Not Installed ]
      Size of downloaded files: 38,883 kB
      Homepage:    https://glassfish.dev.java.net/
      Description: Java Transaction API
      License:     || ( CDDL GPL-2 )

*  dev-java/glassfish-persistence
      Latest version available: 1.0
      Latest version installed: [ Not Installed ]
      Size of downloaded files: 34,338 kB
      Homepage:    https://glassfish.dev.java.net/
      Description: Glassfish implementation of persistence API
      License:     CDDL

*  dev-java/glassfish-servlet-api
      Latest version available: 2_beta44
      Latest version installed: [ Not Installed ]
      Size of downloaded files: 34,375 kB
      Homepage:    https://glassfish.dev.java.net/javaee5/webtier/webtierhome.html
      Description: Glassfish reference implementation of Servlet API 2.5 and JSP API 2.1
      License:     CDDL

*  dev-java/glassfish-transaction-api
      Latest version available: 1.1.2.2.04
      Latest version installed: [ Not Installed ]
      Size of downloaded files: 38,883 kB
      Homepage:    https://glassfish.dev.java.net/
      Description: Java Transaction API
      License:     || ( CDDL GPL-2 )

*  dev-java/mojarra
      Latest version available: 1.2.15-r2
      Latest version installed: [ Not Installed ]
      Size of downloaded files: 4,976 kB
      Homepage:    https://javaserverfaces.dev.java.net/
      Description: Project Mojarra - GlassFish's Implementation for JavaServer Faces API
      License:     CDDL
Back to top
View user's profile Send private message
Cruel
n00b
n00b


Joined: 25 Jun 2011
Posts: 54

PostPosted: Thu Sep 08, 2011 9:11 pm    Post subject: Reply with quote

Thank you for your answer. Please don't hurt me but I see no generell build
for the glassfish. Is this the complete glassfish ebuild?

Thanks
Back to top
View user's profile Send private message
archenroot
n00b
n00b


Joined: 13 Dec 2011
Posts: 29

PostPosted: Sun Dec 23, 2012 2:48 pm    Post subject: Reply with quote

I am going to do the same on my dev server, so first of all I would like to setup automatic start of glassfish under glassfish user.

I extracted glassfish zip file into /opt/glassfish-v3.1.2.2
Then>
Code:

# addgroup glassfish
# superadduser glassfish

So I have user for running glassfish which I think should be set somewhere in glassfish config files later...

Now on, create startup script in /etc/init.d/glassfish>
Code:

#!/sbin/runscript
 
depend() {
        need net
}
 
start() {
        ebegin "Starting glassfish"
        # Ensure that we run from a readable working dir, and that we do not
        # lock filesystems when being run from such a location.
        cd /
        start-stop-daemon --start --quiet --background --make-pidfile --pidfile /var/run/glassfish.pid --exec /usr/local/bin/gf_start
        eend $?
}
 
stop() {
        ebegin "Stopping glassfish"
        /usr/local/bin/gf_stop
        eend $?
}
 
restart() {
        if ! service_stopped "${SVCNAME}" ; then
                svc_stop || return "$?"
        fi
        svc_start
}


setup glassfish script to be executable and let it start after boot automatically>
Code:

# chmod +x /etc/init.d/glassfish
# rc-update add glassfish default

Start stop scripts...>

create script /usr/local/bin/gf_start
Code:

#!/bin/bash
su -c '/opt/glassfish-v3.1.2.2/bin/asadmin start-domain' glassfish

create script /usr/local/bin/gf_stop
Code:

#!/bin/bash
su -c '/opt/glassfish-v3.1.2.2/bin/asadmin stop-domain' glassfish


Set up executable attributes for scripts>
Code:
chmod +x /usr/local/bin/gf_*


and that's it...but when you try to log into remotely this is not enough. So log in into your gentoo system, go to GF bin directory
where you will change the default password of admin user which is "changeit"
then you need to enable secure admin mode for GF which require you to restart all server instances
Code:

# cd /opt/glassfish-v3.1.2.2/bin
./asadmin change-admin-password
/asadmin enable-secure-admin
/etc/init.d/glassfish restart


as continue you could consider to access your GF instance web administration interface using Apache HTTP server as the gateway which will allow you to access GF via standard communication ports (80/443), this could be useful you need to access your server from corporate network which could filter other nondefault ports and protocols. For this, take a look at this link

Ladislav :D
_________________
Emperor wants to control outer space Yoda wants to explore inner space that's the fundamental difference between good and bad sides of the Force
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software 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