0%

guide to install and configure mago3d on windows 10

Guide

install softwares

DB creation & initial data registration

  1. add variable PGPASSWORD with value postgres to System Path to avoid input password with psql.

  2. start pgAdmin and create database mago3d with following options.

    1
    2
    3
    4
    5
    6
    Name:mago3d, 
    Encoding:UTF-8,
    Template:template0,
    Collation:C,
    Character type:C,
    Connection Limit:-1

    or with sql

    1
    2
    3
    4
    5
    6
    7
    8
    9
    CREATE DATABASE mago3d
    WITH
    OWNER = postgres
    TEMPLATE = template0
    ENCODING = 'UTF8'
    LC_COLLATE = 'C'
    LC_CTYPE = 'C'
    TABLESPACE = pg_default
    CONNECTION LIMIT = -1;

    tips: how to change postgres password?

    1
    2
    3
    psql -h 192.168.1.100 -p 5432 -U postgres -d mydb
    psql> alter user postgres with password 'new password';
    psql> \h \q

  3. create extension for mago3d.

mago3d with postgis extension

  1. load data into mago3d
    edit mago3d-core/src/doc/en/database/dbinit.bat

    1
    2
    :: cd C:\PostgreSQL\9.6\bin\
    cd C:\Program Files\PostgreSQL\10\bin

    and run dbinit.bat from command.

    1
    C:\git\repository\mago3d\mago3d-core\src\doc\en\database> .\dbinit.bat
  2. db symbolic link

Execute Command Line Prompt (cmd.exe) with administrative privileges

1
C:\git\repository\mago3d\mago3d-user\src\main\webapp > mklink /d "C:\git\repository\mago3d\mago3d-user\src\main\webapp\f4d" "C:\f4d"

lombok plugin with eclipse

1
2
wget http://projectlombok.googlecode.com/files/lombok.jar 
java -jar ./lombok.jar

select path to eclipse and click install/update
install lombok plugin for eclipse

check the result:
(1) -javaagent:C:\Users\zunli\eclipse\jee-oxygen\eclipse\lombok.jar in C:\Users\zunli\eclipse\jee-oxygen\eclipse\eclipse.ini
(2) lombok.jar has been copied to eclipse plugins folder C:\Users\zunli\eclipse\jee-oxygen\eclipse\plugins.

restart eclipse and import settings.gradle.

install lombok plugin for IDEA

Install lombok plugin by File->Settings->Plugins->Browse repositories... and search for lombok online and install.

install lombok plugin

enable anonation processing

File->Settings->Compiler->Anonation Processers->Enable Anonation Processing (Check ON)

enable anonation processing

import lombok libraries

File->Project Structure->Libraries->...

import lombok as library

run adminApplication

config

By default, program use postgres as username,and postgres as password for magoed database.

1
2
spring.datasource.username=nvdm6E6o5Fr3x2a877fl/w==
spring.datasource.password=nvdm6E6o5Fr3x2a877fl/w==

run admin

start /mago3D-admin/src/main/java/com/gaia3d/mago3DAdminApplication.java

and access http://localhost:9090/login/login.do
login with admin as username and admin as password.

Reference

History

  • 20180331: created.