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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-03-2005, 05:23 AM
|
#1
|
LQ Newbie
Registered: Jan 2005
Location: Noida, India
Distribution: RedHat 9.0, CentOS 3.4
Posts: 17
Rep:
|
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....
|
|
|
01-03-2005, 07:39 AM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
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.
|
|
|
01-03-2005, 08:19 AM
|
#3
|
LQ Newbie
Registered: Jan 2005
Location: Noida, India
Distribution: RedHat 9.0, CentOS 3.4
Posts: 17
Original Poster
Rep:
|
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...
|
|
|
01-04-2005, 06:56 AM
|
#4
|
LQ Newbie
Registered: Jan 2005
Location: Noida, India
Distribution: RedHat 9.0, CentOS 3.4
Posts: 17
Original Poster
Rep:
|
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..
|
|
|
01-04-2005, 07:19 AM
|
#5
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
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.
|
|
|
01-04-2005, 08:35 AM
|
#6
|
LQ Newbie
Registered: Jan 2005
Location: Noida, India
Distribution: RedHat 9.0, CentOS 3.4
Posts: 17
Original Poster
Rep:
|
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.....
|
|
|
01-05-2005, 04:54 AM
|
#7
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
Hmmm... You are kind of describing something more like webmin:
http://webmin.com/
Cool
|
|
|
All times are GMT -5. The time now is 10:26 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|