Difference between revisions of "Centos7"
From DXSpider Documentation Wiki
(→firewalld) |
m (→systemd) |
||
Line 40: | Line 40: | ||
to start up dxspider | to start up dxspider | ||
− | # | + | #systemctl start dxspider |
to stop | to stop | ||
− | # | + | #systemctl stop dxspider |
to set up to start on boot | to set up to start on boot |
Revision as of 20:56, 10 February 2017
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 #systemctl start dxspider to stop #systemctl stop dxspider 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