Skip to content

Latest commit

 

History

History
122 lines (84 loc) · 3.44 KB

INSTALLATION.md

File metadata and controls

122 lines (84 loc) · 3.44 KB

Installation

opensips-cli is the intended convenient command-line interface for administrating opensips 3.x installations.

Since version 3.x, the former script tool opensipsctl has been removed. Its successor, opensips-cli, offers many advantages and will improve handling for regular tasks in a pleasant console environment.

From Packages

Debian packages (.deb)

opensips-cli is published in the same repositories as OpenSIPS, as a separate package: installing opensips does not pull it in, so install opensips-cli explicitly.

Add an OpenSIPS repository from apt.opensips.org (any OpenSIPS version component, e.g. 4.0-releases or 3.6-releases, provides the same opensips-cli package), then install opensips-cli:

curl https://apt.opensips.org/opensips-org.gpg -o /usr/share/keyrings/opensips-org.gpg
echo "deb [signed-by=/usr/share/keyrings/opensips-org.gpg] https://apt.opensips.org bookworm 4.0-releases" \
  >/etc/apt/sources.list.d/opensips.list
apt-get update && apt-get install opensips-cli

Replace bookworm with your distribution's codename.

Supported Operating Systems (at the time of writing):

  • Debian 11-13 (bullseye, bookworm, trixie)
  • Ubuntu 22.04, 24.04, 26.04 (jammy, noble, resolute)

RPM packages (.rpm)

Install the opensips-repo-releases package for your OpenSIPS version and distribution from yum.opensips.org; it sets up a repository that includes both opensips and opensips-cli. Once installed, install the opensips-cli package.

Supported Operating Systems (at the time of writing):

  • RHEL 7-10 (and compatible distributions)
  • CentOS Stream 9-10

Arch Linux AUR

The distribution is managed as a rolling release. Packages are administered via the pacman front-end. Please install the opensips-cli package from the AUR using your favorite client:

# nightly build (latest `master` branch)
yay opensips-cli-git

# latest release branch
yay opensips-cli

From Source Code

Requirements

Before building the CLI, you need to install some dependencies. The process will vary on every supported operating system.

Debian / Ubuntu

# required OS packages
sudo apt install python3 python3-pip python3-pymysql python3-sqlalchemy \
                 python3-openssl

# alternatively, you can build the requirements from source
sudo pip3 install PyMySQL sqlalchemy pyOpenSSL

Red Hat / CentOS

# required CentOS 7 packages
sudo yum install python36 python36-pip python36-PyMySQL \
                 python36-sqlalchemy python36-pyOpenSSL

# required CentOS 8 packages
sudo yum install python3 python3-pip python3-PyMySQL \
                 python3-sqlalchemy python3-pyOpenSSL

# alternatively, you can build the requirements from source
sudo pip3 install PyMySQL sqlalchemy pyOpenSSL

Download, Build & Install

We can now download and install the latest development state from the GitHub repository:

git clone https://github.com/opensips/opensips-cli ~/src/opensips-cli
cd ~/src/opensips-cli

# local install (only visible to your user)
python3 -m pip install --user .

# system-wide install
sudo python3 -m pip install .

Cleaning up the install

To clean up the manually built and installed opensips-cli package, run:

python3 -m pip uninstall opensipscli

Database Installation

Follow the Database module documentation for a complete guide.