Hi everybody
I would like to share with you my experience about installation of production server ubuntu 16.10 with sen2cor 2.3.0 and Snap
I will share all my command line.
With this way, we obtain a functionnal Production server for L2A sentinel products
In this tuto, my username is “geouser”, you have to replace paths with your own…
You have to make a clear and fresh installation of Ubuntu Server 16.10 and you can follow the steps hereafter
Installation of SSH (for remote access to the server)
sudo apt-get install ssh
Download & Install Anconda
mkdir /home/geouser/ANACONDA
cd /home/geouser/ANACONDA
wget https://repo.continuum.io/archive/Anaconda2-4.2.0-Linux-x86_64.sh
bash /home/geouser/ANACONDA/Anaconda2-4.2.0-Linux-x86_64.sh
Follow the differents steps, note differents paths
Test anaconda
in a terminal enter:
python
it will open an interpreter with anaconda mentionned
now check the path of python
which python
my own path is for exemple (note this path for later)
/home/geouser/anaconda2/bin/python
SNAP
mkdir /home/geouser/SNAP
cd /home/geouser/SNAP
wget http://step.esa.int/downloads/5.0/installers/esa-snap_all_unix_5_0.sh
sudo sh esa-snap_all_unix_5_0.sh -c
when snap ask about configuration of python, do it and enter the path of python you have noted during anaconda install(in my case: /home/geouser/anaconda2/bin/python)
SEN2COR
mkdir /home/geouser/SEN2COR
cd /home/geouser/SEN2COR
cd /home/geouser/SEN2COR
wget http://step.esa.int/thirdparties/sen2cor/2.3.1/sen2cor-2.3.1.tar.gz
tar xvzf sen2cor-2.3.1.tar.gz
cd sen2cor-2.3.1
Becarefull with the next step: if there is an error you have probably a problem with your python path…
python setup.py install
Next you have to define environement variables:
sudo nano /etc/bash.bashrc
add the following lines at the end of the doc , save and quit
export SEN2COR_HOME=/home/geouser/sen2cor
export SEN2COR_BIN=/home/geouser/anaconda2/lib/python2.7/site-packages/sen2cor-2.3.1-py2.7.egg/sen2cor
export GDAL_DATA=/home/geouser/anaconda2/lib/python2.7/site-packages/sen2cor-2.3.1-py2.7.egg/sen2cor/cfg/gdal_data
Now you can check sen2cor with this command line:
L2A_Process
I hope this few lines help anyone.
Cheers