Requirement

  • Java 8
  • MariaDB 10.3.x

Preparing MariaDB

  1. Create the database called artdb using the following command:
    CREATE DATABASE artdb CHARACTER SET utf8 COLLATE utf8_bin;
  2. Add artifactory as the user to the newly created database using the following command:
    GRANT ALL on artdb.* TO 'artifactory'@'<HOST>' IDENTIFIED BY '<PASSWORD>';
    FLUSH PRIVILEGES;
    Token Description
    HOST The address of machine housing MariaDB
    PASSWORD The password for the artifactory user.

Installing Artifactory

  1. Add the artifactory repository to your source list.
    echo "deb https://jfrog.bintray.com/artifactory-debs <DISTRIBUTION> main" | sudo tee -a /etc/apt/sources.list
    Token Description
    DISTRIBUTION Use the following command to identify the destribution:

    lsb_release -c

    The sample output for ubuntu bionic distribution:

    Codename:       bionic
  2. Download jfrog public key using the following command:
    curl https://bintray.com/user/downloadSubjectPublicKey?username=jfrog | sudo apt-key add -
  3. Update your package list using the following command:
    sudo apt-get update
  4. Install the oss artifactory using the following command:
    sudo apt-get install jfrog-artifactory-oss

Artifactory Service Commands

Objective Command
Checking service status sudo service artifactory status
Starting the service sudo service artifactory start
Stopping the service sudo service artifactory stop
Restarting the service sudo service artifactory restart

Accessing The Artifactory from the Browser

  1. Use the following address to access the artifactory application:
    http://localhost:8180/artifactory
  2. Use the following default credentails:
    Field Value
    Username admin
    Password password

    It is recommended to change the admin password after installation but you can do it after hooking it to MariaDB.

Using the MariaDB Prepared Earliear

Variable Value
$ARTIFACTORY_HOME /var/opt/jfrog/artifactory
  1. Using the terminal, change the directory to $ARTIFACTORY_HOME/tomcat/lib and execute the following:
    sudo wget https://downloads.mariadb.com/Connectors/java/connector-java-2.4.4/mariadb-java-client-2.4.4.jar

    You can visit https://mariadb.com/downloads/#connectors for a different version of java client.

  2. Copy $ARTIFACTORY_HOME/misc/db/mariadb.properties to $ARTIFACTORY_HOME/etc/db.properties.

    This will replace the default db.properties that is using derby as the database.

  3. Update the following fields in the db.properties:
    Field Value
    url jdbc:mariadb://<HOST>:<PORT>/artdb?characterEncoding=UTF-8&elideSetAutoCommits=true&useSSL=false&useMysqlMetadata=true
    password The password you've used on Preparing MariaDB section.
    Token Value
    HOST The host you've indentified on Preparing MariaDB section.
    PORT This is the port where MariaDB is listening (i.e. 3306 or 3307).
  4. Restart the artifactory service using the following command:
    sudo service artifactory restart