Here is an example of the installation of the ISC DHCP server for ABillS in Ubuntu Server.
Switch to the root user:
1 | sudo -i |
Install package:
1 2 | apt-get install isc-dhcp-server ln -s /usr/abills/Abills/modules/Dhcphosts/leases2db.pl /usr/abills/libexec/leases2db.pl |
Run:
1 | /usr/abills/libexec/leases2db.pl -d LEASES=/var/lib/dhcp/dhcpd.leases |
Change owner of a file:
1 | chown www-data /etc/dhcp/dhcpd.conf |
Open the config.pl in the Editor:
1 | nano /usr/abills/libexec/config.pl |
Add options:
1 2 3 | $conf{DHCPHOSTS_CONFIG}='/etc/dhcp/dhcpd.conf'; $conf{DHCPHOSTS_LEASES}='/var/lib/dhcp/dhcpd.leases'; $conf{DHCPHOSTS_RECONFIGURE}='/usr/bin/sudo /etc/init.d/isc-dhcp-server restart'; |
Open in the Editor:
1 | nano /etc/sudoers |
Add the string making the ability to run a service system:
1 | www-data ALL = NOPASSWD: /etc/init.d/isc-dhcp-server |
Go to the Abills Web interface, open the menu "settings"-"IP (DHCP)"-"Network IP (DHCP) Network", add the network if needed, then "Show, reconfigure the dhcp" and "Reconfigure".
See if the isc-dhcp-server command:
1 | /etc/init.d/isc-dhcp-server status |
Logs are written to the file/var/log/syslog
You can also configure the export of DHCP history to see it in the “Report” – “DHCP History” menu.
To do this, make a link:
1 | ln -s /usr/abills/Abills/modules/Dhcphosts/dhcp_log2db.pl /usr/abills/libexec/dhcp_log2db.pl |
Separating DHCP logs into a separate file as I wrote in the article below and adding to the Startup script with the command:
1 | tail -F /var/log/dhcpd.log | /usr/abills/libexec/dhcp_log2db.pl |
See also my articles:
Installing and configuring a dhcp server, isc-in Ubuntu
Packet capturing with tcpdump