Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Glass on Centos 8 #62

Open
moelfus opened this issue Mar 27, 2020 · 0 comments
Open

Glass on Centos 8 #62

moelfus opened this issue Mar 27, 2020 · 0 comments

Comments

@moelfus
Copy link

moelfus commented Mar 27, 2020

Hi,
nice project. I set it up on a clean Centos 8 system and wanted to share how I got it running. In case someone is interested:

As root install nodejs
$ yum -y install nodejs

do as in the original recipe:

$ cd /opt
$ git clone https://github.com/Akkadius/glass-isc-dhcp.git
$ cd glass-isc-dhcp
$ mkdir logs
$ chmod u+x ./bin/ -R
$ chmod u+x *.sh
$ npm install
$ npm install forever -g

You can ignore the npm warning about fsevent since you are not using MacOs:

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/forever/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

Beforer testing you have to change a path in /opt/glass-isc-dhcp/config/glass_config.json:

 "leases_file": "/var/lib/dhcpd/dhcpd.leases",
  "log_file": "/var/log/dhcpd/dhcpd.log",

Then let the firewall know about glass, you may have to adjust the zone. We have an internal and external zone. Otherwise public would also be an option:

$ firewall-cmd --zone=internal --add-port=3000/tcp --permanent
$ firewall-cmd --reload

In a final step you may register glass as system service. Therefore create:
vim /etc/systemd/system/dhcpd_glass.service
with the content:

[Unit]
Description=Glass ISC DHCP Server Gui Service

[Service]
ExecStart=/usr/bin/node  /opt/glass-isc-dhcp/bin/www
# Required on some systems
WorkingDirectory=/opt/glass-isc-dhcp
Restart=always
# Restart service after 10 seconds if node service crashes
RestartSec=10
# Output to syslog
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=glass-dhcp

[Install]
WantedBy=multi-user.target

Enable the service:
systemctl enable dhcpd_glass.service
and start it:
systemctl start dhcpd_glass.service

Have fun!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant