LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to run user defined services and exe files on linux. (https://www.linuxquestions.org/questions/linux-software-2/how-to-run-user-defined-services-and-exe-files-on-linux-273225/)

Prabhat Sharda 01-03-2005 04:23 AM

How to run user defined services and exe files on linux.
 
Hello to all,

I am a new member, just joined, and posting my first mail.
Firstly, i introduce myself. I am working in a company, on linux platform, and belongs to Noida,India.

I wish Ur help in solving some problem concern with the above topic only.

My application is running on a machine having Red Hat 8.0. This application runs its own services which can be easily registered on Windows Platform. We can start/stop these services manually also.

My problem is How can be these services run on linux machine? If i write the shell scripts files, and copy them in /etc/rc.d/init.d folder during installation period then Will it work..?
also if i want to start/stop these services manually, then, Will the service command work..?

Second thing, if assume that currently these services are not active or available. I want to provide these services from a remote machine, i.e. remotely connect to this m/c from any m/c i have, want to load,start/stop the services.. then how can i do all this from remotely..?

Also assist me in running a exe file on linux. As for the services concern above, i have an exe file which do registry activities in windows, but in linux there is no concept for registry. This file is in C, and also uses a header file 'windows.h'.

One such example, with the passing parameters is shown below(for windows):

"@MyProj_HOME@\services\@FolderName@\javaserv.exe" @FolderName@ -i -Xms@HEAPSIZE@M -Xmx@HEAPSIZE@M -Dservice.name=@FolderName@ -Dserver.name=@SERVERNAME@ -Djava.class.path=%classpath% -Dprotraffic.home="@MyProj_HOME@" wrkdir="@MyProj_HOME@\services\@FolderName@"

Thanks in advance....

acid_kewpie 01-03-2005 06:39 AM

I find that te easiest way to make a service is to just take an existing service file and adpat it to mach your progam. naturally look for a really simple one.... they can be written in only a dozen lines or so.

as for exe's... http://winehq.com but for what you seem to be thinking you can do... not a chance. Linux is NOT windows, so as you can appreciate, you can't do this directly.

Prabhat Sharda 01-03-2005 07:19 AM

Thanks acid..

regarding the services, i will make those files and put them in the desired places, as ur advice.

But if i want to do this remotely, then what should i do..
Because you have not the access permissions to the /etc/../init.d directory. You have to the the password for authentication. Is there is a concept of agent (as in windows) in linux environment, so that we can activate it and perform the desired task. Still the permission problem arises ( as i think of it if i will use Telnet or ftp).

Secondly, in case of exe files, i am just activating the JVM on windows, passing the desired arguments which are needed to run the services, plus the heapsize that is required by windows to provide the space(memory) for that service.
What should i do, in case of linux, when i have to pass these arguments to JVM, as i want to run JVM on these parameters. Will any heapsize is required by linux in order to run any service.

Actually i doesnot want any third party tool.., i will manually do the job or recompile the whole thing...

Prabhat Sharda 01-04-2005 05:56 AM

my application is in java, and built on windows platform. I have to port it on Red hat.

Application using j2sdk1.4.1 version. The problem is that, a file in the application uses jvm.dll. It is easily available in the jre/bin/client folder in the j2sdk1.4.1 version of java, downloaded from the sun. I found many dll files available in the java package.

But when i try to find out the alternative in the j2sdk1.4.2_06 package for linux ( also downloaded from sun), nothing is there.

Will anybody tell me that how this service of jvm.dll handle in linux java package..

MasterC 01-04-2005 06:19 AM

For remote administration, openssh.org seems to be more of what you will want to look at. Once you ssh in, you can do whatever you want, just as if you were on a terminal directly accessing the machine.

Cool

/Addition:
Also, there is no registry to edit in Linux.

Cool

Prabhat Sharda 01-04-2005 07:35 AM

Thanks Master...

But still I want to clear myself, some more...

My client is viewing the jsp pages in its explorer, he now wants to run a service. He can choose the option given, and then...

...and then I( i.e. application running on a separate m/c, which i think work as an agent) have to pick the information, received and judge for whatever is required by the client, either start/stop/status for that service, and run accordingly on the server m/c. This server m/c is a separate m/c. Whenever client asks for status( for example) , i have to pick the desired info from server m/c and send it to client ( of-course passing through my machine).

In windows, all these things can easily handles through Remote API's, but in Linux, Is there any tool for that, which can do these remote functions efficiently.

Will Openssh can still work here, because it's not possible to do it every time manually.....

MasterC 01-05-2005 03:54 AM

Hmmm... You are kind of describing something more like webmin:
http://webmin.com/

Cool


All times are GMT -5. The time now is 08:43 AM.