Super noob installation question

Pranchisco Castro pranchisco.ko.castro at gmail.com
Fri May 24 01:49:22 UTC 2019


Thank you for responding everyone!

@Perl-list, yeah, looks like that's what happened. I thought it was
something i did wrong but turns out it's something I didn't do.
@Leroy, I've tried that with a few other variations initially but no luck.
@Rick, I installed from yum repository at first but my boss wanted the
latest version which is 4.4.1
@Peter, That is it! Thank you so much! This is exactly what I needed!

For the .configure process, I had added a few more stuff from your
suggestion

CFLAGS="-D_PATH_DHCLIENT_SCRIPT='\"/sbin/dhclient-script\"'         \
        -D_PATH_DHCPD_CONF='\"/etc/dhcp/dhcpd.conf\"'               \
        -D_PATH_DHCLIENT_CONF='\"/etc/dhcp/dhclient.conf\"'"        &&

./configure --prefix=/usr                                           \
            --sysconfdir=/etc/dhcp                                  \
            --localstatedir=/var                                    \
            --with-srv-lease-file=/var/lib/dhcpd/dhcpd.leases       \
            --with-srv6-lease-file=/var/lib/dhcpd/dhcpd6.leases     \
            --with-cli-lease-file=/var/lib/dhclient/dhclient.leases \
            --with-cli6-lease-file=/var/lib/dhclient/dhclient6.leases \
            --with-srv-lease-file=/var/lib/dhcpd/dhcpd.leases \
            --with-srv-pid-file=/var/run/dhcpd.pid \
            --enable-failover --enable-execute --enable-binary-leases &&


Systemctl status dhcpd finally responded after I created the .service file
like you said. Based on a yum install in a test server, I've placed the
dhcpd.service file in /usr/lib/systemd/system and also created
dhcrelay.service. Now I know a little more about systemd and what to look
for in future compiling issues.

Thank you again! Much appreciated!

Respectfully,
Pranchisco K. Castro



On Fri, May 24, 2019 at 2:09 AM Peter Rathlev <peter at rathlev.dk> wrote:

> On Thu, 2019-05-23 at 14:34 +1000, Pranchisco Castro wrote:
> > I have a new CentOS 7.6 server and unpacked dhcp 4.4.1 in
> > /usr/local/src/
> [...]
> > Once it completed, I wanted to see if the service was available so I
> > entered:
> >
> > # systemctl status dhcpd
> > Unit dhcpd.service could not be found.
> >
> > # systemctl enable dhcpd
> > Failed to execute operation: No such file or directory
> >
> > It seems the server doesnt see the service. I can't figure out where
> > I went wrong and googling would just bring up pages of normal "yum
> > install dhcp" or archlinux
>
> Though Rick is right about there being a pre-compiled version in
> RHEL/CentOS, it's kind of old. Even though RedHat probably does a good
> job of back porting fixes, you can expect many people to advise you to
> use the official release when asking on this list.
>
> Compiling you own does work best if you're comfortable with compiling
> stuff and writing your own configuration and service files.
>
> The ISC DHCP source doesn't contain a systemd ".service" file so you
> have to make one yourself. The contents depend on how you configured
> dhcpd regarding where executables and configuration and lease files are
> placed.
>
> With "--prefix=/usr" the executable is installed in /usr/sbin/dhcpd.
> The lease files seem to be placed in "/var/db" from the output you
> pasted.
>
> The systemd service file from a CentOS 7 vendor version of ISC dhcpd is
> placed in /usr/lib/systemd/system/dhcpd.service when installed and
> looks like this:
>
>   [Unit]
>   Description=DHCPv4 Server Daemon
>   Documentation=man:dhcpd(8) man:dhcpd.conf(5)
>   Wants=network-online.target
>   After=network-online.target
>   After=time-sync.target
>
>   [Service]
>   Type=notify
>   ExecStart=/usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcpd -group
> dhcpd --no-pid
>
>   [Install]
>   WantedBy=multi-user.target
>
> I'm not sure if a plain build can use this, but you could try.
>
> We configure with the following command:
>
> CFLAGS="-Wno-unused-but-set-variable" ./configure --prefix=/usr \
>   --with-srv-lease-file=/var/lib/dhcpd/dhcpd.leases \
>   --with-srv-pid-file=/var/run/dhcpd.pid \
>   --enable-failover --enable-execute --enable-binary-leases
>
> We use a service unit file (in /etc/systemd/system/dhcpd.service to
> override any built in) with the following contents:
>
>    [Unit]
>    Description=DHCPv4 Server Daemon
>    Documentation=man:dhcpd(8) man:dhcpd.conf(5)
>    Wants=network-online.target
>    After=network-online.target
>    After=time-sync.target
>
>    [Service]
>    Type=forking
>    ExecStart=/usr/sbin/dhcpd -cf /etc/dhcp/dhcpd.conf -pf
> /var/run/dhcpd.pid -lf /var/lib/dhcpd/dhcpd.leases bond0
>    PIDFile=/var/run/dhcpd.pid
>
>    [Install]
>    WantedBy=multi-user.target
>
> --
> Peter
>
>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20190524/ee344a7d/attachment.html>


More information about the dhcp-users mailing list