Installation, Configuration and Operation on Linux

Installation

The following example will install
the server in /opt/odilon
and data directories in /opt/odilon-data

							
cd /opt
sudo wget http://odilon.io/resources/odilon-server-2.0.tar.gz
							
							

Create Linux user odilon and extract the server

							
sudo useradd -s /sbin/nologin -d /opt/odilon odilon
sudo chown -R odilon:odilon /opt/odilon-server-2.0.tar.gz
sudo tar xvf /opt/odilon-server-2.0.tar.gz
sudo chown -R odilon:odilon /opt/odilon
							
							

Create data directory

							
sudo mkdir -p /opt/odilon-data
sudo chown -R odilon:odilon /opt/odilon-data
sudo chmod u+rwx /opt/odilon-data
sudo chmod og-rwx /opt/odilon-data
							
							

Directories

app/
A self-contained Odilon server.

bin/
Scripts to startup, manage and interact with Odilon instances.

config/
odilon.properties is Odilon's main configuration file, Other config files (like log4j2.xml for error logging)

examples/
Sample Java classes to create buckets, upload and download files, list objects, and others.

logs/
logs directories

Configuration

Odilon.properties

Odilon configuration is defined in file ./config/odilon.properties
This is where you can set up server port and credentials ( port, accessKey, SecretKey), and data storage (RAID level, data storage directories), and other parameters

accessKey and secretKey are the server user-password, required to interact via the Java SDK or REST API,

redundancy level must be RAID 0, RAID 1, or RAID 6, and you must configure data storage directories (at least 1 for RAID 0, at least 2 for RAID 1, at least 3 for RAID)

A bare minimum odilon.properties file:

	
server.port=9234
accessKey=odilon
secretKey=odilon
redundancyLevel=RAID 0
dataStorage=/opt/odilon-data/drive0

These settings are sufficient to start the server. In most cases, no additional configuration is required. Encryption and version control are disabled by default.

Sample properties file:
odilon.properties

Detailed instruccions:

Data Replication

Encryption

Version Control

Master-Standby replication

HTTPS

The ./bin/config.sh file contains the Java Virtual Machine (JVM) configuration. In most cases, you do not need to modify it. However, you may need to set the JAVA_HOME variable to the Java 17+ installation directory on your server or adjust other JVM parameters as needed.

Start and stop the server

After editing ./config/odilon.properties to set up the server (minimally port, accessKey, secretKey, redundancyLevel and dataStorage) the server is ready to run.

Go to directory ./bin

	
cd bin

To start the server


./start.sh

To shutdown the server


./shutdown.sh

Linux service

It is recommended to set up a Linux service to start up and shutdown Odilon. To do so, create en edit a new odilon.service file.

							
sudo vi /etc/systemd/system/odilon.service


							
							

Copy & paste this content into odilon.service and save (you may need to edit Environment, WorkingDirectory and ExecStart depending on where the server was installed)

							
[Unit]
Description=Odilon
Documentation=https://odilon.io
Wants=network-online.target
After=network-online.target

[Service]
# Environment must define the variable ODILON_HOME pointing to the installation directory
Environment="ODILON_HOME=/opt/odilon"

# ExecStart must point to startup script 
ExecStart=/opt/odilon/bin/start-service.sh

# WorkingDirectory must point to the installation directory
WorkingDirectory=/opt/odilon

User=odilon
Group=odilon

PermissionsStartOnly=true

# Let systemd restart this service only if it has ended with the clean exit code or signal.
Restart=on-success

StandardOutput=journal
StandardError=inherit

# Specifies the maximum file descriptor number that can be opened by this process
LimitNOFILE=65536

# Disable timeout logic and wait until process is stopped
TimeoutStopSec=0

# SIGTERM signal is used to stop Odilon
KillSignal=SIGTERM
SendSIGKILL=no
SuccessExitStatus=0

[Install]
WantedBy=multi-user.target

							
							

Register the Linux service and start

							
# Enable odilon service
sudo systemctl enable odilon

# reload daemon
sudo systemctl daemon-reload

# Start odilon
sudo systemctl start odilon
							
							

If there are errors you can check startup.log and odilon.log (default dir is ./logs)

Startup and Shutdown Linux service

Once you registered Odilon as a service

systemctl start odilon to startup the server
systemctl stop odilon to shutdown the server
systemctl status odilon check if the server status

You can check the service status using systemctl or curl to print the /info page.

							
# check status of the service
sudo systemctl status odilon
							
							

The console should look like this:

Odilon Server comes with an embedded web server.
Point your web browser to

http://127.0.0.1:9234/info

to ensure your server has started successfully.
or using curl

You can also check the server metrics at any time at /metricsinformal

See sample metrics page


or using curl in Linux

							
# odilon default server (localhost) port (9234) and credentials (accessKey: odilon, secretKey:odilon)

# display the metrics page in the console
sudo curl -u odilon:odilon localhost:9234/metricsinformal