|
1 2 3 4 5 |
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo yum clean all yum makecache yum update -y |
View Details
lsattr filename
chattr -ia authorized_keys
chattr +ia authorized_keys
#查看 /目录下各个子目录磁盘使用情况,按大小排序,仅显示前10个 du -h --max-depth=1 / | sort -rh | head -n 10 from:https://www.cnblogs.com/dreamer-fish/p/18826168
View Details# 修改vimrc文件,文件路径:/etc/vimrc
cd /etc
vim vimrc
# 在vimrc文件末尾处添加
set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
set termencoding=utf-8
set encoding=utf-8
在CentOS 7中,关机命令主要有shutdown、halt、poweroff和init 0。以下是一些常用的关机命令及其说明: shutdown:安全地关闭系统。 用法:shutdown [选项] 时间 [信息] 示例:shutdown now立即关机。 halt:停止所有的CPU活动。 用法:halt [选项] 示例:halt立即停止所有活动。 poweroff:关闭电源并关闭系统。 用法:poweroff [选项] 示例:poweroff立即关闭电源并关闭系统。 init 0:改变运行级别到0,即关机。 用法:init 0 示例:init 0立即关机。 在实际使用中,你可以根据需要选择合适的关机命令。如果你需要立即关机,可以使用shutdown now、halt或poweroff命令。如果你想按计划关机,可以使用带有时间参数的shutdown命令,例如shutdown 23:59会在今天晚上11点关机。 from:https://imopu.cn/3605.html
View Details阿里云镜像源
进入/etc/yum.repos.d
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
sudo yum clean all
sudo yum makecache
CentOS由独立发行版改为了滚动更新发行版CentOS Stream,CentOS Stream和RHEL的大版本号保持一致,但是没有小版本号,并且对应着RHEL的最新版本,CentOS Stream的稳定性不输于 CentOS。
View Details1)检查yum仓库是否配置正确,可以到CentOS 镜像下载阿里云repo配置文件。
2)如果报错中包含$releasever变量, 则执行rpm -qa | grep centos-release确认centos-release是否安装。未安装可以执行以下命令下载安装包进行安装。
Docker CE 支持 64 位版本 CentOS 7,并且要求内核版本不低于 3.10, CentOS 7 满足最低内核的要求,所以我们在CentOS 7安装Docker。
View Details