...
FenixEdu applications run on any of the major operating systems (Linux, Mac OS and Windows) without any issue. Some platforms however may be harder to However, the setup process on *nix machines tends to be much easier.
You must ensure that your OS is 64-bit, or else some weird behavior might happen.
Java
Most FenixEdu applications run on top of the Java platform. As such, to develop and run any application, you must have JDK 8 installed on your machine. You may choose between Oracle's JDK and OpenJDK, as long as they are on the latest version. Refer to your OS/distribution's documentation for the installation procedure.
The JDK's default heap size may be too low for development purposes. As such, you should set the JAVA_OPTS
environment variable and define proper values. The recommended value is:
Code Block | ||||
---|---|---|---|---|
| ||||
-Xms1g -Xmx4g -Djava.awt.headless=true -XX:+UseG1GC -XX:+UseStringDeduplication |
This will set the initial heap size to 1GB, maximum heap size to 4G, ensure the application runs in headless mode, and enable the G1 Garbage Collector.
Maven
Maven is one of the build systems used to build FenixEdu applications. You need need to install Maven, usually the latest version will do. Currently, the latest version, 3.3.9, works fine.
You may install it using your OS's package manager, or downloading it from Maven's website.
Just like Java, the default Maven configuration may not be suitable for development. As such, you should set the MAVEN_OPTS
environment variable, with the same value as JAVA_OPTS
.
If you're running embedded Tomcat with Maven, you need to set the MAVEN_OPTS
variable as such:
Code Block | ||||
---|---|---|---|---|
| ||||
-Xms4g -Xmx8g -XX:MetaspaceSize=256m -verbose:gc -Djava.awt.headless=true -XX:+UseG1GC -XX:+UseStringDeduplication -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false |
This will set the initial heap size to 4GB, maximum heap size to 8GB, initial metaspace size to 256MB (to prevent full GC collections on startup), ensure the application runs in headless mode, enable the G1 Garbage Collector. The last flag is required for some legacy applications, see
Jira | ||||||||
---|---|---|---|---|---|---|---|---|
|
MySQL/MariaDB
FenixEdu applications run on top of a MySQL or MariaDB database, using the InnoDB engine. As such, if you want to run a local database, you will have to install it on your machine.
If you want to run a "large" database (typically with multiple Gigabytes), you may need to tweak some configurations in your my.cnf
file. The most important settings to tweak are the following:
Code Block | ||||
---|---|---|---|---|
| ||||
open_files_limit = 500000
max_connections = 1000
max_allowed_packet = 1G
thread_cache_size = 128
default_storage_engine = InnoDB
innodb_buffer_pool_size = 20G
# Match this to the size in gigabytes of buffer_pool_size
innodb_buffer_pool_instances = 20
innodb_log_buffer_size = 128M
innodb_log_file_size = 1G
innodb_file_per_table = 1
innodb_open_files = 200000
innodb_io_capacity = 400
innodb_flush_method = O_DIRECT
innodb_autoinc_lock_mode = 2
innodb_flush_log_at_trx_commit = 0
innodb_read_io_threads = 32
innodb_write_io_threads = 32
innodb_io_capacity = 10000
innodb_fast_shutdown = 0 |
You will need to adjust the exact values according to your machine's hardware configuration. These values are for a dedicated machine with 8 cores and 32GB or RAM.
Git
All FenixEdu projects are hosted in Git repositories. As such, the following contains a series of useful git aliases and configuration options you may want to use (try them yourself!):
Code Block | ||||
---|---|---|---|---|
| ||||
[core]
editor = emacs -nw
[alias]
st = status
# Show a colorful commit tree
lsd = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
lg = log --color=always -p
dff = diff --color=auto
dfc = diff --color=auto --cached
fa = fetch --all -p
[help]
autocorrect = 1
[grep]
extendRegexp = true
lineNumber = true
[color]
ui = true |
If you want a nice Git prompt, you can find an example of a good one here.
Hardware
This section contains some guidelines regarding the best hardware choices for developing FenixEdu applications.
...