How to Install JFrog Artifactory on Ubuntu 18.04 / 16.04

Original Article: How to Install JFrog Artifactory on Ubuntu 18.04 / 16.04

Today we will see how to Install JFrog Artifactory on Ubuntu 18.04/16.04. JFrog Artifactory is the world’s most advanced repository manager designed to integrate with the majority of continuous integration and delivery tools. With JFrog Artifactory, delivering an end to end automated solution with artifacts tracking from development to production becomes a reality.

Artifactory is mostly used by build tools such as Maven, Apache Ant, and Gradle to store respective artifacts in its local repository to be consumption by other applications and tools.

Install JFrog Artifactory on Ubuntu

The easiest way of installing and running Artifactory on Ubuntu 18.04/16,04 is by using Docker. The process is straightforward without dependency/permission hurdles. You just install Docker, download Artifactory image and spin a container.

Step 1: Install Docker Engine

Install Docker. For a quick start, here is the process.

Install packages to allow apt to use a repository over HTTPS:

sudo apt -y install apt-transport-https \
ca-certificates \
curl \
software-properties-common

Add Docker’s official GPG key:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

Add stable repository:

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

Install Docker CE:

sudo apt update && sudo apt -y install docker-ce

If you would like to use Docker as a non-root user, you should now consider adding your user to the “docker” group with something like:

sudo usermod -aG docker $USER

Run the command below to see a version of docker installed.

$ docker version
Client:
 Version:           18.09.5
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        e8ff056
 Built:             Thu Apr 11 04:43:57 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.5
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.8
  Git commit:       e8ff056
  Built:            Thu Apr 11 04:10:53 2019
  OS/Arch:          linux/amd64
  Experimental:     false

Step 2: Download JFrog Artifactory Docker image

There are different editions of JFrog Artifactory available, check the Comparison Matrix. If you’re not sure, install the OSS (Open Source Software) version. For more features, you can consider the Pro.

Pull the latest Docker image of JFrog Artifactory.

docker pull docker.bintray.io/jfrog/artifactory-oss:latest

For CE edition:

docker pull docker.bintray.io/jfrog/artifactory-cpp-ce

Confirm Docker images:

$ docker images
REPOSITORY                                   TAG                 IMAGE ID            CREATED             SIZE
docker.bintray.io/jfrog/artifactory-cpp-ce   latest              24d943a892ac        43 hours ago        582MB
docker.bintray.io/jfrog/artifactory-oss      latest              58d49856785f        43 hours ago        582MB

Step 3: Create Data Directory

Create data directory on host system to ensure data used on container is persistent.

sudo mkdir -p /jfrog/artifactory
sudo chown -R 1030 /jfrog/

Step 4: Start JFrog Artifactory container

To start an Artifactory container, use the command:

$ docker run --name artifactory -d -p 8081:8081 -p 8082:8082\
   -v /jfrog/artifactory:/var/opt/jfrog/artifactory \
   docker.bintray.io/jfrog/artifactory-oss:latest

You can pass Java system properties to the JVM running Artifactory using EXTRA_JAVA_OPTIONS. Check more on Docker setup link. See example below.

$ docker run --name artifactory -d -p 8081:8081 -p 8082:8082\
   -v /jfrog/artifactory:/var/opt/jfrog/artifactory \
   -e EXTRA_JAVA_OPTIONS='-Xms512m -Xmx2g -Xss256k -XX:+UseG1GC' \
   docker.bintray.io/jfrog/artifactory-pro:latest

Step 5: Running JFrog Artifactory container with Systemd

Systemd is the default init system for Ubuntu 18.04/16.04. We can use it to manage JFrog Artifactory container.

Create Artifactory service unit file.

sudo vim /etc/systemd/system/artifactory.service

Add:

[Unit]
Description=Setup Systemd script for Artifactory Container
After=network.target

[Service]
Restart=always
ExecStartPre=-/usr/bin/docker kill artifactory
ExecStartPre=-/usr/bin/docker rm artifactory
ExecStart=/usr/bin/docker run --name artifactory -p 8081:8081 -p 8082:8082 \
  -v /jfrog/artifactory:/var/opt/jfrog/artifactory \
  docker.bintray.io/jfrog/artifactory-oss:latest
ExecStop=-/usr/bin/docker kill artifactory
ExecStop=-/usr/bin/docker rm artifactory

[Install]
WantedBy=multi-user.target

Reload systemd.

sudo systemctl daemon-reload

Then start Artifactory container with systemd.

sudo systemctl start artifactory

Enable it to start at system boot.

sudo systemctl enable artifactory

Status can be checked with:

sudo systemctl status artifactory

Also check service binding with:

$ ss -tunelp | grep 8081
tcp LISTEN 0 128 *:8081 *:* users:(("docker-proxy",pid=2820,fd=4)) ino:117162 sk:b v6only:0 <->

Step 6: Access Artifactory Web Interface

Artifactory can be accessed using the following URL:

http://SERVERIP_OR_DOMAIN:8081

You should be redirecto to the new Artifactory welcome page.

http://SERVERIP_OR_DOMAIN:8082/ui/login/

By default Artifactory username and password are admin / password

Installing VMware Tools in a Linux virtual machine How to install VMware Tools on linux Centos Virtual Machines

Purpose

This article provides steps to install VMware Tools in a Linux guest operating system using Compiler.

Note: For an overview of installing VMware Tools, see Overview of VMware Tools (340).

Resolution

Note: If your Linux distribution is not RPM-based, has a custom kernel, or is unsupported, use the steps below to compile VMware Tools, otherwise, see Installing VMware Tools in a Linux virtual machine using RPM (1018392).

To install VMware Tools in a Linux guest operating system using Compiler:

 

Note: If your Linux distribution is not RPM-based, has a custom kernel, or is unsupported, use the steps below to compile VMware Tools, otherwise, see Installing VMware Tools in a Linux virtual machine using RPM (1018392).

To install VMware Tools in a Linux guest operating system using Compiler:

  1. Ensure that your Linux virtual machine is powered on.
  2. If you are running a GUI interface, open a command shell.
    Note: Log in as a root user, or use the sudo command to complete each of these steps.
  3. Click VM in the virtual machine menu, then click Guest > Install/Upgrade VMware Tools.
  4. Click OK.
    Note: In some cases, verify that the CDROM device is Connected from within the Edit Settings option of the virtual machine.
  5. To create a mount point, run:
    mkdir /mnt/cdrom
  6. To mount the CDROM, run:
    mount /dev/cdrom /mnt/cdrom
  7. To copy the Compiler gzip tar file to a temporary local directory, run:
    cp /mnt/cdrom/VMwareTools-version.tar.gz /tmp/
    Where version is the VMware Tools package version.
  8. To determine the version of VMware tools, run:
    ls /mnt/cdrom
    You see output similar to:
    # VMwareTools-5.0.0-12124.tar.gz
  9. To change to the tmp directory and extract the contents of the tar file into a new directory called vmware-tools-distrib, run:
    cd /tmp
    tar -zxvf VMwareTools-version.tar.gz
  10. To change directory to vmware-tools-distrib and run the vmware-install.pl PERL script to install VMware Tools, run:
    cd vmware-tools-distrib
    ./vmware-install.pl
    Notes:

    • Complete the screen prompts to install the VMware Tools. Options in square brackets are default choices and can be selected by pressing Enter.
    • To compile VMware Tools successfully, you need gcc Compiler and Linux Kernel sources provided by your Linux distribution. Consult your Linux distribution documentation for details on methods to install these packages.
    • It is normal for the console screen to go blank for a short time during the installation when the display size changes.
    • Some warnings or errors are normal, like when a files does not exist.
    • Depending on the Linux distribution, your network service might restart after installation. VMware recommends that you invoke this command from the console and not remotely.
  11. If you are running a GUI interface, restart your X Window session for any mouse or graphics changes to take effect.
  12. To start VMware Tools running in the background during an X Window session, run:
    /usr/bin/vmware-toolbox &
  13. Depending on your environment, you may need to unmount the CD-ROM. To unmount the CD-ROM, run:
    umount /mnt/cdrom
  14. Depending on your environment, you may need to manually end the VMware Tools installation. To end the VMware Tools install, click VM in the virtual machine menu, then click Guest > End VMware Tools Install.
  15. To remove VMware Tools installation packages, run:
    cd
    rm /tmp/VMwareTools-version.tar.gz
    rm -rf /tmp/vmware-tools-distrib

Original Article by VMware KB >Here<

Linux Corner: Yum Errors while downloading installers epel-release Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

What is yum?

YUM stands for Yellowdog Updater, Modified. Like all other program’s in Linux, YUM is also an open source tool.

It was initially used in Duke University, for managing package installation on their Red Hat based system’s. These day’s its been widely used by almost all Red Hat based system’s. In fact its the default program installer and package management tool these days.

If you are interested in visiting the official home page of YUM, then i would recommend, visiting the below link of Duke university.

http://linux.duke.edu/projects/yum/

In particular yum is a software package manager that installs, updates, and removes packages on RPM-based systems. It automatically computes dependencies and figures out what things should occur to install packages. yum makes it easier to maintain groups of machines without having to manually update each one using rpm.

Features include:

  • Support for multiple repositories
  • Simple configuration
  • Dependency calculation
  • Fast operation
  • RPM-consistent behavior
  • Package group support, including multiple-repository groups
  • Simple interface

yum uses an online repository by default, but you can also configure it to use a local repository of packages.

Linux Corner of Today

Trying to update or install packages with YUM, the procedure doesn’t work, with the following error

Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

You have some possibilities to solve the problem:

  1. Update ca-certificates package. Before that, just disable all repos with https that are failing. For example if you need to disable only epel repo:
    yum --disablerepo=epel -y update  ca-certificates
  2. Editing both /etc/yum.repos.d/epel.repo and /etc/yum.repos.d/epel-testing.repo files, commenting all entries starting with mirrorlist=... and uncomenting all the entries starting with baseurl=....