Updated (Feb-22) instructions on how to install sen4cap

I am posting these notes for my future self and for anyone who may find this useful.

The instructions below are for sen4cap version 3.0 as described here.

In the example below i have installed sen4cap with a fresh CentOS 7.9 OS disk (~21 GB were used after fresh installation, including the OS). I have also an additional Data disk where the /mnt folder containing the downloaded and generated products is mounted.

Data disk partitioning and mounting

Find the disk:


lsblk -o NAME,HCTL,SIZE,MOUNTPOINT grep -i "sd"

In this case my data disk is under /dev/sdc:

sudo parted /dev/sdc --script mklabel gpt mkpart xfspart xfs 0% 100%
sudo mkfs.xfs /dev/sdc1
sudo partprobe /dev/sdc1

In my case i have an existing /mtn point so i unmount it:

sudo umount /mnt

Create and mount directories:

sudo mount /dev/sdc1 /mnt
sudo mkdir /mnt/archive
sudo mkdir /mnt/upload
sudo chmod -R a+wrx /mnt

edit the /etc/fstab file with the Data disk setting:

sudo blkid

The output looks similar to the following example:

/dev/sda1: LABEL="cloudimg-rootfs" UUID="11111111-1b1b-1c1c-1d1d-1e1e1e1e1e1e" TYPE="ext4" PARTUUID="1a1b1c1d-11aa-1234-1a1a1a1a1a1a"
/dev/sda15: LABEL="UEFI" UUID="BCD7-96A6" TYPE="vfat" PARTUUID="1e1g1cg1h-11aa-1234-1u1u1a1a1u1u"
/dev/sdb1: UUID="22222222-2b2b-2c2c-2d2d-2e2e2e2e2e2e" TYPE="ext4" TYPE="ext4" PARTUUID="1a2b3c4d-01"
/dev/sda14: PARTUUID="2e2g2cg2h-11aa-1234-1u1u1a1a1u1u"
/dev/sdc1: UUID="33333333-3b3b-3c3c-3d3d-3e3e3e3e3e3e" TYPE="xfs" PARTLABEL="xfspart" PARTUUID="c1c2c3c4-1234-cdef-asdf3456ghjk"

Next, open the /etc/fstab file in a text editor as follows:

sudo nano /etc/fstab

In this example, use the UUID value for the /dev/sdc1 device that was created in the previous steps, and the mountpoint of /mnt. Add the following line to the end of the /etc/fstab file:

UUID=33333333-3b3b-3c3c-3d3d-3e3e3e3e3e3e /mnt xfs defaults,nofail 1 2

Now we have a Data disk permanently mounted at /mnt

Download and instal sen4cap

wget and unzip the respective files inside the folders:

/mnt/archive/gipp/maja:

mkdir /mnt/archive/gipp
cd /mnt/archive/gipp
wget http://esa-sen4cap.org/sites/default/files/gipp_maja.zip
unzip gipp_maja.zip
sudo chmod -R a+wrx /mnt
mv /mnt/archive/gipp/gipp_maja /mnt/archive/gipp/maja

/mnt/archive/srtm:

wget http://esa-sen4cap.org/sites/default/files/srtm_europe.zip
mkdir /mnt/archive/srtm
cd /mnt/archive/srtm
unzip srtm_europe.zip

/mnt/archive/swbd:

wget http://esa-sen4cap.org/sites/default/files/swbd_europe.zip
mkdir /mnt/archive/swbd
cd /mnt/archive/swbd
unzip swbd_europe.zip

Install sen4cap:

cd /mnt/archive
wget http://esa-sen4cap.org/sites/default/files/20211117_Sen4CAPDistribution_3.0.zip
unzip 20211117_Sen4CAPDistribution_3.0.zip
cd /mnt/archive/Sen4CAPDistribution/install_script
sudo ./sen2agriPlatformInstallAndConfig.sh

Installation done!

Update SciHub query source

We need to switch the implicit query source in SciHub plugin from dhus to apihub. See this post.

For that we need first to set-up the site by uploading a .shp file and set-up the active processors (see sen4cap manual section 4.2). After that set-up the Data Sources on sen4cap.

We now wget and run the .sh script:

cd /mnt/archive
wget https://forum.esa-sen4cap.org/uploads/short-url/AfpDJKQg19s574jRw8GRRfUxgts.zip
unzip AfpDJKQg19s574jRw8GRRfUxgts.zip
rm AfpDJKQg19s574jRw8GRRfUxgts.zip
sudo chmod -R a+wrx /mnt
./change_scihub_jar_cfg.sh
./change_scihub_jar_cfg.sh -s apihub

The installation is done and data should be downloading from SciHub!

Great post, thanks! we encounter normally all kinds of premissioning issues. do you encounter these as well? If so, how do you solve them?

Or do you run this entire process via the root user? (seems not to be the case due to your sudo commands)

Hi Niek, thanks. That might be because of access rights to the file(s) and folder(s) you are trying to work with. Try using sudo chmod -R a+wrx /folder to upper level /folder you are working on?

yes true, i normally sudo chmod my way out of it, but it seems to come back all the time.

after following your exact steps (first removing the system) the installation still gave this error, which i think is a permission issue as well (but no expert unfortunately):

Created symlink from /etc/systemd/system/multi-user.target.wants/slurmd.service to /usr/lib/systemd/system/slurmd.service.
SLURM NODE SERVICE:    Active: active (running) since Thu 2022-02-24 14:02:15 CET; 86ms ago
Failed to start slurm.service: Unit not found.
Failed to execute operation: No such file or directory
Unit slurm.service could not be found.
SLURM SERVICE: 
sacctmgr: error: slurm_persist_conn_open_without_init: failed to open persistent connection to host:localhost:6819: Connection refused

I am also not an expert (just started to work with sen4cap), but could it be an issue with your firewall blocking some ports? Check out this post for some hints.