LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 01-03-2005, 05:23 AM   #1
Prabhat Sharda
LQ Newbie
 
Registered: Jan 2005
Location: Noida, India
Distribution: RedHat 9.0, CentOS 3.4
Posts: 17

Rep: Reputation: 0
Exclamation 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....
 
Old 01-03-2005, 07:39 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
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.
 
Old 01-03-2005, 08:19 AM   #3
Prabhat Sharda
LQ Newbie
 
Registered: Jan 2005
Location: Noida, India
Distribution: RedHat 9.0, CentOS 3.4
Posts: 17

Original Poster
Rep: Reputation: 0
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...
 
Old 01-04-2005, 06:56 AM   #4
Prabhat Sharda
LQ Newbie
 
Registered: Jan 2005
Location: Noida, India
Distribution: RedHat 9.0, CentOS 3.4
Posts: 17

Original Poster
Rep: Reputation: 0
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..
 
Old 01-04-2005, 07:19 AM   #5
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
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

Last edited by MasterC; 01-04-2005 at 07:21 AM.
 
Old 01-04-2005, 08:35 AM   #6
Prabhat Sharda
LQ Newbie
 
Registered: Jan 2005
Location: Noida, India
Distribution: RedHat 9.0, CentOS 3.4
Posts: 17

Original Poster
Rep: Reputation: 0
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.....
 
Old 01-05-2005, 04:54 AM   #7
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

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

Cool
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to send user defined signal in linux feetyouwell Linux - Software 6 12-26-2007 05:40 AM
Linux Script which uses user defined variables fieldyweb Linux - Newbie 3 09-26-2005 07:29 PM
how to define user-defined commands in linux mannoulla Linux - General 1 04-05-2005 10:01 PM
Automate the Scheduling of the User-defined services tapishk Linux - General 2 12-14-2004 11:39 PM
Run exe in Linux???!!!!! yenonn Linux - General 10 10-14-2004 07:48 AM


All times are GMT -5. The time now is 10:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration