<div dir="ltr"><div>Thank you for responding everyone!</div><div><br></div><div>@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.<br></div><div>@Leroy, I've tried that with a few other variations initially but no luck.</div><div>@Rick, I installed from yum repository at first but my boss wanted the latest version which is 4.4.1</div><div>@Peter, That is it! Thank you so much! This is exactly what I needed!<br></div><div><br></div><div>For the .configure process, I had added a few more stuff from your suggestion <br></div><div><br></div><div>CFLAGS="-D_PATH_DHCLIENT_SCRIPT='\"/sbin/dhclient-script\"'         \<br>        -D_PATH_DHCPD_CONF='\"/etc/dhcp/dhcpd.conf\"'               \<br>        -D_PATH_DHCLIENT_CONF='\"/etc/dhcp/dhclient.conf\"'"        &&<br><br>./configure --prefix=/usr                                           \<br>            --sysconfdir=/etc/dhcp                                  \<br>            --localstatedir=/var                                    \<br>            --with-srv-lease-file=/var/lib/dhcpd/dhcpd.leases       \<br>            --with-srv6-lease-file=/var/lib/dhcpd/dhcpd6.leases     \<br>            --with-cli-lease-file=/var/lib/dhclient/dhclient.leases \<br>            --with-cli6-lease-file=/var/lib/dhclient/dhclient6.leases \<br>            --with-srv-lease-file=/var/lib/dhcpd/dhcpd.leases \<br>            --with-srv-pid-file=/var/run/dhcpd.pid \<br>            --enable-failover --enable-execute --enable-binary-leases &&</div><div><br></div><div><br></div><div>
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. <br></div><br><div></div><div>Thank you again! Much appreciated!<br></div><div><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div style="font-size:12.8px">Respectfully,</div><div style="font-size:12.8px">Pranchisco K. Castro</div><br></div></div></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 24, 2019 at 2:09 AM Peter Rathlev <<a href="mailto:peter@rathlev.dk">peter@rathlev.dk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, 2019-05-23 at 14:34 +1000, Pranchisco Castro wrote:<br>
> I have a new CentOS 7.6 server and unpacked dhcp 4.4.1 in<br>
> /usr/local/src/<br>
[...]<br>
> Once it completed, I wanted to see if the service was available so I<br>
> entered:<br>
> <br>
> # systemctl status dhcpd<br>
> Unit dhcpd.service could not be found.<br>
> <br>
> # systemctl enable dhcpd<br>
> Failed to execute operation: No such file or directory<br>
> <br>
> It seems the server doesnt see the service. I can't figure out where<br>
> I went wrong and googling would just bring up pages of normal "yum<br>
> install dhcp" or archlinux <br>
<br>
Though Rick is right about there being a pre-compiled version in<br>
RHEL/CentOS, it's kind of old. Even though RedHat probably does a good<br>
job of back porting fixes, you can expect many people to advise you to<br>
use the official release when asking on this list.<br>
<br>
Compiling you own does work best if you're comfortable with compiling<br>
stuff and writing your own configuration and service files.<br>
<br>
The ISC DHCP source doesn't contain a systemd ".service" file so you<br>
have to make one yourself. The contents depend on how you configured<br>
dhcpd regarding where executables and configuration and lease files are<br>
placed.<br>
<br>
With "--prefix=/usr" the executable is installed in /usr/sbin/dhcpd.<br>
The lease files seem to be placed in "/var/db" from the output you<br>
pasted.<br>
<br>
The systemd service file from a CentOS 7 vendor version of ISC dhcpd is<br>
placed in /usr/lib/systemd/system/dhcpd.service when installed and<br>
looks like this:<br>
<br>
  [Unit]<br>
  Description=DHCPv4 Server Daemon<br>
  Documentation=man:dhcpd(8) man:dhcpd.conf(5)<br>
  Wants=network-online.target<br>
  After=network-online.target<br>
  After=time-sync.target<br>
<br>
  [Service]<br>
  Type=notify<br>
  ExecStart=/usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcpd -group dhcpd --no-pid<br>
<br>
  [Install]<br>
  WantedBy=multi-user.target<br>
<br>
I'm not sure if a plain build can use this, but you could try.<br>
<br>
We configure with the following command:<br>
<br>
CFLAGS="-Wno-unused-but-set-variable" ./configure --prefix=/usr \<br>
  --with-srv-lease-file=/var/lib/dhcpd/dhcpd.leases \<br>
  --with-srv-pid-file=/var/run/dhcpd.pid \<br>
  --enable-failover --enable-execute --enable-binary-leases<br>
<br>
We use a service unit file (in /etc/systemd/system/dhcpd.service to<br>
override any built in) with the following contents:<br>
<br>
   [Unit]<br>
   Description=DHCPv4 Server Daemon<br>
   Documentation=man:dhcpd(8) man:dhcpd.conf(5)<br>
   Wants=network-online.target<br>
   After=network-online.target<br>
   After=time-sync.target<br>
<br>
   [Service]<br>
   Type=forking<br>
   ExecStart=/usr/sbin/dhcpd -cf /etc/dhcp/dhcpd.conf -pf /var/run/dhcpd.pid -lf /var/lib/dhcpd/dhcpd.leases bond0<br>
   PIDFile=/var/run/dhcpd.pid<br>
<br>
   [Install]<br>
   WantedBy=multi-user.target<br>
<br>
-- <br>
Peter<br>
<br>
<br>
_______________________________________________<br>
dhcp-users mailing list<br>
<a href="mailto:dhcp-users@lists.isc.org" target="_blank">dhcp-users@lists.isc.org</a><br>
<a href="https://lists.isc.org/mailman/listinfo/dhcp-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a><br>
</blockquote></div>