Centos7

From DXSpider Documentation Wiki
Revision as of 13:39, 6 January 2017 by W1nr (Talk | contribs)

Jump to: navigation, search

Introduction

Centos7 makes some big changes to both the init system and to the firewall

centos7 systemd system file

we need to install EPEL for additional packages EPEL

Additional yum command

 yum install perl-TimeDate perl-Time-HiRes perl-Digest-SHA1 perl-Curses perl-Net-Telnet git gcc make perl-Data-Dumper perl-DB_File

systemd

a basic service file for systemd

create a file

/etc/systemd/system/dxspider.service

With the following contents

[Unit]
Description= Dxspider DXCluster service
After=network.target

[Service]
Type=simple
User=sysop
Group=sysop
ExecStart= /usr/bin/perl -w /spider/perl/cluster.pl
# Comment out line below for logging everything to /var/log/messages
StandardOutput=null
Restart=always

[Install]
WantedBy=multi-user.target

Usage:

to start up dxspider 
#service dxspider start
to stop
#service dxspider stop

to set up to start on boot 
#systemctl enable dxspider

firewalld

The firewall, centos7 has moved to using firewalld to manage the firewall settings, I am not sure how I feel about this! The old way can be installed

#yum remove firewalld
#yum install iptables-service 

systemctl enable iptables

Then you have the traditional iptables way of doing things

However if one wishes to use the 'new way' with firewalld

first create

/etc/firewalld/services/dxspider.xml

with the contents (change port number to suit your own needs)

<service>
  <short>DXSpider</short>
  <description>DXSpider DX cluster service</description>
  <port protocol="tcp" port="7300"/>
</service>

then issue the following commands as root

#firewall-cmd --reload 
#firewall-cmd --permanent --zone=public --add-service=dxspider
#firewall-cmd --reload