mobi

mail@pastecode.io avatar
unknown
plain_text
2 years ago
2.0 kB
1
Indexable
Never
#Ubuntu version
Release: 22.04
Codename: jammy

#Virtualbox configuration
Base memory: 4096MB
Processors: 4

#Add the following package repository to the
sudo gedit /etc/apt/sources.list
# and add the following line
deb [trusted=yes] http://cz.archive.ubuntu.com/ubuntu jammy main universe restricted multiverse
 
#Update the system
sudo apt update
sudo apt -y upgrade
    
#Install git
sudo apt -y install git
 
#Install build essential services and cmake
sudo apt -y install build-essential cmake
 
#or to install "cmake" you can use snap
sudo snap cmake --classic
 
#Install Postgres-13
sudo apt install curl ca-certificates gnupg
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
sudo apt update
sudo apt install postgresql-13
#--set the postgres user password
sudo -u postgres psql
\password postgres
 
#Install Postgis-3 (for Postgres-13)
sudo apt install postgis postgresql-13-postgis-3 postgresql-13-postgis-3-scripts
 
#Install JSONC
sudo apt install libjson-c-dev libjson-c-doc libjson-c5
    
#Install GEOS
sudo apt-get install gsl-bin libgsl-dev
sudo apt -y install geos-bin libgeos++-dev libgeos-c1v5 libgeos-dev libgeos-doc libgeos3.10.2
 
#Fix broken
sudo apt --fix-broken install
 
#Install dev files
sudo apt install postgresql-server-dev-13 liblwgeom-dev libproj-dev libjson-c-dev libprotobuf-c-dev 
 
#Modify posgres config file
#--find the path of the config file
sudo -u postgres psql
SHOW config_file;
#--modify it
sudo gedit /etc/postgresql/13/main/postgresql.conf
shared_preload_libraries = 'postgis-3'
max_locks_per_transaction = 128
 
#Download MobilityDB files
git clone https://github.com/MobilityDB/MobilityDB
mkdir MobilityDB/build
cd MobilityDB/build
cmake ..
make
sudo make install