View previous topic :: View next topic |
Author |
Message |
Cruel n00b
Joined: 25 Jun 2011 Posts: 54
|
Posted: Thu Sep 08, 2011 2:38 pm Post subject: Gentoo and Glassfish |
|
|
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 |
|
|
GES Tux's lil' helper
Joined: 12 Jun 2005 Posts: 108 Location: Budapest, Hungary
|
Posted: Thu Sep 08, 2011 7:00 pm Post subject: |
|
|
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 |
|
|
Cruel n00b
Joined: 25 Jun 2011 Posts: 54
|
Posted: Thu Sep 08, 2011 9:11 pm Post subject: |
|
|
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 |
|
|
archenroot Apprentice
Joined: 13 Dec 2011 Posts: 218 Location: Lake Macha, Czech republic
|
Posted: Sun Dec 23, 2012 2:48 pm Post subject: |
|
|
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 _________________ 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 |
|
|
archenroot Apprentice
Joined: 13 Dec 2011 Posts: 218 Location: Lake Macha, Czech republic
|
Posted: Fri Feb 13, 2015 12:59 am Post subject: glassfish-4.1 ebuild overlay |
|
|
Hi, I am working on some up-to-date not only java related ebuilds and created basic glassfish-4.1 version from the old existing one
Overlay available at:
https://github.com/archenroot/gentoo-overlay _________________ 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 |
|
|
forrestfunk81 Guru
Joined: 07 Feb 2006 Posts: 565 Location: münchen.de
|
Posted: Mon Feb 16, 2015 3:20 pm Post subject: |
|
|
I use glassfish on my server and also just download and unzip glassfish to /opt/glassfish. My runscript uses the asadmin command direclty without an additional bash script. I can paste this script later. I did not got mod_jk running for Glassfish behind Apache. But mod_proxy is a viable way.
Code: | ProxyPass / http://[IP Addr.]:[port]/
ProxyPassReverse / http://[IP Addr.]:[port]/
|
A Glassfish binary ebuild would be great. I'll give it a try on next weekend. _________________ # cd /pub/
# more beer |
|
Back to top |
|
|
|