Skip to content

Commands

The following tables contains commands you may find useful.

Server Installation

Operation

Operating System, Distribution, Version

Commands

List Dependencies

Fedora 34 and later RHEL 8.4 and later

# With internet access and CodeLogic repo configured

dnf --quiet deplist codelogic

# Note that docker-compose will not be listed because it is not available as a package for RHEL.

# With .rpm package downloaded

rpm -qp <ARCHIVE> --requires

Ubuntu 18 and later

# With internet access

apt-cache depends codelogic

# Without internet access (package file downloaded)

dpkg --field Depends <ARCHIVE>

Configure CodeLogic

Fedora 34, RHEL 8.4, and Ubuntu 18 or later

sudo /opt/codelogic/pre_start_codelogic.sh

Add Repo Key

Fedora 34 and RHEL 8.4 or later

sudo dnf config-manager --add-repo http://repo.codelogic.com/redhat/codelogic-server.repo

Add Repo Key and Repository

Ubuntu 18 or later

wget -qO- http://repo.codelogic.com/debian/archive.key

sudo apt-key add - sudo add-apt-repository --update 'deb http://repo.codelogic.com/debian /'

Install CodeLogic Server

Fedora 34 or RHEL 8.4 and later

# remove podman (sudo dnf erase podman buildah)

# Install docker-ce 20.10 or later: https://docs.docker.com/engine/install/fedora/

# Configure docker to start a boot https://docs.docker.com/engine/install/linux-postinstall/#configure-docker-to-start-on-boot

# Install docker-compose 1.29.2 https://docs.docker.com/compose/install/#install-compose-on-linux-systems

sudo dnf install --assumeyes codelogic

Ubuntu 18 and later

sudo apt install --assume-yes -f codelogic

Upgrade CodeLogic Server

Fedora 34 or RHEL 8.4 and later

sudo dnf upgrade codelogic

Ubuntu 18 and later

sudo apt update sudo apt upgrade codelogic

Server Monitoring and Maintenance

Operation

Operating System, Distribution, Version

Commands

CodeLogic Server Status

Fedora 34 and later RHEL 8.4 and later Ubuntu 18 and later

systemctl status codelogic

Monitor CodeLogic Server

Fedora 34 and later RHEL 8.4 and later Ubuntu 18 and later

journalctl --follow --unit=codelogic.service

Start CodeLogic Server

Fedora 34 and later RHEL 8.4 and later Ubuntu 18 and later

sudo systemctl start codelogic

Stop CodeLogic Server

Fedora 34 and later RHEL 8.4 and later Ubuntu 18 and later

sudo systemctl stop codelogic

Upgrade CodeLogic Server

Fedora 34 and later RHEL 8.4 and later

sudo dnf upgrade codelogic

Ubuntu 18 and later

sudo apt update sudo apt upgrade codelogic

List Installed Version

Fedora 34 and later RHEL 8.4 and later

dnf list --installed codelogic

Ubuntu 18 and later

apt list --installed codelogic

Remove CodeLogic Server

Fedora 34 and later RHEL 8.4 and later

sudo dnf config-manager --set-disabled codelogic

sudo mv /etc/yum.repos.d/codelogic-server.repo /etc/yum.repos.d/codelogic-server.repo.disabled

sudo dnf erase codelogic

The following commands were copied from: https://docs.docker.com/engine/install/fedora/#uninstall-docker-engine

# Uninstall docker

sudo dnf remove docker-ce docker-ce-cli containerd.io

### Remove images, containers, volumes or customized configuration files

sudo rm -rf /var/lib/docker

sudo rm -rf /var/lib/containerd

Ubuntu 18 and later

sudo apt purge codelogic

sudo add-apt-repository --remove 'deb http://repo.codelogic.com/debian /'

### After release 21.7

apt-key list # Find CodeLogic key in output

sudo apt-key del 'A5AAFB31...' #Put CodeLogic key between single quotes

# Prior to release 21.7:

sudo add-apt-repository --remove 'deb http://repo.crosscode.io/debian /'

apt-key list # Find CodeLogic key in output sudo apt-key del'6721E604...' #Put CodeLogic key between single quotes

Linux Agent Monitoring and Maintenance

Operation

Operating System, Distribution, Version

Commands

Show Status

Amazon Linux 2 CentOS 7 and later Fedora 32 and later RHEL 7.9 and later Ubuntu 18 and later Debian 10 and later

systemctl status codelogic-java codelogic-sql

Monitor Agent

Amazon Linux 2 CentOS 7 and later Fedora 32 and later RHEL 7.9 and later Ubuntu 18 and later Debian 10 and later

Java Agent: journalctl --follow --unit=codelogic-java.service

SQL Agent: journalctl --follow --unit=codelogic-sql.service

Start Agent

Amazon Linux 2 CentOS 7 and later Fedora 32 and later RHEL 7.9 and later Ubuntu 18 and later Debian 10 and later

sudo systemctl startcodelogic-java codelogic-sql

Stop Agent

Amazon Linux 2 CentOS 7 and later Fedora 32 and later RHEL 7.9 and later Ubuntu 18 and later Debian 10 and later

sudo systemctl stopcodelogic-java codelogic-sql

Disable Agent

Amazon Linux 2 CentOS 7 and later Fedora 32 and later RHEL 7.9 and later Ubuntu 18 and later Debian 10 and later

sudo systemctl disablecodelogic-java codelogic-sql

Upgrade Agents

Amazon Linux 2 CentOS 6 CentOS 7 and later RHEL 7.9 and later

sudo yum upgrade codelogic-java codelogic-sql

CentOS 8 and later Fedora 32 and later RHEL 8.4 and later

sudo dnf upgrade codelogic-java codelogic-sql

Debian 10 and later Ubuntu 18 and later

sudo sudo apt update sudo apt upgrade codelogic-java codelogic-sql

Show Agent Version

Amazon Linux 2 CentOS 6 CentOS 7 and later RHEL 7.9 and later

yum list codelogic-java codelogic-sql

CentOS 8 and later Fedora 32 and later

dnf list codelogic-java codelogic-sql

RHEL 8.4 and later

sudo dnf list codelogic-java codelogic-sql

Debian 10 and later Ubuntu 18 and later

apt list codelogic-java codelogic-sql

Remove Agents

Amazon Linux 2 CentOS 6 CentOS 7 and later RHEL 7.9 and later

sudo yum erase codelogic-java codelogic-sql

CentOS 8 and later Fedora 32 and later RHEL 8.4 and later

sudo dnf erase codelogic-java codelogic-sql

Debian 10 and later Ubuntu 18 and later

sudo apt purge codelogic-java codelogic-sql

Remove Agent Repos

Amazon Linux 2 CentOS 6 CentOS 7 and later RHEL 7.9 and later

sudo yum --disablerepo=CodeLogicAgents update

# Find CodeLogic key

sudo rm /etc/yum.repos.d/codelogic-agents.repo rpm -q gpg-pubkey --qf '%{NAME}-%{VERSION}-%{RELEASE}\t%{SUMMARY}\n'

# Use the CodeLogic key from the previous command

sudo rpm -e gpg-pubkey-b6792c39-53c4fbdd

CentOS 8 and later Fedora 32 and later RHEL 8.4 and later

sudo dnf config-manager --set-disabled CodeLogicAgents

# Find CodeLogic key

sudo rm /etc/yum.repos.d/codelogic-agents.repo rpm -q gpg-pubkey --qf '%{NAME}-%{VERSION}-%{RELEASE}\t%{SUMMARY}\n'

# Use the CodeLogic key from the previous command

sudo rpm -e gpg-pubkey-b6792c39-53c4fbdd

Debian 10 and later Ubuntu 18 and later

sudo rm /etc/apt/sources.list.d/codelogic-agents.list

# Find CodeLogic key in output

sudo apt update apt-key list

# Put CodeLogic key between single quotes

sudo apt-key del '6721 E604...’

Windows Agent Monitoring and Maintenance

Service Administration

Use the Windows Services Manager for controlling the .NET Agent service.

CentOS 6

CentOS 6 uses different commands than other supported systems. Here are some that may be useful.

Operation

Command

List repo keys

rpm -qa --qf '%{VERSION}-%{RELEASE} %{SUMMARY}\n' gpg-pubkey*

Remove repo key

sudo rpm -e gpg-pubkey-c4b7ee5d-5f512c8f

Check for updates

sudo yum check-update

Upgrade CodeLogic agents

sudo yum upgrade codelogic-java codelogic-sql

Update CodeLogic agents

sudo yum update codelogic-java codelogic-sql

The output and operation of some commands differ from other supported systems also. For example, it is not possible to automatically install dependencies.

A yum upgrade will force the removal of obsolete packages. A yum update will not.

Services

Operating System, Distribution, Version

Commands

CentOS 6

See the service command.

service codelogic-java start

All Linux distributions (except CentOS 6)

See the systemctl command.

systemctl start codelogic-java

Windows (.NET Agent only)

See the Windows Services Manager.