{"id":4318034,"date":"2018-05-07T11:46:50","date_gmt":"2018-05-07T09:46:50","guid":{"rendered":"http:\/\/www.sv5fri.eu\/?p=4318034"},"modified":"2019-01-04T10:47:03","modified_gmt":"2019-01-04T08:47:03","slug":"install-dxspider-on-centos-7-rhel-7","status":"publish","type":"post","link":"https:\/\/www.sv5fri.eu\/?p=4318034","title":{"rendered":"Install DxSpider on CentOS 7 \/ RHEL 7"},"content":{"rendered":"<h6>Revision: 1.00 &#8211; 07\/05\/2018<\/h6>\n<p>Here you find my installation guide how to install DxSpider on CentOS 7 \/ RHEL 7.\u00a0 Also you can find more information here <a href=\"http:\/\/wiki.dxcluster.org\/index.php\/Main_Page\" target=\"_blank\" rel=\"noopener\">wiki.dxcluster.org<\/a>. If you\u00a0need help please contact with me.<\/p>\n<p>Furthermore if you don&#8217;t want make manual installation you can used my <a title=\"nstallation and Configuration Script for Dxspider\" href=\"http:\/\/www.sv5fri.eu\/?p=4318051\">script<\/a> for the installation and configuration Dxspider (The firewall and services must be configure manual).<\/p>\n<p>1. First login as\u00a0 root.<\/p>\n<p>SeLinux is by default enabled and there is no need to disable it for running a telnet DxSpider node.<\/p>\n<p>yum is the package manager<\/p>\n<p>to update the system use<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\"># yum update<\/pre>\n<p>as the root user install the additional package repository EPEL<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\"># yum install epel-release<\/pre>\n<p>2. Add the extra packages needed by DXSpider<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\"># yum install perl-TimeDate perl-Time-HiRes perl-Digest-SHA1 perl-Curses perl-Net-Telnet git gcc make perl-Data-Dumper perl-DB_File<\/pre>\n<p>3. Create user sysop and setup password<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\"># adduser -m sysop \n\n# passwd sysop<\/pre>\n<p>4. Now download and\u00a0 unpack the DX Spider distribution, set symbolic links and group permissions.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\"># ln -s ~sysop\/spider \/spider<\/pre>\n<p>before adding the spider group it is advisable to check that group # 251 is not already in use<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\"># cat \/etc\/group |grep 251<\/pre>\n<p>Which should produce no output, if 251 is already assigned to a group choose a different group Number here, On Redhat based distributions Group numbers below 500 are assigned to system services so choose a free group number below 500<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\"># groupadd -g 251 spider<\/pre>\n<p><!--more--><\/p>\n<p>Use the following commands to add the users to the spider group<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\"># usermod -aG spider sysop \n\n# usermod -aG spider root<\/pre>\n<p>5. Now login to your machine as the user you created earlier. In my case that user is called &#8216;sysop&#8217;. Once logged in, issue the following commands<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\"># su -l sysop<\/pre>\n<p>6. Use git to get latest DXspider build<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">$ git clone git:\/\/scm.dxcluster.org\/scm\/spider<\/pre>\n<p>7. Fix up permissions ( <span style=\"text-decoration: underline;\"><span style=\"background-color: #ffff00;\">AS THE SYSOP USER<\/span><\/span> )<\/p>\n<p>Very bad things happen if you run these as root and in the wrong <span style=\"text-decoration: underline;\">place,<\/span> so I wish to make it abundantly clear that these are to be run as the sysop user in the sysop&#8217;s home directory \/home\/sysop<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">$ chown -R sysop.spider spider\n\n$ find . -type d -exec chmod 2775 {} \\; \n\n$ find . -type f -exec chmod 775 {} \\;<\/pre>\n<p>8. We are installed, now to configure the cluster<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">$ cd \/spider $ mkdir local\n\n$ mkdir local_cmd \n\n$ cp perl\/DXVars.pm.issue local\/DXVars.pm \n\n$ cd local \n\n$ vi DXVars.pm (or your favourite editor)<\/pre>\n<p>Using the distributed DXVars.pm as a a template, set your cluster callsign, sysop callsign and other user info to suit your own environment.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">$mycall = \"SV5FRI-1\";<\/pre>\n<p>This is the call sign of your cluster. Here in the UK we have separate callsigns for our cluster nodes. If you can&#8217;t use a different callsign I suggest you use an SSID of &#8216;-2&#8217; for the node callsign &#8216;$mycall&#8217;.<\/p>\n<pre class=\"EnlighterJSRAW \" data-enlighter-language=\"shell\">$myalias = \"SV5FRI\";<\/pre>\n<p>This is the sysop user callsign, normally your own.<\/p>\n<p><span style=\"text-decoration: underline;\"><span style=\"background-color: #ffff00;\">PLEASE USE CAPITAL LETTERS FOR CALLSIGNS<\/span><\/span><\/p>\n<p>Note that this a perl file which will be parsed and executed as part of the cluster. If you get it wrong then perl will complain when you start the cluster process. It is important only to alter the text of any section. Some of the lines look a little odd. Take this line for example &#8230;.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">$myemail = \"myemail@gmail.com\";<\/pre>\n<p>There appears to be an extra slash in there. However this has to be there for the file to work so leave it in.<\/p>\n<p>DON&#8217;T alter any file in \/spider\/perl, they are overwritten with every release. Any files or commands you place in \/spider\/local or \/spider\/local_cmd will automagically be used in preference to the ones in \/spider\/perl EVEN while the cluster is running!<\/p>\n<p>Save the new file and change directory to ..\/perl &#8230;.<\/p>\n<p>9. E<em>dit Listeners.pm to remove \u201c#\u201d from the line for the port, and add additional ports as needed:<\/em><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">$ cp \/spider\/perl\/Listeners.pm \/spider\/local\/Listeners.pm \n\n$ cd \/spider\/local\/ \n\n$ vi Listeners.pm<\/pre>\n<p>edit \/spider\/local\/Listeners.pm<\/p>\n<p>It comes out of the box looking something like:-<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\"> @listen = ( \n# [\"0.0.0.0\", 7300], \n);<\/pre>\n<p>Change it so that it looks like this:-<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"classic\"> @listen = (\n   [\"0.0.0.0\", 7300],\n);\n<\/pre>\n<p>10. Now type the following command which creates the basic user file with you as the sysop.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">$ cd ..\/perl \n\n$ .\/create_sysop.pl<\/pre>\n<p>11. Firewall Configuration<span id=\"Firewall_Configuration\" class=\"mw-headline\"><\/span><\/p>\n<p>Login as root<\/p>\n<p>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<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\"># yum remove firewalld\n\n# yum install iptables-service \n\n# systemctl enable iptables\n<\/pre>\n<p>Then you have the traditional iptables way of doing things<\/p>\n<p>However if one wishes to use the &#8216;new way&#8217; with firewalld<\/p>\n<p>first create<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"classic\"># touch \/etc\/firewalld\/services\/dxspider.xml\n\n\n# vi \/etc\/firewalld\/services\/dxspider.xml<\/pre>\n<p>with the contents (change port number to suit your own needs)<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"classic\">&lt;service&gt; \n\t&lt;short&gt;DXSpider&lt;\/short&gt; \n\t&lt;description&gt;DXSpider DX cluster service&lt;\/description&gt; \n\t&lt;port protocol=\"tcp\" port=\"7300\"\/&gt; \n&lt;\/service&gt;<\/pre>\n<p>then issue the following commands as root<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\"># firewall-cmd --reload \n\n# firewall-cmd --permanent --zone=public --add-service=dxspider \n\n# firewall-cmd --reload<\/pre>\n<p>12. Service Configuration (systemd)<span id=\"Service_Configuration\" class=\"mw-headline\"><\/span><\/p>\n<p>Login as and a basic service file for systemd<\/p>\n<p>create a file<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\"># touch \/etc\/systemd\/system\/dxspider.service\n\n\n# vi \/etc\/systemd\/system\/dxspider.service<\/pre>\n<p>With the following contents<\/p>\n<p>[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<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">[Unit] \nDescription= Dxspider DXCluster service \nAfter=network.target \n\n[Service] \nType=simple \nUser=sysop \nGroup=sysop \nExecStart= \/usr\/bin\/perl -w \/spider\/perl\/cluster.pl \n# Comment out line below for logging everything to \/var\/log\/messages \nStandardOutput=null \nRestart=always \n\n[Install] \nWantedBy=multi-user.target<\/pre>\n<p>Usage:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">to start up dxspider \n\n# systemctl start dxspider \n\nto stop \n\n# systemctl stop dxspider \n\nto set up to start on boot \n\n# systemctl enable dxspider<\/pre>\n<p>13. On a separate ssh or system console, log into the system as sysop<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">$ \/spider\/perl\/console.pl<\/pre>\n<p>14. C<em>reates the connect script file and enters the editor. <\/em>Your connect script should look similar to this script.<\/p>\n<p>Create connect script<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">$ touch \/spider\/connect\/&lt;adjacent_node_callsign&gt;\n\n$ vi \/spider\/connect\/&lt;adjacent_node_callsign&gt;\n<\/pre>\n<p>Connect script must like this<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">timeout 60 \nabort (Busy|Sorry|Fail) \n# don't forget to chmod 4775 netrom_call! \nconnect telnet cluster.xyz.com 7300 \n# example 'login' 'sv5fri-1' \n'login' 'your_node_callsign' \n# example if you connect to k1ttt \n# client k1ttt \ntelnet client connect_node_callsign telnet<\/pre>\n<p>After check permission file<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\"># chmod 775 \/spider\/connect\/adjacent_node_callsign<\/pre>\n<p>15. To configure your node you must set the adjacent node by node type:<\/p>\n<p>i. For connection to a DXSpider node use the set\/spider command from the console<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">$ \/spider\/perl\/console.pl\n\n\u2013----- \nsv5fri de sv5fri-1 25-Nov-2015 0755Z dxspider &gt; set\/spider adjacent_node_callsign\n<\/pre>\n<p><em>\u00a0Enter your link partner as after set\/spider<\/em><\/p>\n<p>ii. For a connection to an ARCluster node<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">$ \/spider\/perl\/console.pl \n\u2013----- \n\nsv5fri de sv5fri-1 25-NOV-2015 0757Z dxspider &gt; set\/arcluster adjacent_node_callsign<\/pre>\n<p>16. To initiate a connection to the your new adjacent node partner<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">$ \/spider\/perl\/console.pl \n\nconnect adjacent_node_callsign<\/pre>\n<p>17. At least you need a\u00a0<b>cron<\/b>\u00a0and a\u00a0<b>connect<\/b>\u00a0script to connect to the nodes automatically <i>for examble \u2013 your node parter is: k1ttt<\/i><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">$ touch \/spider\/local_cmd\/crontab \n\n$ vi \/spider\/local_cmd\/crontab<\/pre>\n<p>the cron like this:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\"># Check every 10 minutes to see if xxxx is connected and if not \n# start a connect job \n#\n0,10,20,30,40,50 * * * * start_connect('k1ttt') unless connected('k1ttt')<\/pre>\n<p>Next change the permissions for the file crontab<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\"># chmod 775 \/spider\/local_cmd\/crontab<\/pre>\n<p>Good luck with DxSpider installation \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Revision: 1.00 &#8211; 07\/05\/2018 Here you find my installation guide how to install DxSpider on CentOS 7 \/ RHEL 7.\u00a0 Also you can find more information&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[280,3],"tags":[53,278,275,271,274,40,277,276,55,54,273,272,56,149,10],"class_list":["post-4318034","post","type-post","status-publish","format-standard","hentry","category-linux","category-projects","tag-centos","tag-centos-redhat-fedora","tag-centos-7-rhel-7","tag-centos7","tag-centos7-rhel7","tag-dxspider","tag-dxspider-installation","tag-dxspider-setup","tag-fedora","tag-redhat","tag-rhel","tag-rhel-7","tag-run-dxspider-as-service","tag-sv1-sv5fri","tag-sv5fri"],"_links":{"self":[{"href":"https:\/\/www.sv5fri.eu\/index.php?rest_route=\/wp\/v2\/posts\/4318034","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sv5fri.eu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sv5fri.eu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sv5fri.eu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sv5fri.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4318034"}],"version-history":[{"count":14,"href":"https:\/\/www.sv5fri.eu\/index.php?rest_route=\/wp\/v2\/posts\/4318034\/revisions"}],"predecessor-version":[{"id":4318119,"href":"https:\/\/www.sv5fri.eu\/index.php?rest_route=\/wp\/v2\/posts\/4318034\/revisions\/4318119"}],"wp:attachment":[{"href":"https:\/\/www.sv5fri.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4318034"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sv5fri.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4318034"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sv5fri.eu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4318034"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}