How can i run java command as a service Centos 5? - centos

i want to execute java -cp server.jar:mysql.jar server.NithServer this command as linux service how can i do that. & not working. centos 5

What's about using Java Service Wrapper?
It provides cross platform way of running java applications as services and also have a community version that should be enough for your purposes.

A seriously written service must have the bash script that accepts start, stop and restart parameters. Such script can be copied or better linked (original at /etc/init.d) to /etc/rc3.d or /etc/rc5.d and will be maintained by the system, executing shutdown and startup when required. Here there is a tutorial how to wrap Apache Tomcat as a service.

Related

Jprofiler and WebSphere 8 Integration Issue

I'm having some issues getting JProfiler connected to a remote WebSphere 8.5.5 instance that is running on Linux. When I start JProfiler on my Windows 10 machine I select the "Profile an application server, locally or remotely" and select the option to integrate with IBM WebSphere 8.x Application Server.
The part I'm having an issue with is the "Specify the remote address" section of setting up the profile. The setup says I need the profiling agent running on target JVM. I download the tar file from the JProfiler website and extract it on Linux machine and run jpenable as it says I should but I get this message.
"No suitable Java Virtual Machine could be found on your system. The version of the JVM must be at least 1.6 and at most 11. Please define INSTALL4J_JAVA_HOME to point to a suitable JVM."
I have made edits to the arguments file that came with the JProfiler in order to remedy this issue but I just can't seem to get JProfiler to see the IBM Java that WebSphere is using on this machine. I have tried using the INSTALL_JAVA_HOME_OVERRIDE variable in the arguments file by putting the full path to the WebSphere Java install. I have tried using the INSTALL4J_JAVA_PREFIX variable and I have created a INSTALL4J_JAVA_HOME variable in the arguments file and put the full path to the WebSphere Java.
Any help would be appreciated greatly appreciated in getting me around this issue. I have verified that WebSphere is using Java version 1.8.0_171.
but I just can't seem to get JProfiler to see the IBM Java that WebSphere is using on this machine.
That's because IBM JVMs are not supported for attach mode.
The setup says I need the profiling agent running on target JVM.
Generally, this is achieved by adding an -agentpath VM parameter to the profiled VM. The remote address that you are asked for in the wizard will be added as an option to that parameter. The wizard will then modify the server config file and add the complete VM parameter, so you don't have to it manually.
More information is available at
https://www.ej-technologies.com/resources/jprofiler/help/doc/main/profiling.html

Running Service Fabric on Nano Server

After reading the docs of Service Fabric and how to run it on Windows Server and on Linux, I cannot find anything talking about how to run it on Nano Server.
I think that the game studio named Illyriad are running part of their infrastructure on Azure and Service Fabric on Nano Server.
I would like to know if theirs any official support on this matter or if they made it by their own ways?
Thanks!
AFAIK there is no support to Nano Server (yet).
Nano server has a very stripped down set of Windows APIs and I believe today SF is using some of those. The same is for .Net Full Framework (which SF depends on!) can't run on Nano Server.
Maybe when SF get support to .Net Core, we will see Nano Server support (since the only .Net version that run on Nano is .Net Core).

Torquebox Jruby Rails Deploy

I have created a Jruby rails application. I am able to deploy the application in windows server by using torquebox deploy and able to run the application using torquebox run. But when I close my command prompt(terminal) my Torquebox server is stopping. How I can able to run the server even after closing the terminal?
Run it as a windows service. In windows a service can be created to run a program in the background, in a similar way to running a daemon in unix.

How to install features in JBOSS FUSE?

I am able to check all the features using features:list
I wanted to install certain features in JBOSS Fuse, but the command
features:install camel-blueprint
is not working
I am getting error
Error executing command: The container is managed by fabric, please use fabric:profile-edit --featur
es camel-blueprint/0.0.0 target-profile instead. See fabric:profile-edit --help for more information.
How can install the required features in JBOSS FUSE.
in JBOSSFUSE_HONE/etc/org.apache.karaf.features.cfg file I have entry called featuresBoot and added all the needed features to be loaded in startup
But, the status for all the features are uninstalled.
JBoss Fuse uses profiles (fabric) to define what to install on container, so you edit profiles, and then assign profile(s) to containers.
Frankly its easier to watch a few videos to get more familiar
http://vimeo.com/album/2635012
For example the loan broker video is a good start.
If you do not want to use fabric, then you can install like old-school with manually commands like you do on Apache Karaf. But this requires you NOT to install fabric in JBoss Fuse.
Also there is the Red Hat JBoss Fuse documentation you can dive into (links to documentation from here)
http://www.jboss.org/products/fuse
You can also find more details at the fabric8 project (community project of JBoss Fuse) documentation at:
http://fabric8.io/#/site/book/doc/index.md?chapter=profiles_md
The short answer here is that you have probably already set up this instance of JBoss Fuse / Fuse Fabric to be container managed, via fabric:create.
To "reset" your local installation (be careful! this deletes all containers and related configuration), run this command in cygwin to delete data, instances and lock:
cd /wherever/fabric8-karaf-1.0.0.redhat-412
$ rm -rf data instances lock
Now, when you restart Fuse, you should be able to install features directly.
I have copied the text below from the error messages. It should work.
"please use 'fabric:profile-edit --features camel-blueprint/0.0.0 target-profile'"

how do you build your appliances?

virtual machines hold great promise as a way to distribute hard to configure applications. i have been using jeos vmbuilder (and some bash scripts) to generate my appliances, but i'm looking for something more elegant.
in my case, i'm looking for a solution that will build a linux-based vm with configured versions of tomcat and mysql as a base. each future release would be a new war file and a sql update script. it'd be really nice if already deployed vms could self-update and test builds could be pushed to ec2.
in my brief search, i've found rpath rbuilder, turnkey linux,
vagrant up, suse studio, jeos vmbuilder, and vmware studio. rather than try all of these, i figure i'd ask what this community uses to build and distribute appliances...
I use pungi myself.