Setting up password-less ssh on CentOS

First set the hostname on both machines:

hostnamectl status

hostnamectl set-hostname newhostname

Add both hostnames to /etc/hosts on both machine

On source machine:

ssh-keygen

ssh-copy-id -i ~/.ssh/id_rsa.pub remote-host

On target machine:

restorecon -Rv ~/.ssh

ssh remote-host

Advertisements

Informix write listener – Rest API setup issues

For my talk at IIUG 2017 I was working with the wire listener on Informix.

When setting up a wire listener for the REST API I found some Informix packaging issues and issues with the DeveloperWorks article.

I was following the developerWorks article Informix and NoSQL: First Steps with the REST API

NOTE: This series of articles REALLY helped when getting my talk ready!

I was working with the latest Informix server version 12.10.FC8 on CentOS 7 and found:

a) When unpacking nosql_sdk.zip this unpacks to folder nosql-sdk-1.2.2 – there was no explict step with the command to add a link called nosql_sdk to make the examples work, I add this below.

cd $INFORMIXDIR
unzip bin/nosql_sdk.zip

ln -s nosql-sdk-1.2.2 nosql_sdk

b) The library ${INFORMIXDIR}/nosql_sdk/tomcat-embed-core.jar is missing!

Noticing that the other libaries were for version 8.0.38 I went to

Tomcat Embed Core » 8.0.38

and on the “Files” line clicked the download link.

I then copied tomcat-embed-core-8.0.38.jar into $INFORMIXDIR/nosql_sdk/lib

and added this to the classpath.

3. In order to get class com.ibm.nosql.server.ListenerCLI I also had to add ${INFORMIXDIR}/nosql_sdk/com.ibm.nosql.informix-1.2.2.jar to the classpath.

The final result was:

cat rest_listener_start.sh
#!/bin/sh

${INFORMIXDIR}/extend/krakatoa/jre/bin/java \
-cp ${INFORMIXDIR}/bin/jsonListener.jar:${INFORMIXDIR}/nosql_sdk/lib/tomcat-embed-core-8.0.38.jar:${INFORMIXDIR}/nosql_sdk/com.ibm.nosql.informix-1.2.2.jar \
com.ibm.nosql.server.ListenerCLI \
-config ${INFORMIXDIR}/etc/restListener.properties \
-logfile /work/martinfu/731/restListener.log \
-start &

exit

cat rest_listener_stop.sh
#!/bin/sh

${INFORMIXDIR}/extend/krakatoa/jre/bin/java \
-cp ${INFORMIXDIR}/bin/jsonListener.jar:${INFORMIXDIR}/nosql_sdk/lib/tomcat-embed-core-8.0.38.jar:${INFORMIXDIR}/nosql_sdk/com.ibm.nosql.informix-1.2.2.jar \
com.ibm.nosql.server.ListenerCLI \
-config ${INFORMIXDIR}/etc/restListener.properties \
-stop

exit

I hope this helps and am talking to IBM about the issues I found.