LinuxQuestions.org
Visit Jeremy's Blog.
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 06-16-2009, 01:53 AM   #1
gaya3_k
LQ Newbie
 
Registered: Jun 2009
Posts: 16

Rep: Reputation: 0
Unhappy problem in opening /etc/rc.d/init.d/dhcpd.conf


hi,
i am running a CentOS 4 in my pc ,
i want to configure my pc as a DHCP server.
hence i followed the steps given in one site.
but if i say /etc/rc.d/init.d/dhcpd.conf
i am getting an message No such file/directory.
Even i tried service dhcpd status,dhcpd start,but
I am getting a message saying dhcpd:unrecognized service.
please help me out to solve the problem..

Thanks in advance.
 
Old 06-16-2009, 02:05 AM   #2
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,272

Rep: Reputation: 148Reputation: 148
most probably configuration files are located in /etc or the location you have installed DHCP sources, /etc/rc.d/init.d/ is the location having startup scripts.
To locate your DHCP configuration file
#locate dhcpd.conf
OR
To find
#find . / -name dhcpd.conf

Last edited by kirukan; 06-16-2009 at 02:09 AM.
 
Old 06-16-2009, 02:24 AM   #3
gaya3_k
LQ Newbie
 
Registered: Jun 2009
Posts: 16

Original Poster
Rep: Reputation: 0
thanks yar for replying,
location is correct,when i listed the contents in etc directory,
i can view dhcpd.conf file, but i cant open it.
i am getting a message permission denied. but i entered as root only, not as any other user.
 
Old 06-16-2009, 02:30 AM   #4
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,272

Rep: Reputation: 148Reputation: 148
so check the file permission, or post the result of
#ls -l filename
are you using sudo ?
 
Old 06-16-2009, 03:17 AM   #5
gaya3_k
LQ Newbie
 
Registered: Jun 2009
Posts: 16

Original Poster
Rep: Reputation: 0
hi,
when i entered that command i got ,
-rw-r--r-- 1 root root 0 Jun 16 10:11 dhcpd.conf
 
Old 06-16-2009, 03:46 AM   #6
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,272

Rep: Reputation: 148Reputation: 148
It seems you can edit this file if you logged in as root user. However try with #sudo vi filename, if you receive the same issue, check whether selinux enforcing or not

Last edited by kirukan; 06-16-2009 at 03:48 AM.
 
Old 06-16-2009, 04:22 AM   #7
gaya3_k
LQ Newbie
 
Registered: Jun 2009
Posts: 16

Original Poster
Rep: Reputation: 0
Thankq so much,
i can open the file. and i typed in to it.
but now the problem is, when i tried to start the dhcp service by the command , "sevice dhcpd start", i am getting a message, unrecognized service.Even to get the status , i am getting the same response. i dont know what the problem is!!!!!!!!!!
 
Old 06-16-2009, 05:45 AM   #8
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,272

Rep: Reputation: 148Reputation: 148
Hai it means you dont have startup script at /etc/rc.d/init.d directory, first check whether startup script exist or not, better way search in google "how to install and configure DHCP in Linux". you can get step-by-step idea about DHCP
 
Old 06-16-2009, 06:15 AM   #9
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
It will give you some idea about dhcp configuration

http://www.linuxhelp.net/forums/Setu...ver_t4052.html
 
Old 06-17-2009, 12:26 AM   #10
gaya3_k
LQ Newbie
 
Registered: Jun 2009
Posts: 16

Original Poster
Rep: Reputation: 0
thankq so much yar,
that site is so helpful...
but still i have problem
 
Old 06-17-2009, 02:10 AM   #11
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Saying that you have problem will say nothing about your problem. Why dont you take some effort and tell what is exactly your problem. Where did you start and what did you do and where are you stuck?
 
Old 06-17-2009, 03:28 AM   #12
gaya3_k
LQ Newbie
 
Registered: Jun 2009
Posts: 16

Original Poster
Rep: Reputation: 0
ya sure chaitanya,
i went in to that link which u posted.
and i followed the steps in that.
the first step itself,i am not getting, that is,
when i type yum install dhcp,
i got this,
Setting up Install Process
Setting up repositories
Cannot find a valid baseurl for repo: update
Error: Cannot find a valid baseurl for repo: update

i have wrote that dhcpd.conf file too.
but when i type man dhcp , i am getting no manual found.
when i say /etc/init.d/dhcpd start
i am getting no such file or directory.

i dont know whether i am in correct path r not........
nothing is working
i cant sort out the problem , please help me if u could.....


Thanks alot for ur response
 
Old 06-17-2009, 03:33 AM   #13
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Ok so you are using CentOS4. Can you confirm if your yum is configured correctly with working repositories? Check with it. Or else use your CentOS4 media and install dhcp and other related rpms.
 
Old 06-17-2009, 03:40 AM   #14
smoothpeddi
LQ Newbie
 
Registered: Jul 2008
Location: Mumbai
Distribution: CentOs 5
Posts: 5

Rep: Reputation: 1
Do install dhcpd rpm and instead of giving service dhcpd restart ypu cal give /etc/rc.d/init.d/dhcpd restart if u have properly installed your dhcpd rpm then it shoulds work
 
Old 06-17-2009, 04:37 AM   #15
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
service dhcpd start is same as /etc/init.d/dhcpd start. And if anyone of them is working, other should also most probably work.
If thats not working then the reason could be that you have not installed it properly.
 
  


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 re-invoke dhcpd after changes were made to dhcpd.conf file. Azazwa Linux - Newbie 3 03-30-2009 05:44 AM
Missing /etc/init.d/dhcpd from ISC DHCPD Quigi Linux - Networking 4 03-27-2008 09:50 PM
dhcpd subnet declaration problems in dhcpd.conf vcrispo Linux - Networking 6 07-15-2005 11:32 AM
dhcpd.conf and 2nd NIC problem KowCiller Linux - Networking 4 07-05-2003 09:01 PM


All times are GMT -5. The time now is 07:56 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