如,安装15.2.13的ceph-common
PACKAGE_NAME=ceph-common
CEPH_VERSION=15.2.13
wget -q -O- 'https://download.ceph.com/keys/release.asc' | sudo apt-key add -
echo deb http://download.ceph.com/debian-${CEPH_VERSION}/ $(lsb_release -sc) main | sudo tee /etc/apt/sources.list.d/ceph.list
sudo apt-get update
version_name=`apt-cache policy ${package_name} | grep -E 'Installed|Candidate' | grep ${CEPH_VERSION} | tail -n 1 |awk '{print $NF}'`
sudo apt-get install {package_name}={version_name} -y