{"id":922,"date":"2019-11-13T19:27:37","date_gmt":"2019-11-13T06:27:37","guid":{"rendered":"https:\/\/www.ronella.xyz\/?p=922"},"modified":"2019-11-13T19:46:16","modified_gmt":"2019-11-13T06:46:16","slug":"artifactory-on-ubuntu-with-mariadb","status":"publish","type":"post","link":"https:\/\/www.ronella.xyz\/?p=922","title":{"rendered":"Artifactory on Ubuntu with MariaDB"},"content":{"rendered":"<h3><strong>Requirement<\/strong><\/h3>\n<ul>\n<li>Java 8<\/li>\n<li>MariaDB 10.3.x<\/li>\n<\/ul>\n<h3><strong>Preparing MariaDB<\/strong><\/h3>\n<ol>\n<li>Create the <strong>database<\/strong> called <strong>artdb<\/strong> using the following command:\n<pre style=\"white-space: pre;\">CREATE DATABASE artdb CHARACTER SET utf8 COLLATE utf8_bin;<\/pre>\n<\/li>\n<li>Add <strong>artifactory<\/strong> as the <strong>user<\/strong> to the newly created database using the following command:\n<pre style=\"white-space: pre;\">GRANT ALL on artdb.* TO 'artifactory'@'&lt;HOST&gt;' IDENTIFIED BY '&lt;PASSWORD&gt;';\r\nFLUSH PRIVILEGES;<\/pre>\n<table>\n<tbody>\n<tr>\n<td><strong>Token<\/strong><\/td>\n<td><strong>Description<\/strong><\/td>\n<\/tr>\n<tr>\n<td>HOST<\/td>\n<td>The address of machine housing MariaDB<\/td>\n<\/tr>\n<tr>\n<td>PASSWORD<\/td>\n<td>The password for the <strong>artifactory<\/strong> user.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<\/ol>\n<h3><strong>Installing Artifactory<\/strong><\/h3>\n<ol>\n<li>Add the <strong>artifactory repository<\/strong> to your source list.\n<pre style=\"white-space: pre;\">echo \"deb https:\/\/jfrog.bintray.com\/artifactory-debs &lt;DISTRIBUTION&gt; main\" | sudo tee -a \/etc\/apt\/sources.list<\/pre>\n<table>\n<tbody>\n<tr>\n<td><strong>Token<\/strong><\/td>\n<td><strong>Description<\/strong><\/td>\n<\/tr>\n<tr>\n<td>DISTRIBUTION<\/td>\n<td>Use the following command to identify the destribution:<\/p>\n<pre style=\"white-space: pre;\">lsb_release -c<\/pre>\n<p>The sample output for ubuntu <strong>bionic<\/strong> distribution:<\/p>\n<pre style=\"white-space: pre;\">Codename:       bionic<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li>Download <strong>jfrog public key<\/strong> using the following command:\n<pre style=\"white-space: pre;\">curl https:\/\/bintray.com\/user\/downloadSubjectPublicKey?username=jfrog | sudo apt-key add -<\/pre>\n<\/li>\n<li>Update your <strong>package list<\/strong> using the following command:\n<pre style=\"white-space: pre;\">sudo apt-get update<\/pre>\n<\/li>\n<li>Install the <strong>oss artifactory<\/strong> using the following command:\n<pre style=\"white-space: pre;\">sudo apt-get install jfrog-artifactory-oss<\/pre>\n<\/li>\n<\/ol>\n<h3><strong>Artifactory Service Commands<\/strong><\/h3>\n<table>\n<tbody>\n<tr>\n<td><strong>Objective<\/strong><\/td>\n<td><strong>Command<\/strong><\/td>\n<\/tr>\n<tr>\n<td>Checking service status<\/td>\n<td>sudo service artifactory status<\/td>\n<\/tr>\n<tr>\n<td>Starting the service<\/td>\n<td>sudo service artifactory start<\/td>\n<\/tr>\n<tr>\n<td>Stopping the service<\/td>\n<td>sudo service artifactory stop<\/td>\n<\/tr>\n<tr>\n<td>Restarting the service<\/td>\n<td>sudo service artifactory restart<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Accessing The Artifactory from the Browser<\/h3>\n<ol>\n<li>Use the following address to access the artifactory application:\n<pre style=\"white-space: pre;\"><a href=\"http:\/\/localhost:8180\/artifactory\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/localhost:8180\/artifactory<\/a><\/pre>\n<\/li>\n<li>Use the following default credentails:<br \/>\n<table>\n<tbody>\n<tr>\n<td><strong>Field<\/strong><\/td>\n<td><strong>Value<\/strong><\/td>\n<\/tr>\n<tr>\n<td>Username<\/td>\n<td>admin<\/td>\n<\/tr>\n<tr>\n<td>Password<\/td>\n<td>password<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<blockquote><p>It is recommended to change the admin password after installation but you can do it after hooking it to MariaDB.<\/p><\/blockquote>\n<\/li>\n<\/ol>\n<h3>Using the MariaDB Prepared Earliear<\/h3>\n<table>\n<tbody>\n<tr>\n<td><strong>Variable<\/strong><\/td>\n<td><strong>Value<\/strong><\/td>\n<\/tr>\n<tr>\n<td>$ARTIFACTORY_HOME<\/td>\n<td>\/var\/opt\/jfrog\/artifactory<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ol>\n<li>Using the terminal, change the directory to <strong>$ARTIFACTORY_HOME\/tomcat\/lib<\/strong> and execute the following:\n<pre style=\"white-space: pre;\">sudo wget https:\/\/downloads.mariadb.com\/Connectors\/java\/connector-java-2.4.4\/mariadb-java-client-2.4.4.jar<\/pre>\n<blockquote><p>You can visit <a href=\"https:\/\/mariadb.com\/downloads\/#connectors\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/mariadb.com\/downloads\/#connectors<\/a> for a different version of java client.<\/p><\/blockquote>\n<\/li>\n<li>Copy <strong>$ARTIFACTORY_HOME\/misc\/db\/mariadb.properties<\/strong>\u00a0to <strong>$ARTIFACTORY_HOME\/etc\/db.properties<\/strong>.<br \/>\n<blockquote><p>This will replace the default db.properties that is using derby as the database.<\/p><\/blockquote>\n<\/li>\n<li>Update the following fields in the <strong>db.properties<\/strong>:<br \/>\n<table>\n<tbody>\n<tr>\n<td><strong>Field<\/strong><\/td>\n<td><strong>Value<\/strong><\/td>\n<\/tr>\n<tr>\n<td>url<\/td>\n<td><span style=\"white-space: pre;\">jdbc:mariadb:\/\/&lt;HOST&gt;:&lt;PORT&gt;\/artdb?characterEncoding=UTF-8&amp;elideSetAutoCommits=true&amp;useSSL=false&amp;useMysqlMetadata=true<\/span><\/td>\n<\/tr>\n<tr>\n<td>password<\/td>\n<td>The password you've used on <strong>Preparing MariaDB<\/strong> section.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table>\n<tbody>\n<tr>\n<td><strong>Token<\/strong><\/td>\n<td><strong>Value<\/strong><\/td>\n<\/tr>\n<tr>\n<td>HOST<\/td>\n<td>The host you've indentified on <strong>Preparing MariaDB<\/strong> section.<\/td>\n<\/tr>\n<tr>\n<td>PORT<\/td>\n<td>This is the port where MariaDB is listening <em>(i.e. 3306 or 3307).<\/em><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li>Restart the artifactory service using the following command:\n<pre style=\"white-space: pre;\">sudo service artifactory restart<\/pre>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Requirement Java 8 MariaDB 10.3.x Preparing MariaDB Create the database called artdb using the following command: CREATE DATABASE artdb CHARACTER SET utf8 COLLATE utf8_bin; Add artifactory as the user to the newly created database using the following command: GRANT ALL on artdb.* TO &#8216;artifactory&#8217;@'&lt;HOST&gt;&#8217; IDENTIFIED BY &#8216;&lt;PASSWORD&gt;&#8217;; FLUSH PRIVILEGES; Token Description HOST The address of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[33,28,12],"tags":[],"_links":{"self":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts\/922"}],"collection":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=922"}],"version-history":[{"count":22,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts\/922\/revisions"}],"predecessor-version":[{"id":944,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts\/922\/revisions\/944"}],"wp:attachment":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=922"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=922"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=922"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}