JFrog Installation on Ubuntu
To run Jfrog, we need to have Java installed on the node
- Let's install OpenJDK 17, Login to the node with the root access (this depends on which user you would like to install Java on. If you have multiple users and have multiple Java versions that need to be run then installing it on the non-root user makes sense!!). However, I don't need multiple Java versions on my node. So, I am going ahead with the root user
The Java-based products (Artifactory, Distribution, Insight, Mission Control) must run with JDK 17+
Always check the requirements before installation, the requirements are provided at
https://jfrog.com/help/r/jfrog-installation-setup-documentation/java-requirements-for-jfrog-products
How to Create a User and Group in Ubuntu
To create a new user, use the
useradd
command followed by the desired username. For example, to create a user named "artifactory," use the following command:sudo useradd artifactory
The
sudo
command is used to run theuseradd
command with superuser privileges.Set a password for the new user with the
passwd
command:sudo passwd artifactory
Add Artifactory Group and the user that was used in the entire process till now and the group for Artifactory. So, let's Create an artifactory group.
sudo groupadd artifactory
Create an artifactory user and set /opt/artifactory as the home directory.
sudo mkdir /opt/artifactory sudo useradd -d /opt/artifactory -g artifactory artifactory
if the user is already added then move to the next step, Grant the <username> user access to the /opt/artifactory directory.
sudo chown artifactory:artifactory /opt/artifactory -R
You'll be prompted to enter and confirm the new user's password.
If you are creating a user on the cloud VMs, there may be a chance that it won't let you switch to that user by throwing the error message "This account is currently not available".
The error message "This account is currently not available" typically indicates that the user account you're trying to switch to does not have a valid login shell or that the shell is set to
/usr/sbin/nologin
, which is a security measure to prevent users from logging in interactively.To resolve this issue, you can change the user's login shell to a valid shell that allows interactive login, such as
/bin/bash
. Here's how you can change the shell for the "<username>" user:Manually create the /home/<user folder>
sudo mkdir /home/artifactory sudo chown artifactory:artifactory /home/artifactory
Change the login shell for the "artifactory" user using the
chsh
command. For example, to change the shell to/bin/bash
, you can run:sudo chsh -s /bin/bash artifactory
Replace
/bin/bash
with the path to a valid shell on your system if needed.Now, try to switch to the "artifactory" user again using the
su
command:su - artifactory
This should allow you to switch to the "artifactory" user with an interactive shell. If you encounter any issues, make sure that the specified shell exists on your system and is correctly configured in the
/etc/passwd
file for the "artifactory" user.
OpenJDK Installation
sudo apt-get install openjdk-17-jdk -y
Jfrog Artifactory Installation (it's a community edition process)
First, Open the following ports at the NSG level for 8081, 8082
Download the installer
wget -qO - https://releases.jfrog.io/artifactory/api/gpg/key/public | sudo apt-key add -;
Install the Artifactory command below, please make sure to update the Linux distribution name in place of {distribution}. if you are using the Ubuntu 20.04 version then it should be focal distribution the example for the below command is
echo "deb releases.jfrog.io/artifactory/artifactory-d.. focal main" | sudo tee -a /etc/apt/sources.list;
echo "deb https://releases.jfrog.io/artifactory/artifactory-debs $(lsb_release -cs) main" | sudo tee -a /etc/apt/sources.list
Install the artificatory
sudo apt-get update && sudo apt-get install jfrog-artifactory-oss
Start the service
sudo systemctl start artifactory.service
Enable the service, so that it will restart automatically on reboot
sudo systemctl enable artifactory.service
check the status of the service
sudo systemctl status artifactory.service
Now, open the browser and navigate to serverip:8082
You are ready to JFrog now !!
Your default username is admin and your password is password
it will prompt you to change the password after changing the password, it will ask you for the base URL, just provide the same as before (serverip:8082)
click Next(Select, Maven, Gradle, generic or HuggingFaceML, Ivy, SBT)(If Anything is not showing up currently in those names that is ok as well), Next and Finish