how xinted works?

Hello,

     I have compiled Apache from source. Now I want that Apache should be started automatically when system starts. It is written in Apache documentation that if ServerType is written as standalone in httpd.conf then an entry is automatically made into inetd but I think inetd is not installed but xinetd is installed.

I want to know what entries are required to be made in xinetd.conf.
Apache is installed in /wwwroot.

Secondly I want to know when services written in xinetd.conf are started. In xinetd manual it is written that whenever request for that service is received that service is started by xinetd. But those service are not started when request is made.
For example this is the entry made in xinetd.conf for imap server:

imap
{
     disable = no
     socket_type = stream
     protocol = tcp
     wait = no
     user = root
     server = /usr/sbin/imapd
     log_on_success += DURATION USERID
     log_on_failure += USERID
}

I want to know when IMAP service will be started.

If I want to know if I make this entry in xinetd.conf will apache start automatically.

apache
{
     disable = no
     socket_type = stream
     protocol = tcp
     wait = no
     user = root
     server = /wwwroot/bin/apachectl start
     log_on_success += DURATION USERID
     log_on_failure += USERID
}


So these are the problems faced......

Sukhwinder Singh
Sukhwinder SinghAsked:
Who is Participating?
 
newmangCommented:
You don't want it started by xinetd or inetd - these daemons listen for incoming connections then start the appropriate server daemon - for example, if a user telnets in the (x)inetd will start the telnet daemon for the connection then drop the server once the connection is dropped. You really want apache running full time.

Apache's install should place a file httpd in the /etc/rc.d/init.d directory that will stop and start the apache server.

In the /etc/rc.d/rc3.d directory you can then make a softlink to the /etc/rc.d/init.d/httpd file called Sxxhttpd where xx is a number such as 85.

This will cause httpd to be started during the transition into runlevel 3

Cheers - Gavin
0
 
Sukhwinder SinghAuthor Commented:
But in imap documentation it is written that some entires need to be made in xinetd.conf. I have made these entries as above. But imap service doesn't start.
I want to know when imap service will start if entry is made in xinetd.conf?
0
 
garbouaCommented:
what distro do you have installed and the version.
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
Sukhwinder SinghAuthor Commented:
Hello
I have installed imap-2001.

SS
0
 
garbouaCommented:
dude, I meant linux distro and version :-)
0
 
Sukhwinder SinghAuthor Commented:
Linux version is RedHat 7.1
0
 
Sukhwinder SinghAuthor Commented:
Thank you apache is started at system start.
But apache install did not place httpd under etc/initd/.

Please also answer the question about imap I asked.
SSRuprai
0
 
newmangCommented:
SSRuprai

It should be under /etc/rc.d/init.d as I said in my post.

imap should be started by the xinetd super-server when a connection request comes in on port 143. If it doesn't then look at the xinetd logfile and the system log file(s)

Cheers - Gavin
0
 
Sukhwinder SinghAuthor Commented:
Yes Gavin I wrote it wrong I meant /etc/rc.d/init. httpd isn't there but everything works as I created a softlike as you said.
One Last question please tell me how to send imap request as I have made entries in xinetd.conf because when I try to access it from php it dosen't work.
I mean actual command to be used from command line?
Thank you.

SS
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.