How To Install ProxySQL:


Ubuntu and Debian:

Configuring APT repository

apt-get update && apt-get install -y --no-install-recommends lsb-release wget apt-transport-https ca-certificates gnupg
wget -O - 'https://repo.proxysql.com/ProxySQL/proxysql-2.7.x/repo_pub_key' | apt-key add -
echo "deb https://repo.proxysql.com/ProxySQL/proxysql-2.7.x/$(lsb_release -sc)/ ./" | tee /etc/apt/sources.list.d/proxysql.list
or for distros without apt-key
apt-get update && apt-get install -y --no-install-recommends lsb-release wget apt-transport-https ca-certificates
wget -nv -O /usr/share/keyrings/proxysql-2.7.x-keyring.gpg 'https://repo.proxysql.com/ProxySQL/proxysql-2.7.x/repo_pub_key.gpg'
echo "deb [signed-by=/usr/share/keyrings/proxysql-2.7.x-keyring.gpg] https://repo.proxysql.com/ProxySQL/proxysql-2.7.x/$(lsb_release -sc)/ ./" | tee /etc/apt/sources.list.d/proxysql.list
Note: on older EOL distros, due to expired ca-certificates, you may need to use http:// instead of https:// or manualy update ca-certificates

Installing package

apt update -y
apt install -y proxysql
or install specific version
apt update -y
apt install -y proxysql=[version]
e.g.: install ProxySQL v2.6.6
apt-get update && apt-get install -y --no-install-recommends lsb-release wget apt-transport-https ca-certificates
wget -nv -O /usr/share/keyrings/proxysql-2.6.x-keyring.gpg 'https://repo.proxysql.com/ProxySQL/proxysql-2.6.x/repo_pub_key.gpg'
echo "deb [signed-by=/usr/share/keyrings/proxysql-2.6.x-keyring.gpg] https://repo.proxysql.com/ProxySQL/proxysql-2.6.x/$(lsb_release -sc)/ ./" | tee /etc/apt/sources.list.d/proxysql.list
apt update -y
apt install -y proxysql=2.6.6

RHEL and CentOS:

Configuring YUM repository

cat > /etc/yum.repos.d/proxysql.repo << EOF
[proxysql]
name=ProxySQL YUM repository
baseurl=https://repo.proxysql.com/ProxySQL/proxysql-2.7.x/centos/\$releasever
gpgcheck=1
gpgkey=https://repo.proxysql.com/ProxySQL/proxysql-2.7.x/repo_pub_key
EOF

Installing package

yum install proxysql
or install specific version
yum install proxysql-[version]
e.g.: install ProxySQL v2.6.6
cat > /etc/yum.repos.d/proxysql.repo << EOF
[proxysql]
name=ProxySQL YUM repository
baseurl=https://repo.proxysql.com/ProxySQL/proxysql-2.6.x/centos/\$releasever
gpgcheck=1
gpgkey=https://repo.proxysql.com/ProxySQL/proxysql-2.6.x/repo_pub_key
EOF
yum install proxysql-2.6.6

Almalinux:

Configuring YUM repository

cat > /etc/yum.repos.d/proxysql.repo << EOF
[proxysql]
name=ProxySQL YUM repository
baseurl=https://repo.proxysql.com/ProxySQL/proxysql-2.7.x/almalinux/\$releasever
gpgcheck=1
gpgkey=https://repo.proxysql.com/ProxySQL/proxysql-2.7.x/repo_pub_key
EOF

Installing package

yum install proxysql
or install specific version
yum install proxysql-[version]

OpenSUSE:

Configuring Zypper repository

cat > /etc/zypp/repos.d/proxysql.repo << EOF
[proxysql]
name=ProxySQL Zypper repository
enabled=1
autorefresh=0
baseurl=https://repo.proxysql.com/ProxySQL/proxysql-2.7.x/opensuse/\$releasever_major
gpgcheck=1
EOF
or
zypper addrepo -g -n 'ProxySQL Zypper repository' 'https://repo.proxysql.com/ProxySQL/proxysql-2.7.x/opensuse/$releasever_major' proxysql

Installing package

zypper --gpg-auto-import-keys install proxysql
or install specific version
zypper --gpg-auto-import-keys install proxysql-[version]


Repository file location: https://repo.proxysql.com/ProxySQL/