我正在我的openSUSE x86_64机器上试用Salt堆栈2015.08。我有一个简单的本地设置,它最终安装了一个包:
install_apache_2:
pkg.installed:
- pkgs:
- apache2-doc然而,这需要50秒,这可能是因为zypper存储库被强制刷新,而完整的rpm数据库扫描需要两次。
[INFO ] Executing state pkg.installed for install_apache_2
[INFO ] Executing command ['rpm', '-qa', '--queryformat', '%{NAME}_|-%{VERSION}_|-%{RELEASE}_|-%|EPOCH?{%{EPOCH}}:{}|\\n'] in directory '/root'
[INFO ] Executing command ['zypper', '--non-interactive', 'refresh', '--force'] in directory '/root'
[INFO ] Executing command ['zypper', '--non-interactive', '--no-refresh', 'install', '--name', '--auto-agree-with-licenses', 'apache2-doc'] in directory '/root'
[INFO ] Executing command ['rpm', '-qa', '--queryformat', '%{NAME}_|-%{VERSION}_|-%{RELEASE}_|-%|EPOCH?{%{EPOCH}}:{}|\\n'] in directory '/root'
[INFO ] Made the following changes:
'apache2-doc' changed from 'absent' to '2.4.23-1.1'如何加快包的安装速度?
发布于 2016-08-10 12:40:51
我通常只在第一个包上看到这一点,随后的包安装就会很快。这是由于运行开始时的db刷新和数据收集造成的。一次安装两个或多个软件包,以查看差异。
https://serverfault.com/questions/795996
复制相似问题