LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-20-2009, 10:11 PM   #1
nguyenthaithuanmath
LQ Newbie
 
Registered: Apr 2009
Posts: 6

Rep: Reputation: 0
Thumbs up Daemons


Hi all,

I want to create and use a "service" in LINUX. I have some questions:

1. How to make it?

2. How to install?

3. How to start the "service"?

4. How to get process ID of the "service" or determine the "service"?

5. How to other processes interact with the "service"?

If you don't mind, give me an example to illustrate the questions. So be, thank you so much.

Thuan Nguyen-Thai
Sai Gon city
Vietnam Nation

Last edited by nguyenthaithuanmath; 05-19-2009 at 12:13 PM.
 
Old 04-21-2009, 12:01 AM   #2
palisetty_suman
Member
 
Registered: Feb 2007
Location: TX, USA
Distribution: fedora
Posts: 191

Rep: Reputation: 33
Thumbs up HI

Hi,

i can answer some of your questions. Maybe others can help you too.

3)service nameofservice start
eg: service network start


4)you can check services from
cd /etc/services


2)i think they are installed while installing linux. not sure.


1)i dont know what you want to make
 
Old 04-21-2009, 10:39 AM   #3
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,627

Rep: Reputation: 471Reputation: 471Reputation: 471Reputation: 471Reputation: 471
nguyenthaithuanmath:

1. How to make it?

Ans: Note that "make" has another meaning in linux world.
make
make install

So be accurate in describing your idea. Did you mean "How to create it?"

2. How to install?

Ans: Install what, a service? Services are not installed, you make them "run".

3. How to start the "service"?

4. How to get process ID of the "service" or determine the "service"?

Ans: Are you doing this for a homework>


5. How to other processes interact with the "service"?

Ans: For solutions you must describe fully what you wanted to happen, what you have done so far.

Describe your problem again.
 
Old 04-21-2009, 11:15 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
I'm not certain if you are asking about writing a service or starting & controlling one. For the later, it depends with distro you use. Red Hat, SuSE, Mandriva do it one way, while Slackware (and I think debian) does it another.

Read the manpage for chkconfig if you have Red Hat, SuSE, etc. Also read through the skeleton script. Some of the commented parts at the top of the scripts are very important.
 
Old 04-21-2009, 07:55 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,356

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
See also the contents of /etc/rc.d and eg /etc/rc.d/rc5.d
 
Old 04-22-2009, 02:05 AM   #6
nguyenthaithuanmath
LQ Newbie
 
Registered: Apr 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Dear "chrim01", "jschiwal", "masekmustag", "palisetty suman"

- Thank you for care my the questions, just only, enough to say "THANK YOU". I very happy when you said:
"IF YOU WANT TO LEARN QUICKLY, READ SLOWLY. TO LEARN GNU/LINUX READ, READ, BECAUSE THERE IS NOT SHORTCUT TO HEAVEN".

Thuan Nguyen-Thai
Sai Gon city
Vietnam Nation

Last edited by nguyenthaithuanmath; 05-03-2009 at 10:56 PM.
 
Old 04-22-2009, 02:09 AM   #7
ic_torres
Member
 
Registered: Nov 2005
Location: ABAP
Distribution: slackware 12.0, Vector Linux STD 6.0 and 5.8, ZenWalk 4.6.1, OpenBSD 3.9
Posts: 389

Rep: Reputation: 34
hmm are you trying to make your "own" service? i think its possible.. through scripting. . .write a script on what you want to do on your machine.. then give the right permissions.. execute it.. or place it in the cron for routinary purposes...
 
Old 04-24-2009, 09:17 PM   #8
nguyenthaithuanmath
LQ Newbie
 
Registered: Apr 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Hi all
- I have a file which can excutable, how to it runs when my PC is rebooted, and it runs as a deamon ("service")?
Thanks
 
Old 05-19-2009, 12:07 PM   #9
nguyenthaithuanmath
LQ Newbie
 
Registered: Apr 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Dear "palisetty_suman"

"3)service nameofservice start": I do as you said, it is right. Thank you

"4)you can check services from : /etc/services" : I saw, but need think of it much more.

"2)i think they are installed while installing linux. not sure." : I think I need presenting more clear. With Windows( Microsoft), I compose by Visual Studio: Edit->compile->install to create a Window Service. I also think be right for LINUX . I think: Service(LINUX) as Window Service. So I have the question.

"1)i dont know what you want to make" : Step by step create a service in LINUX as: compose, compile, install, ... In order to the program automatically start when LINUX started.

Thank you

/**********************************************************************************/

Dear "malekmustaq"

"Ans: Note that "make" has another meaning in linux world. make make install"
Please read above the lines, you will understand what I want to ask.

"4. How to get process ID of the "service" or determine the 'service'? Ans: Are you doing this for a homework>"
This is not my homework. I graduated ( Maths: Algebra). I am studying LINUX(Fedora).
I think: "4. How to get process ID of the 'service' or determine the 'service'?" may be solved by bash command: $ps -jeH. Base on that we have the answer for this question.

"5. How to other processes interact with the 'service'? Ans: For solutions you must describe fully what you wanted to happen, what you have done so far. Describe your problem again."
In fact, that is interaction between two processes. So I want to know PID of the 'service'

Thank you

/****************************************************************************/

Dear "jschiwal"
I want to write a service.
Thank you.

/****************************************************************************/

Dear "chrism01"
I will do as you hint.
Thank you.

/****************************************************************************/

Thank you, "ic_torres"
-----------------------------------------------------------------------------

The last, Thank all !!!

Thuan Nguyen-Thai
Sai Gon city
Vietnam Nation

Last edited by nguyenthaithuanmath; 05-21-2009 at 01:39 AM.
 
  


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
Daemons palisetty_suman Linux - Newbie 4 04-19-2009 02:24 PM
daemons cnm Linux - Newbie 4 11-08-2006 07:12 AM
daemons LinuxLala Linux - General 4 11-28-2003 01:37 PM
Daemons mariua Linux - General 0 10-11-2001 05:03 AM
Daemons mariua Linux - Newbie 0 10-11-2001 05:00 AM


All times are GMT -5. The time now is 03:44 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration