Skip to main content

Installation

We will go through all steps that needs to be done to start the RoStore Server.

The minimal requirement for a good virtual server would be at least 2GB and 2 full cores PC.

Java Installation​

The RoStore Server needs of cause Java.

First check if you have one already on the machine:

$ java -version

The response should look something like this:

openjdk version "22.0.2" 2024-07-16
OpenJDK Runtime Environment (build 22.0.2+9-70)
OpenJDK 64-Bit Server VM (build 22.0.2+9-70, mixed mode, sharing)

If the response looks like this, you're fine can jump over the RoStore Installation.

If it responds with Command java not found, you don't have the java installed, and if the version is not the latest (check it here) you have Java, but it needs to be updated to the latest version.

Do the following:

  • Open the Open JDK Download Website.

  • Download the tar.gz mentioned on the page, e.g.

    $ curl https://download.java.net/java/GA/jdk22.0.2/c9ecb94cd31b495da20a27d4581645e8/9/GPL/openjdk-22.0.2_linux-x64_bin.tar.gz --output openjdk-latest.tar.gz
  • Install downloaded bundle:

    $ sudo mkdir -p /usr/java/openjdk
    $ sudo cp openjdk-latest.tar.gz /usr/java/openjdk/openjdk-latest.tar.gz
    $ cd /usr/java/openjdk
    $ sudo tar -xzvf openjdk-latest.tar.gz
  • Extend profile with Java

    sudo vi /etc/profile

    add following lines to the end of the file

    # OpenJDK 22
    JAVA_HOME=/usr/java/openjdk/jdk-22.0.2
    PATH=$PATH:$JAVA_HOME/bin
    export JAVA_HOME
    export PATH
  • Relink java

sudo rm /usr/bin/java
sudo ln -s /usr/java/openjdk/jdk-22.0.2/bin/java /usr/bin/java

Now the java should be installed.

RoStore Installation​

The next point is to install the RoSore Server itself.

First you need to download the latest version of the server software.

$ curl https://repo1.maven.org/maven2/net/ro-store/rostore-service/2.0.1/rostore-service-2.0.1.zip --output rostore-service-2.0.1.zip

Unzip the content of the zip (the server software contains root directory rostore)

$ unzip ./rostore-service-2.0.1.zip
$ cd ./rostore

Open the rostore.properties and replace at least ROSTORE_ROOT_API_KEY and ROSTORE_PUBLIC_API_KEY with a specific uuid. You can use any common uuid generation tool. You can let ROSTORE_PUBLIC_API_KEY empty if you don't want public access to the rostore.

$ vi ./rostore.properties

You can use linux command uuidgen to generate the key in an easy way.

ROSTORE_ROOT_API_KEY=4e030824-08bf-4a0a-b6cb-bafa19406349

ROSTORE_PUBLIC_API_KEY=2fbce488-b62d-41e1-9eb7-edb01e58e2b0

To start the rostore execute the following command:

./rostore start

After it all done the rostore swagger ui can be opened in the following location: http://localhost:8080/swagger-ui.

Please, note that this connection is not secured by ssl and all information is transferred unencrypted through your network. To secure this connection you need to put the store under the apache server or configure it to use the ssl connection (see the respective lines in the rostore.properties).

Check the status:

./rostore status

Note that the server is not initialized yet, continue on the next page