3

I was trying to configure DHCP on centos 6.my eth0 configuration is:

[centos@localhost ~]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"  
BOOTPROTO="dhcp"
HWADDR="00:0C:29:AE:62:BC"
MTU="1500" 
NM_CONTROLLED="yes"
ONBOOT="yes"
[centos@localhost ~]$ 

i install dhcp by:

#yum -y install dhcp

the result i see is:

Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
* base: mirror2.hs-esslingen.de
* extras: mirror2.hs-esslingen.de
* updates: ftp.plusline.de
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package dhcp.i686 12:4.1.1-31.0.1.P1.el6.centos.1 set to be updated
--> Processing Dependency: dhcp-common = 12:4.1.1-31.0.1.P1.el6.centos.1 for    package:12:dhcp-4.1.1-31.0.1.P1.el6.centos.1.i686
--> Processing Dependency: portreserve for package: 12:dhcp-4.1.1-31.0.1.P1.el6.centos.1.i686
--> Running transaction check
---> Package dhcp-common.i686 12:4.1.1-31.0.1.P1.el6.centos.1 set to be updated
---> Package portreserve.i686 0:0.0.4-9.el6 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved
.
.
.

Install       3 Package(s)
Upgrade       0 Package(s)

Total size: 983 k
Installed size: 2.2 M
Downloading Packages:
Running rpm_check_debug
Running Transaction Test


Transaction Check Error:
file /usr/share/man/man5/dhcp-eval.5.gz from install of dhcp-  common-12:4.1.1-31.0.1.P1.el6.centos.1.i686 conflicts with file from package dhclient-12:4.1.1-12.P1.el6.i686
file /usr/share/man/man5/dhcp-options.5.gz from install of dhcp-common-12:4.1.1-31.0.1.P1.el6.centos.1.i686 conflicts with file from package dhclient-12:4.1.1-12.P1.el6.i686

 Error Summary
  -------------

when i want to make the dhcp server start at boot time i use code:

#chkconfig dhcpd on

but i see error:

error reading information  on service dhcp:No such file or directory

also when i go to ' /etc/sysconfig/dhcpd ' directory, there isn't any dhcpd file. can anyone help me? thanks.

sahar
  • 23
  • 4

1 Answers1

2

This looks like you haven't really installed the dhcp package you can check with

yum list installed | grep dhcp

check that the package

dhcp.x86_64                         12:4.1.1-31.0.1.P1.el6.centos.1    @updates

or similar is installed. You should also check your /var/log/yum.log file for relevant information.


Edit: The OP failed to notice that the yum install command did not work. This was caused by conflicting files from different packages. A

yum update dhclient 

fixed the conflict which allowed then to progress.

user9517
  • 114,104
  • 20
  • 206
  • 289
  • I check it. yum.log is empty and there isn't any relevant dhcp package in yum list. – sahar Dec 30 '12 at 14:28
  • can you tell me why the package didn't installed and how can i install that? – sahar Dec 30 '12 at 14:29
  • @sahar: What messages do you get from the `yum install dhcp` command ? – user9517 Dec 30 '12 at 14:37
  • Install 3 Package(s) Upgrade 0 Package(s) Total size: 983 k Installed size: 2.2 M Downloading Packages: Running rpm_check_debug Running Transaction Test Transaction Check Error: file /usr/share/man/man5/dhcp-eval.5.gz from install of dhcp-common-12:4.1.1-31.0.1.P1.el6.centos.1.i686 conflicts with file from package dhclient-12:4.1.1-12.P1.el6.i686 file /usr/share/man/man5/dhcp-options.5.gz from install of dhcp-common-12:4.1.1-31.0.1.P1.el6.centos.1.i686 conflicts with file from package dhclient-12:4.1.1-12.P1.el6.i686 Error Summary ------------- – sahar Dec 30 '12 at 14:42
  • @sahar: Please edit the full information into your question. – user9517 Dec 30 '12 at 14:44
  • @sahar: Try `yum -y remove dhclient` then `yum -y install dhcp` – user9517 Dec 30 '12 at 15:19
  • thanks a lot. my problem solved by 'yum update dhclient' and i can install dhcp correctly. – sahar Dec 30 '12 at 15:21