Notes |
|
(0005589)
|
rickHigh
|
10-27-11 12:20
|
|
The instructions for installing Java on Suse with zypper are... well... not so great...
# zypper search | grep java | grep devel
| java-1_4_2-ibm-devel | IBM(R) Developer Kit for Linux, Java(TM) 2 Technology Edition | package
| java-1_5_0-gcj-compat-devel | JPackage development scripts for GCJ | package
i | java-1_6_0-ibm-devel | Java(TM) 6 SDK, Standard Edition | package
For now I am using the Java IBM JDK...
# zypper install java-1_6_0-ibm-devel
I think to use the Sun or Oracle 1.6 JDK, I need to setup a new remote repo, not sure which one or where. Might need to know at some point.
http://lilypond.org/blog/janneke/openSUSE-HOWTO [^]
Now to setup IBM
#export JAVA_HOME=/usr/lib64/jvm/jre-1.6.0-ibm
# ./configure --enable-64bit
Now I get the JNI error..
checking if Java is 64-bit... yes
checking if /bin/cp accepts -u... yes
configure: error:
*** Can't find JNI directory in JAVA_HOME=/usr/lib64/jvm/jre-1.6.0-ibm
*** JNI is expected in /usr/lib64/jvm/jre-1.6.0-ibm/include/linux
IBM installed many packages not just JDK it install JRE. I had it pointed to JRE.
# export JAVA_HOME=/usr/lib64/jvm/java-1.6.0-ibm
# ./configure --enable-64bit
Now it works...
Resin Configuration summary:
RESIN_HOME : /usr/local/resin
root : /var/www
conf : /etc/resin
log : /var/log/resin
plugins : common resin_os resin resinssl
init : /etc/init.d/resin
JAVA_HOME: /usr/lib64/jvm/java-1.6.0-ibm
+ 64-bit JNI in -I/usr/lib64/jvm/java-1.6.0-ibm/include
+ JNI CFLAGS: -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DB64 -pthread -fPIC -fno-omit-frame-pointer -O2 -m64 -DHAS_SOCK_TIMEOUT -DHAS_JVMTI
+ epoll() for keepalives
+ not using OpenSSL |
|
|
(0005590)
|
rickHigh
|
10-27-11 13:18
|
|
Seems we don't work with IBM JDK out of the box for 1.6. We might work if they compile with OpenSSL. Seems we depend on a sun specific file for JSSE.
TE thread start failed for thread 000000000216EE00
sun.security.x509.CertAndKeyGen
[11-10-27 20:12:44.795] {main} java.lang.NoClassDefFoundError: sun.security.x509.CertAndKeyGen
at com.caucho.vfs.SelfSignedCert.create(SelfSignedCert.java:109)
at com.caucho.vfs.JsseSSLFactory.createSelfSignedCert(JsseSSLFactory.java:420)
at com.caucho.vfs.JsseSSLFactory.createAnonymousFactory(JsseSSLFactory.java:376)
at com.caucho.vfs.JsseSSLFactory.create(JsseSSLFactory.java:287)
at com.caucho.network.listen.TcpSocketLinkListener.bind(TcpSocketLinkListener.java:1025)
at com.caucho.cloud.network.NetworkListenSystem.start(NetworkListenSystem.java:218)
at com.caucho.env.service.ResinSystem.startServices(ResinSystem.java:515)
at com.caucho.env.service.ResinSystem.start(ResinSystem.java:483)
at com.caucho.server.resin.Resin.start(Resin.java:1033)
at com.caucho.server.resin.Resin.initMain(Resin.java:1169)
at com.caucho.server.resin.Resin.main(Resin.java:1471)
Caused by: java.lang.ClassNotFoundException: sun.security.x509.CertAndKeyGen
at java.lang.ClassNotFoundException.<init>(ClassNotFoundException.java:76)
at java.net.URLClassLoader.findClass(URLClassLoader.java:396)
at java.lang.ClassLoader.loadClass(ClassLoader.java:660)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:358)
at java.lang.ClassLoader.loadClass(ClassLoader.java:626)
... 11 more |
|
|
(0005593)
|
rickHigh
|
10-27-11 13:43
|
|
|
|
(0005594)
|
rickHigh
|
10-27-11 13:59
|
|
|
|
(0005595)
|
rickHigh
|
10-27-11 14:08
|
|
To use OpenSSL on SUSE.
# zypper install libopenssl-devel
Then setup JAVA_HOME to point to openjdk
# export JAVA_HOME=/usr/lib64/jvm/java-1.6.0-openjdk
Then rebuild Resin to use openssl
# ./configure --enable-64bit --enable-ssl
# make
# make install
Configure fails with
checking if /usr/lib64/jvm/java-1.6.0-openjdk/bin/java is Java 1.6... Error occurred during initialization of VM
Could not reserve enough space for object heap
no
configure: error: Java 1.6 required. /usr/lib64/jvm/java-1.6.0-openjdk/bin/java returned: Could not create the Java virtual machine.
Seems java cannot be started
# java -version
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine. |
|
|
(0005596)
|
rickHigh
|
10-27-11 14:16
|
|
|
|
(0005597)
|
rickHigh
|
10-27-11 14:58
|
|
In a devop rage, blew away micro instance and created a large instance.
Install the repo:
# zypper ar http://download.opensuse.org/repositories/openSUSE:/11.4:/Update/standard/openSUSE:11.4:Update.repo [^]
Install Java:
# zypper install java-1_6_0-openjdk-devel
Install OpenSSL:
# zypper install libopenssl-devel
Install C compiler and make tools
# zypper install rpmdevtools gcc gcc-c++ make
Setup JAVA_HOME:
# export JAVA_HOME=/usr/lib64/jvm/java-1.6.0-openjdk
Build Resin:
Get Resin:
# wget http://www.caucho.com/download/resin-pro-4.0.23.tar.gz [^] [^]
# tar xvf resin-pro-4.0.23.tar.gz
# cd resin-pro-4.0.23
Build Resin
# ./configure --enable-64bit --enable-ssl
# make
# make install
Configure Resin
Change HTTP and HTTPS ports to 80 and 443.
Add <jvm-arg>-d64</jvm-arg>
# emacs /etc/resin/resin.xml
Start Resin:
# /etc/init.d/resin start
Check log for errors:
# cat /var/log/resin/jvm-default.log
You should see:
[11-10-27 21:52:17.768] {main} http listening to *:80
[11-10-27 21:52:18.399] {main} https listening to *:443
[11-10-27 21:52:18.400] {main}
[11-10-27 21:52:18.400] {main} Resin[id=default] started in 4233ms |
|