I wanted to upgrade from Glassfish 4.0 to 4.1 and "pkg image-update" didn't work for me since I was using 64 bit OS without 32-bit support libraries. There might be other problems as well: like described by SO question http://stackoverflow.com/questions/17033118/glassfish-updatetool-linux-64-bit-issue. I was surprised that Glassfish's pkg tool supports only 32 bit systems - and to run them on 64 bit OS-es, you have to install compatibility libraries... We can fix that! Following the guidelines given in this blog post and updates from this forum post, we can run pkg using OS's built-in 64-bit python. All modified files I've put in this github poject. Here are the steps:
- Hit the "pkg" tool:
/opt/glassfish/bin/pkg(it should fail) mv /opt/glassfish/pkg/bin/pkg /opt/glassfish/pkg/bin/pkg.orig- Download modified pkg script and copy to /opt/glassfish/pkg/bin/pkg
mkdir /opt/glassfish/pkg/custom-libcp -r /opt/glassfish/pkg/vendor-packages/pkg /opt/glassfish/pkg/custom-lib- Install the dependencies so that we can compile the _actions.c:
apt-get install python-dev gcc python-cherrypy python-mako python-openssl python-ply python-pycurl python-simplejson - Download _actions.c (you can clone the project if you have git installed on the server)
gcc -I/usr/include/python2.7 -shared -fpic -O2 _actions.c -o _actions.socp _actions.so /opt/glassfish/pkg/custom-lib/pkg/actions/_actions.so- download __init__.py from the project folder
cp __init__.py /opt/glassfish/pkg/custom-lib/pkg/actions/__init__.py- enjoy
No comments:
Post a Comment