太奇怪了,我有一个centos7 VM盒子。尝试安装,dnf
因为它是另一个包的依赖项。
互联网上的大多数说明是这样的:
sudo yum install epel-release
sudo yum install dnf
Run Code Online (Sandbox Code Playgroud)
但没有安装。 No package dnf available
甚至关注 DNF 博客:http : //dnf.baseurl.org/2016/07/01/fresh-dnf-for-rhel-7-and-centos-7/
# cat <<EOF > /etc/yum.repos.d/dnf-stack-el7.repo
[dnf-stack-el7]
name=Copr repo for dnf-stack-el7 owned by @rpm-software-management
baseurl=https://copr-be.cloud.fedoraproject.org/results/@rpm-software-management/dnf-stack-el7/epel-7-\$basearch/
skip_if_unavailable=True
gpgcheck=1
gpgkey=https://copr-be.cloud.fedoraproject.org/results/@rpm-software-management/dnf-stack-el7/pubkey.gpg
enabled=1
enabled_metadata=1
Run Code Online (Sandbox Code Playgroud)
仍然没有安装
# cat /etc/centos-release
CentOS Linux release 7.4.1708 (Core)
# yum search dnf
Loading mirror speeds from cached hostfile
* base: centos.bhs.mirrors.ovh.net
* epel: mirror.umd.edu
* extras: centos.bhs.mirrors.ovh.net
* remi-safe: remi.mirror.ate.info
* updates: centos.bhs.mirrors.ovh.net
========================================================================= N/S matched: …
Run Code Online (Sandbox Code Playgroud) 尝试了几种解决方案,但只能在一定程度上起作用。 https://unix.stackexchange.com/questions/37329/efficiently-delete-large-directory- contains-thousands-of-files?newreg=07f276292205457ab9975a0ea68e9273
http://www.slashroot.in/which-is-the-fastest-method-to-delete-files-in-linux
释放 8% 的 inode 后,磁盘变得非常慢,无法再删除任何内容。
rm -f filename*
rsync -a --delete empty_dir/ yourdirectory/
perl -e 'for(<*>){((stat)[9]<(unlink))}'
Run Code Online (Sandbox Code Playgroud)
现在磁盘看起来像这样
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/vda1 2621440 2385895 235545 92% /
tmpfs 128789 1 128788 1% /dev/shm
Run Code Online (Sandbox Code Playgroud)
一个目录中仍然有 600 万个以上的小文件。上述方法以大约 2 个文件/秒的速度删除
我阅读了有关 b 树重新平衡的信息。但是如何诊断/解决缓慢删除问题?
``
Centos 7 x64,mysql-community 5.7 从 mysql57-community 仓库安装。
我正在从 mysql 切换到 percona。然而,当我尝试卸载 mysql 时,第一步是可怕的。
Yum 正在使用 mysql 单独删除系统组件,例如 crontabs 和 redhat-lsb-core。
# yum remove mysql-community-*
=====================================================================================================================================
Package Arch Version Repository Size
=====================================================================================================================================
Removing:
mysql-community-client i686 5.7.18-1.el6 @mysql57-community 87 M
mysql-community-common i686 5.7.18-1.el6 @mysql57-community 2.5 M
mysql-community-libs i686 5.7.18-1.el6 @mysql57-community 7.8 M
mysql-community-libs-compat i686 5.7.18-1.el6 @mysql57-community 4.8 M
mysql-community-server i686 5.7.18-1.el6 @mysql57-community 699 M
Removing for dependencies:
cronie i686 1.4.4-16.el6_8.2 @updates 169 k
cronie-anacron i686 1.4.4-16.el6_8.2 @updates 38 k
crontabs noarch 1.10-33.el6 …
Run Code Online (Sandbox Code Playgroud)