sudo apt-get update
sudo apt-get install openjdk-8-jdk
sudo apt-get install openjdk-8-jre
java -version
sudo apt install postgresql postgresql-contrib
sudo su - postgres
sudo psql -U postgres
sudo apt install postgis
if psql fails (asking for password),
make sure listen_addresses = '*' in postgresql.conf
then try:
sudo su - postgres
psql
cd /usr/share
sudo mkdir geoserver
cd geoserver
sudo wget https://sourceforge.net/projects/geoserver/files/GeoServer/2.21.0/geoserver-2.21.0-bin.zip
sudo unzip geoserver-2.21.0-bin.zip
echo "export GEOSERVER_HOME=/usr/share/geoserver" >> ~/.profile
. ~/.profile
sudo chown -R dkz /usr/share/geoserver/
cd bin
sh startup.sh
==> PORT IS BUSY (openACS)
/usr/share/geoserver/start.inijetty.http.port=8090You are running GeoServer as a foreground process, so when you log out it is terminated. A quick and dirty way to avoid this is to use nohup (no hang up) like this:nohup sh startup.sh &
But you really need to run GeoServer as a service so that it is always running. So, rather than the platform independent binary (designed for testing) you want to follow the Web archive instructions and add it to your tomcat service.
/etc/default/geoserverUSER=dkz
GEOSERVER_DATA_DIR=/usr/share/geoserver/data_dir
GEOSERVER_HOME=/usr/share/geoserver
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
JAVA_OPTS="-Xms128m -Xmx512m"
TOOK AWHILE TO START - be patient.
BE SURE TO OPEN PORT
curl -u admin:geoserver -XGET http://lekkyweb.com:8090/geoserver/rest/fonts.json
→ https://blog.adoptopenjdk.net/2021/01/prerequisites-for-font-support-in-adoptopenjdk/
→ https://eng.m.fontke.com/font/10351322/
→ zoomadmin : install fonts-thai-tlwg
sudo apt-get install -y fonts-thai-tlwg
curl -u admin:geoserver -XGET http://lekkyweb.com:8090/geoserver/rest/fonts.xml
sudo service geoserver restart
Keywords: geo-server