0% found this document useful (0 votes)
34 views

OPENMAINT Coding

jgj
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

OPENMAINT Coding

jgj
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

[Step 0] - Persiapan

$ sudo apt-get update -y


$ sudo apt-get upgrade
$ sudo apt install unzip

[Step 1] - Instalasi Java


$ sudo apt-get install openjdk-17-jdk
$ java -version
openjdk version "17.0.7" 2023-04-18
OpenJDK Runtime Environment (build 17.0.7+7-Ubuntu-0ubuntu122.04.2)
OpenJDK 64-Bit Server VM (build 17.0.7+7-Ubuntu-0ubuntu122.04.2, mixed mode,
sharing)

[Step 2] - Instalasi PostgreSQL 12


$ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-
key add -
$ echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main"
| sudo tee /etc/apt/sources.list.d/postgresql-pgdg.list > /dev/null
$ sudo apt-get update
$ sudo apt-get install postgresql-12
$ sudo apt install postgresql-12-postgis-3 libpostgis-java

[Step 3] - KOnfigurasi PostgreSQL


$ sudo passwd postgres
$ sudo usermod -aG sudo postgres
$ sudo -u postgres psql template1
# Change the 'postgres' user password (superuser password)
ALTER USER postgres WITH PASSWORD 'PSSWD'; --->PSSWD ganti passwordnya dan
harus diingat

# Quit the SQL console


\q

[Step 4] - Instalasi Alfresco Community Management


$ wget http://dl.alfresco.com/release/community/build-3370/alfresco-community-
3.4.d-installer-linux-x64.bin
$ chmod a+x alfresco-community-3.4.d-installer-linux-x64.bin
$ sudo ./alfresco-community-3.4.d-installer-linux-x64.bin --mode text

• Choose 'English' (Type in 1)


• Accept SharePoint, Records Management, Web Quick Start and Web Project Manager
• Select an Installation Type 1
• Leave the installation folder as default
• Select the bundled MySQL database (Type in 1)
• Create the database password (Just type them in)
• Create Alfresco's password (Just type them in)
• Decline the installation as a service (It breaks anyways, so we're handling it
ourselves.)

$ cd /opt/alfresco-3.4.d
$ sudo ./alfresco.sh status

# Jika status RUNNING


$ sudo ./alfresco.sh stop

Buka file Tomcar server.xml


$ sudo nano tomcat/conf/server.xml
// Line 22
<Server port="8006" shutdown="SHUTDOWN">
// Line 69 (lol)
<Connector port="8081" URIEncoding="UTF-8" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />

$ sudo ./alfresco.sh start

[Step 5] - Instalasi GeoServer


$ sudo adduser geoserver ; sudo usermod -aG sudo geoserver ; sudo su - geoserver
$ wget https://sourceforge.net/projects/geoserver/files/GeoServer/2.21.0/geoserver-
2.21.0-bin.zip
$ unzip -d /home/geoserver/server geoserver-2.21.0-bin.zip
$ nano /home/geoserver/server/start.ini
Ubah port jetty.http.port menjadi jetty.http.port=8082

Buat file service geoserver agar bisa berjalan otomatis


$ sudo nano /usr/lib/systemd/system/geoserver.service

[Unit]
Description=GeoServer Service
After=network.target

[Service]
Type=simple

User=root

Environment="GEOSERVER_HOME=/home/geoserver/server"

ExecStart=/home/geoserver/server/bin/startup.sh
ExecStop=/home/geoserver/server/bin/shutdown.sh

[Install]
WantedBy=multi-user.target

Kemudian restart service geoserver


$ sudo systemctl daemon-reload
$ sudo systemctl enable --now geoserver

Test server geoserver


http://YOUR-IP:8082/geoserver
Username:admin Password:geoserver

[Step 6] - Instalasi openMAINT 2.3


$ sudo adduser openmaint ; sudo usermod -aG sudo openmaint ; sudo su - openmaint
$ wget https://downloads.sourceforge.net/project/openmaint/2.3/openmaint-2.3-3.4.1-
d.war
$ java -jar ./openmaint-2.3-3.4.1-d.war install

postrgres admin account: postgres/<PASSWORD-FROM-STEP-3>


cmdbuild posrgres database name: openmaint_db
database dump to load: empty/demo

[Step 7] - KOnfigrasi script openMAINT startup & shutdown


$ su - openmaint

Script Start Openmaint


$ nano startmaint.sh
##!/bin/bash

# Alfresco is kind of weird and can get its catalina.pid stuck after shutting,
# so we have to essentially restart it to get it up and running.
sudo "/opt/alfresco-3.4.d/alfresco.sh" stop
sudo rm -f /opt/alfresco-3.4.d/tomcat/temp/catalina.pid
sudo "/opt/alfresco-3.4.d/alfresco.sh" start

# ... The same is true for openMAINT. This is more of a restart script than a
startup script
# if anything.
sudo -u openmaint "/home/openmaint/cmdbuild_30/bin/shutdown.sh"
sudo rm -f /home/openmaint/cmdbuild_30/bin/catalina.pid
sudo -u openmaint "/home/openmaint/cmdbuild_30/bin/startup.sh"

echo "------------------> openMAINT Started! <------------------"

$ chmod a+x startmaint.sh

Script shutdown Openmaint


$ nano stopmaint.sh
#!/bin/bash

# The shutdown is incredibly more simple...


sudo "/opt/alfresco-3.4.d/alfresco.sh" stop
sudo -u openmaint "/home/openmaint/cmdbuild_30/bin/shutdown.sh"

$ chmod a+x stopmaint.sh

Menjalankan script
sudo /home/openmaint/startmaint.sh --> Menjalankan
sudo /home/openmaint/stopmaint.sh --> Mematikan

Mengakses Openmaint
http://SERVER-IP:8080/cmdbuild
http://localhost:8080/cmdbuild
Username:admin Password:admin

[Step 8] - Koneksi Alfresco - openMAINT


Dijendela Administrative
Pilih Menu DMS - Settings
Kemudian Edit
Ganti alamat host dikolom CMIS menjadi http://YOUR-IP:8081/alfresco/s/cmis, dan
password

[Step 9] - Koneksi GIS - openMAINT


Dijendela Administrative
Pilih Menu GIS - External services
Kemudian Edit
Ganti alamat URL menjadi http://SERVER-IP:8082/geoserver

SEKIAN VIDEO DARI SAYA, SELAMAT MENCOBA....

You might also like