Ubuntu 24.04: Difference between revisions

From DXSpider Documentation Wiki
Jump to navigation Jump to search
m 1 revision imported
No edit summary
Line 5: Line 5:
A stock install of Ubuntu server edition, install the standard version, not the light version. The default settings are fine and no extra packages are required at install time.
A stock install of Ubuntu server edition, install the standard version, not the light version. The default settings are fine and no extra packages are required at install time.


as part of the standard install you will be asked to create a user account on the system, choose strong passwords.
As part of the standard install you will be asked to create a user account on the system, choose strong passwords.


This is the account that you will use to manage the Ubuntu server and will have sudo privileges. Dxspider does not require sudo access and you will create a separate 'sysop' account for dxspider to use as part of the installation.  
This is the account that you will use to manage the Ubuntu server and will have sudo privileges. Dxspider does not require sudo access and you will create a separate 'sysop' account for dxspider to use as part of the installation.  


enable ssh as you will require this for administration  
Enable ssh as you will require this for administration.


In these notes command executed as root are prefixed with #  
In these notes command executed as root are prefixed with #  


commands executed as the user ‘sysop’ are prefixed with $  
Commands executed as the user ‘sysop’ are prefixed with $  


At various points during the installation text files will need to be edited at the command line, 'nano' and 'vim' are both choices built into the stock ubuntu server install. If you do not already have a familiarity with vim, nano is probably the choice you want
At various points during the installation text files will need to be edited at the command line, 'nano' and 'vim' are both choices built into the stock Ubuntu server install. If you do not already have a familiarity with vim, nano is probably the choice you want.


Download the Ubuntu 22.04 server install image from here [https://releases.ubuntu.com/22.04/ Ubuntu 22.04]
Download the latest Ubuntu server install image from here [https://releases.ubuntu.com Ubuntu]


==== Installation ====  
==== Installation ====  


Login as the user you created at install time and become root  
Login as the user you created at install time and become root.


  $ sudo su -
  $ sudo su -
Line 34: Line 34:
  # usermod -a -G sysop <login_user>
  # usermod -a -G sysop <login_user>


Install packages that will be required for dxspider, we are going to go directly to mojo branch. all the packages required are in the apt packaging system so we shall install from there  
Install packages that will be required for dxspider, we are going to go directly to mojo branch. All the packages required are in the apt packaging system so we shall install from there.


  # apt install make libtimedate-perl libnet-telnet-perl libdigest-sha-perl libdata-structure-util-perl libmojo-ioloop-readwriteprocess-perl libjson-perl gcc libmath-round-perl libnet-cidr-lite-perl libcurses-perl
  # apt install make libtimedate-perl libnet-telnet-perl libdigest-sha-perl libdata-structure-util-perl libmojo-ioloop-readwriteprocess-perl libjson-perl gcc libmath-round-perl libnet-cidr-lite-perl libcurses-perl


we will make some links now, whilst we are still root  
We will make some links now, whilst we are still root.


  # ln -s /home/sysop/spider /spider
  # ln -s /home/sysop/spider /spider
Line 44: Line 44:
  # ln -s /spider/perl/*dbg /usr/local/bin
  # ln -s /spider/perl/*dbg /usr/local/bin


Now would also be a very good time to consider one’s firewall requirements, for example  
Now would also be a very good time to consider one’s firewall requirements, for example:


  # ufw allow 7300/tcp
  # ufw allow 7300/tcp
Line 56: Line 56:




We want to install dxspider, Mojo branch  
We want to install dxspider, Mojo branch.


  $ git clone -b mojo  git://scm.dxcluster.org/scm/spider
  $ git clone -b mojo  git://scm.dxcluster.org/scm/spider


change into the newly created spider directory  
Change into the newly created spider directory.


  $ cd spider
  $ cd spider


Make our local directories  
Make our local directories.


  $ mkdir local_cmd
  $ mkdir local_cmd
Line 70: Line 70:
  $ mkdir local
  $ mkdir local


Configure DXvars, this is where the parameters for the cluster are defined  
Configure DXvars, this is where the parameters for the cluster are defined.


  $ cp perl/DXVars.pm.issue local/DXVars.pm
  $ cp perl/DXVars.pm.issue local/DXVars.pm


edit local/DXVars.pm to define the various parameters that are appropriate for your cluster
Edit local/DXVars.pm to define the various parameters that are appropriate for your cluster.


  $ cp perl/Listeners.pm local/
  $ cp perl/Listeners.pm local/


edit local/Listeners.pm and follow instructions, generally if you do have a static ipv6 address it’s worth configuring for dual stack these days, however before you will see ipv6 users you will also need to ensure that you have the appropriate AAAA DNS record in place for the v6 address of your dxcluster
Edit local/Listeners.pm and follow instructions, generally if you do have a static ipv6 address it’s worth configuring for dual stack these days, however before you will see ipv6 users you will also need to ensure that you have the appropriate AAAA DNS record in place for the v6 address of your dxcluster.


Create a connect script to connect to your peer node(s)
Create a connect script to connect to your peer node(s).


  $ cd /spider/connect/
  $ cd /spider/connect/
  $ cp gb7tlh <peer-node>
  $ cp gb7tlh <peer-node>


edit this file with your chosen editor so that the telnet address and port are correct for your peer node(s) and set your own node callsign
Edit this file with your chosen editor so that the telnet address and port are correct for your peer node(s) and set your own node callsign.


We need to build from source the client program  
We need to build from source the client program  
Line 92: Line 92:
  $ make
  $ make


you should see this complete with no errors and how have an executable file called client  
You should see this complete with no errors and how have an executable file called client.


Change to the base spider directory
Change to the base spider directory
Line 100: Line 100:
  $ perl/create_sysop.pl
  $ perl/create_sysop.pl
   
   
run the cluster  
Run the cluster  


  $ perl/cluster.pl
  $ perl/cluster.pl


assuming there are no errors, it will start up  
Assuming there are no errors, it will start up.


Now it’s time to connect to the node and check that it’s working ok.
Now it’s time to connect to the node and check that it’s working ok.
open a second ssh session to your server and become sysop  
Open a second ssh session to your server and become sysop.


  $ sudo su - sysop
  $ sudo su - sysop


issue the ‘dx’ command to access the dxcluster administration console  
Issue the ‘dx’ command to access the dxcluster administration console.
  $ dx  
  $ dx  


We need to tell the node the callsign (including any SSID) of it’s peer node(s), this has to be done both ends so you will need to have agreement in place with other node(s) you wish to peer with  
We need to tell the node the callsign (including any SSID) of it’s peer node(s), this has to be done both ends so you will need to have agreement in place with other node(s) you wish to peer with.


  set/spider <peer-node>  
  set/spider <peer-node>  


now it’s time to connect and see if things are working  
Now it’s time to connect and see if things are working.


  connect/<peer-node>
  connect/<peer-node>


if all is good you should see spots start arriving  
If all is good you should see spots start arriving.
at this point you may wish to confirm remote telnet access is working also  
At this point you may wish to confirm remote telnet access is working also.


Time to tidy up the installation and set up dxspider to start as a service, exit the console  
Time to tidy up the installation and set up dxspider to start as a service, exit the console  
by issuing the ‘bye’ command
by issuing the ‘bye’ command.
  bye
  bye


Firstly, as the user sysop we will set up the dxpsider crontab file. This controls things that dxpsider should do on a regular schedule, like check that it is connected to upstream nodes, update databases etc  
Firstly, as the user sysop we will set up the dxpsider crontab file. This controls things that dxpsider should do on a regular schedule, like check that it is connected to upstream nodes, update databases etc.


  $ cd /spider/local_cmd/
  $ cd /spider/local_cmd/
now use an editor to create a file called crontab
now use an editor to create a file called crontab.
  $ vim crontab
  $ vim crontab


with the contents below (replacing <peer-node> with the call of the upstream peer node.  
With the contents below (replacing <peer-node> with the call of the upstream peer node).
this will set up a simple schedule that will check very minute to see if the node is connected to it’s peer, if not connection will be attempted  
This will set up a simple schedule that will check very minute to see if the node is connected to it’s peer, if not connection will be attempted.
   
   
  # Dxspider crontab file  
  # Dxspider crontab file  
Line 143: Line 143:
  #
  #


further help on crontab scheduling can be found here [https://crontab.guru/ ]
Further help on crontab scheduling can be found here [https://crontab.guru/ ]


Now we will install the systemd service file for the dxpsider service and enable it.
Now we will install the systemd service file for the dxpsider service and enable it.


We must become root, however since the sysop user does not have sudo privileges, we will first have to drop back to our login user  
We must become root, however since the sysop user does not have sudo privileges, we will first have to drop back to our login user.


  sysop@ei7mre-2:~$ exit
  sysop@ei7mre-2:~$ exit
Line 154: Line 154:
  root@ei7mre-2:~#
  root@ei7mre-2:~#


now we will copy the service file to /etc/systemd/system/  
Now we will copy the service file to /etc/systemd/system/  


  # cp /spider/dxspider.service /etc/systemd/system/
  # cp /spider/dxspider.service /etc/systemd/system/
and start the service
And start the service
  # systemctl start dxspider.service
  # systemctl start dxspider.service
On some systems it may also need enabling  
On some systems it may also need enabling  
  # systemctl enable dxspider.service
  # systemctl enable dxspider.service


become the sysop user  
Become the sysop user  
  #  su - sysop  
  #  su - sysop  


verify the cluster is running by opening the admin console  
Verify the cluster is running by opening the admin console  
  $ dx
  $ dx

Revision as of 18:17, 8 February 2025

Installing dxspider 'mojo' branch on Ubuntu 22.04

Prerequisites

A stock install of Ubuntu server edition, install the standard version, not the light version. The default settings are fine and no extra packages are required at install time.

As part of the standard install you will be asked to create a user account on the system, choose strong passwords.

This is the account that you will use to manage the Ubuntu server and will have sudo privileges. Dxspider does not require sudo access and you will create a separate 'sysop' account for dxspider to use as part of the installation.

Enable ssh as you will require this for administration.

In these notes command executed as root are prefixed with #

Commands executed as the user ‘sysop’ are prefixed with $

At various points during the installation text files will need to be edited at the command line, 'nano' and 'vim' are both choices built into the stock Ubuntu server install. If you do not already have a familiarity with vim, nano is probably the choice you want.

Download the latest Ubuntu server install image from here Ubuntu

Installation

Login as the user you created at install time and become root.

$ sudo su -

Create the sysop user & group , this is the user that the dxcluster will run as.

# adduser sysop

Add your normal login user to the sysop group, this allows the normal login user to interact with the cluster via the ‘dx’ command etc.

  • Note however the sysop user must be used for administration involving file system access such as the creation of new connection scripts, git updates etc.
# usermod -a -G sysop <login_user>

Install packages that will be required for dxspider, we are going to go directly to mojo branch. All the packages required are in the apt packaging system so we shall install from there.

# apt install make libtimedate-perl libnet-telnet-perl libdigest-sha-perl libdata-structure-util-perl libmojo-ioloop-readwriteprocess-perl libjson-perl gcc libmath-round-perl libnet-cidr-lite-perl libcurses-perl

We will make some links now, whilst we are still root.

# ln -s /home/sysop/spider /spider
# ln -s /spider/perl/console.pl /usr/local/bin/dx
# ln -s /spider/perl/*dbg /usr/local/bin

Now would also be a very good time to consider one’s firewall requirements, for example:

# ufw allow 7300/tcp
# ufw allow ssh
# ufw enable

We have done everything we need to do for now as the root user, for the rest of the install we will be the user “sysop”

change to the sysop user

# su - sysop


We want to install dxspider, Mojo branch.

$ git clone -b mojo  git://scm.dxcluster.org/scm/spider

Change into the newly created spider directory.

$ cd spider

Make our local directories.

$ mkdir local_cmd
$ mkdir local_data
$ mkdir local

Configure DXvars, this is where the parameters for the cluster are defined.

$ cp perl/DXVars.pm.issue local/DXVars.pm

Edit local/DXVars.pm to define the various parameters that are appropriate for your cluster.

$ cp perl/Listeners.pm local/

Edit local/Listeners.pm and follow instructions, generally if you do have a static ipv6 address it’s worth configuring for dual stack these days, however before you will see ipv6 users you will also need to ensure that you have the appropriate AAAA DNS record in place for the v6 address of your dxcluster.

Create a connect script to connect to your peer node(s).

$ cd /spider/connect/
$ cp gb7tlh <peer-node>

Edit this file with your chosen editor so that the telnet address and port are correct for your peer node(s) and set your own node callsign.

We need to build from source the client program

$ cd /spider/src
$ make

You should see this complete with no errors and how have an executable file called client.

Change to the base spider directory

$ cd /spider

Now we need to set up the sysop user for dxpsider, this is based on the configuration in /spider/local/DXVars.pm and you will need to rerun this command if you change details pertaining to the sysop.

$ perl/create_sysop.pl

Run the cluster

$ perl/cluster.pl

Assuming there are no errors, it will start up.

Now it’s time to connect to the node and check that it’s working ok. Open a second ssh session to your server and become sysop.

$ sudo su - sysop

Issue the ‘dx’ command to access the dxcluster administration console.

$ dx 

We need to tell the node the callsign (including any SSID) of it’s peer node(s), this has to be done both ends so you will need to have agreement in place with other node(s) you wish to peer with.

set/spider <peer-node> 

Now it’s time to connect and see if things are working.

connect/<peer-node>

If all is good you should see spots start arriving. At this point you may wish to confirm remote telnet access is working also.

Time to tidy up the installation and set up dxspider to start as a service, exit the console by issuing the ‘bye’ command.

bye

Firstly, as the user sysop we will set up the dxpsider crontab file. This controls things that dxpsider should do on a regular schedule, like check that it is connected to upstream nodes, update databases etc.

$ cd /spider/local_cmd/

now use an editor to create a file called crontab.

$ vim crontab

With the contents below (replacing <peer-node> with the call of the upstream peer node). This will set up a simple schedule that will check very minute to see if the node is connected to it’s peer, if not connection will be attempted.

# Dxspider crontab file 
# m h dm m dw 
* * * * * start_connect('<peer-node>') unless connected('<peer-node>')
#

Further help on crontab scheduling can be found here [1]

Now we will install the systemd service file for the dxpsider service and enable it.

We must become root, however since the sysop user does not have sudo privileges, we will first have to drop back to our login user.

sysop@ei7mre-2:~$ exit
bminish@ei7mre-2:~$ sudo su -
[sudo] password for bminish:  
root@ei7mre-2:~#

Now we will copy the service file to /etc/systemd/system/

# cp /spider/dxspider.service /etc/systemd/system/

And start the service

# systemctl start dxspider.service

On some systems it may also need enabling

# systemctl enable dxspider.service

Become the sysop user

#  su - sysop 

Verify the cluster is running by opening the admin console

$ dx