[Dxspider-support] Centos7 systemd init script and firewalld settings
Mike McCarthy, W1NR
lists at w1nr.net
Sun Jul 20 00:36:41 BST 2014
Thanks for the script example.I have been struggling with this for a
week. What I missed was the "StandardOutput=null" for the redirection.
A couple of additional comments. To keep things all systemd the use of
"service" is depracated and should be replaced with "systemctl start
dxspider" and "systemctl stop dxspider". Also "systemctl status -l
dxspider" gives useful information.
If you only want restart on errors then the use of "Restart=on-failure"
is more appropriate.
For debug, set "StandardOutput=tty" and all output will go to the system
console.
73 de Mike, W1NR
On 07/18/2014 06:44 AM, Brendan Minish wrote:
> Hello all
>
> Centos7 linux has been released and my initial testing shows that
> dxspider is easy to install on this platform.
> When I have done a bit more work on the install process I'll add a
> section to the dxspider wiki on installation on centos7
>
> One big change between Centos 6 and Centos7 is that upstart has been
> replaced by systemd, this changes how dxpsider can be run as a service
>
> This is my initial attempt at creating a systemd service file for
> dxspider. It probably applies to other distros using systemd also
>
> Create a file called
>
> dxspider.service in /etc/systemd/system/
> 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
>
>
> The firewall, cnetos7 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>SSH</short>
> <description>Dxspider dxcluster service on tcp port 7300</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
>
>
>
>
>
More information about the Dxspider-support
mailing list