LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   problem in opening /etc/rc.d/init.d/dhcpd.conf (https://www.linuxquestions.org/questions/linux-newbie-8/problem-in-opening-etc-rc-d-init-d-dhcpd-conf-733243/)

gaya3_k 06-16-2009 12:53 AM

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.

kirukan 06-16-2009 01:05 AM

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

gaya3_k 06-16-2009 01:24 AM

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.

kirukan 06-16-2009 01:30 AM

so check the file permission, or post the result of
#ls -l filename
are you using sudo ?

gaya3_k 06-16-2009 02:17 AM

hi,
when i entered that command i got ,
-rw-r--r-- 1 root root 0 Jun 16 10:11 dhcpd.conf

kirukan 06-16-2009 02:46 AM

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

gaya3_k 06-16-2009 03:22 AM

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!!!!!!!!!!

kirukan 06-16-2009 04:45 AM

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

linuxlover.chaitanya 06-16-2009 05:15 AM

It will give you some idea about dhcp configuration

http://www.linuxhelp.net/forums/Setu...ver_t4052.html

gaya3_k 06-16-2009 11:26 PM

thankq so much yar,
that site is so helpful...
but still i have problem

linuxlover.chaitanya 06-17-2009 01:10 AM

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?

gaya3_k 06-17-2009 02:28 AM

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

linuxlover.chaitanya 06-17-2009 02:33 AM

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.

smoothpeddi 06-17-2009 02:40 AM

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

linuxlover.chaitanya 06-17-2009 03:37 AM

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.


All times are GMT -5. The time now is 07:49 PM.