Installation, Configuration and Operation on Linux

Installation

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

							
cd /opt
sudo wget http://odilon.io/resources/odilon-server-1.12.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-1.12.tar.gz
sudo tar xvf /opt/odilon-server-1.12.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 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 url and credentials (url, port, accessKey, SecretKey), and data storage (RAID level, data storage directories), and other parameters

Sample properties file:
odilon.properties

A bare minimum odilon.properties file could look something like this:

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

The file ./bin/config.sh contains parameters required by the Java JVM.
Normally you dont need to edit anything on that file, but you may need to edit the JAVA_HOME parameter and point it to the Java 17+ home directory on your server, or other JVM parameters.

Linux service

The final step is to set up the Linux service to start up and shutdown Odilon. Create en edit a new odilon.service file.

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


							
							

Copy & paste this content into odilon.service and save

							
[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 /opt/odilon/logs)

Startup and Shutdown

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
							
							

Example systemctl status odilon

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

							
# the following command should display the info page in the console
# odilon default server (localhost) port (9234) and credentials (accessKey: odilon, secretKey:odilon)
# these parameters can be edited in /config/odilon.properties

sudo curl -u odilon:odilon localhost:9234/info
							
							

Example curl -u odilon:odilon localhost:9234/info

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