DEV Community

Cover image for Instalación de JFrog Artifactory OSS en Ubuntu 22.04 (Jammy) + PostgreSQL - Guia Completa
Afu Tse (Chainiz)
Afu Tse (Chainiz)

Posted on

Instalación de JFrog Artifactory OSS en Ubuntu 22.04 (Jammy) + PostgreSQL - Guia Completa

Tutorial paso a paso para instalar JFrog Artifactory OSS en Ubuntu 22.04 (Jammy) usando PostgreSQL.

⚠️ Nota: Este setup no está pensado para producción. Cambia contraseñas, restringe accesos y revisa backups/SSL antes de usarlo en entornos reales.


Contenido


Requisitos

  • VM con Ubuntu 22.04 (Jammy)
  • Acceso sudo (superusuario)
  • Conectividad a internet para bajar paquetes
  • Puertos abiertos en firewall (al menos 8082)

Arquitectura

Diagram


0. Preparación de Ubuntu 22.04 (Jammy)

Confirmar que estás en Jammy:

lsb_release -a
Enter fullscreen mode Exit fullscreen mode

lsb_release

o

cat /etc/os-release
Enter fullscreen mode Exit fullscreen mode

os-release

Actualizar librerías:

sudo apt update && sudo apt -y upgrade
Enter fullscreen mode Exit fullscreen mode

1. Base de datos PostgreSQL

1.1 Instalar PostgreSQL

sudo apt install -y postgresql postgresql-contrib
sudo systemctl enable --now postgresql
sudo systemctl status postgresql --no-pager
Enter fullscreen mode Exit fullscreen mode

1.2 Crear la base de datos y usuario para Artifactory

sudo -u postgres psql <<'SQL'
CREATE USER artifactory WITH PASSWORD 'ArtifactoryDemo123!';
CREATE DATABASE artifactory OWNER artifactory ENCODING 'UTF8';
GRANT ALL PRIVILEGES ON DATABASE artifactory TO artifactory;
SQL
Enter fullscreen mode Exit fullscreen mode

⚠️ Recomendación: cambia esta contraseña si la VM no es 100% privada.


2. Instalar Artifactory OSS

2.1 Agregar repositorio + key

Agregar el repo OSS (para Jammy):

echo "deb https://releases.jfrog.io/artifactory/artifactory-debs jammy main" | sudo tee -a /etc/apt/sources.list
Enter fullscreen mode Exit fullscreen mode

Agregar la key GPG:

wget -qO - https://releases.jfrog.io/artifactory/api/gpg/key/public | sudo apt-key add -
Enter fullscreen mode Exit fullscreen mode

2.2 Instalar Artifactory OSS (Open Source)

JFrog recomienda tener net-tools como prerequisito:

sudo apt-get update
sudo apt-get install -y net-tools
sudo apt-get install -y jfrog-artifactory-oss
Enter fullscreen mode Exit fullscreen mode

3. Configurar Artifactory OSS para usar PostgreSQL

La configuración principal está en:

  • JFROG_HOME por defecto: /opt/jfrog
  • Archivo: /opt/jfrog/artifactory/var/etc/system.yaml

3.1 Detener Artifactory

sudo systemctl stop artifactory
Enter fullscreen mode Exit fullscreen mode

3.2 Editar system.yaml

Abrir el archivo system.yaml con editor VIM:

sudo vim /opt/jfrog/artifactory/var/etc/system.yaml
Enter fullscreen mode Exit fullscreen mode

Agregar/ajustar esta sección shared:

shared:
  database:
    type: postgresql
    driver: org.postgresql.Driver
    url: jdbc:postgresql://127.0.0.1:5432/artifactory
    username: artifactory
    password: ArtifactoryDemo123!
Enter fullscreen mode Exit fullscreen mode

4. Iniciar Artifactory

sudo systemctl start artifactory.service
sudo systemctl status artifactory.service --no-pager
Enter fullscreen mode Exit fullscreen mode

Ver logs si hace falta:

sudo journalctl -u artifactory -n 200 --no-pager
Enter fullscreen mode Exit fullscreen mode

5. Abrir puertos (firewall)

Para la UI normalmente se usa 8082 (y a veces 8081 según el setup). Para este caso, abre al menos 8082.

sudo ufw allow 8082/tcp
sudo ufw status
Enter fullscreen mode Exit fullscreen mode

6. Entrar a la UI y credenciales por defecto

Abrir:

  • http://<TU_IP>:8082/
  • http://<TU_IP>:8082/ui/
  • Login directo: http://<TU_IP>:8082/ui/login

Credenciales por defecto:

  • admin / password

⚠️ Cambia la contraseña apenas puedas.

Fix rápido (OSS): deshabilitar jfconnect (workaround login “stuck”)

Si al iniciar sesión el botón queda inactivo o se “queda pegado” el login (reportado en OSS 7.125.x), aplica este workaround:

  • Edita:
sudo vim /opt/jfrog/artifactory/var/etc/system.yaml
Enter fullscreen mode Exit fullscreen mode
  • Agrega esto a nivel raíz (top-level), NO dentro de shared:
jfconnect:
  enabled: false
Enter fullscreen mode Exit fullscreen mode
  • Reinicia:
sudo systemctl restart artifactory
Enter fullscreen mode Exit fullscreen mode
  • Prueba de nuevo: http://:8082/ui/ o http://:8082/ui/login

Comandos útiles

Estado del servicio:

sudo systemctl status artifactory --no-pager
Enter fullscreen mode Exit fullscreen mode

Logs recientes:

sudo journalctl -u artifactory -n 200 --no-pager
Enter fullscreen mode Exit fullscreen mode

Reiniciar:

sudo systemctl restart artifactory
Enter fullscreen mode Exit fullscreen mode

Verifica que el puertos está escuchando y en qué interfaz:

sudo ss -lntp | egrep ':8081|:8082'
curl -I http://127.0.0.1:8082/ | head
curl -I http://127.0.0.1:8081/ | head
Enter fullscreen mode Exit fullscreen mode

Referencias

Top comments (0)