1、同步网络yum源到本地 配置yum源 [root@qunniao ~]# wget -O /etc/yum.repos.d/Centos-aliyun.repo https://mirrors.aliyun.com/repo/Centos-7.repo[root@qunniao ~]# wget -O /etc/yum.repos.d/epel-7....
Linux
shell 技巧
1、多行内容变成一行技巧 [root@qunniao ~]# cat a.txt02468 xargs [root@qunniao ~]# xargs <a.txt0 2 4 6 8 cat与xargs结合 [root@qunniao ~]# cat a.txt | xargs0 2 4 6 8 cat与echo...
无人值守常见问题及解决方法
【问题现象一】:安装系统时卡在“dracut:/#”处 【解决方法】:出现此问题是因为内存小于2G造成的,只需要把内存加大到2G以上即可 【问题现象二】:No DHCP or proxyDHCP offers were received ...
Linux无人值守安装服务器搭建
环境:Centos7.6+TFTP+FTP+DHCP+Kickstart 运行原理如下图: 1、配置基本环境 [root@qunniao ~]# systemctl disable --now firewalld.serviceRemoved symlink /etc/systemd/system/multi-user....
linux命令rar解压缩文件
1、下载 wget https://www.rarlab.com/rar/rarbsd-6.0.b1.tar.gz (注:如当前网址不能使用,请在以下网址下载) 链接:https://pan.baidu.com/s/1WI3zIOtC5ESakp4Lz6QMqA 提取码:niao 2、安装 ...
Centos7.x忘记root密码修改
很多生产环境中,由于时间太长或人员变动,容易丢失root密码,首先了解一下Centos7以上的版本相对Centos6的版本单用户模式进入和重置密码有很大的不同,如grub由b变成ctrl+x引导,且还需要写入相应的se...
Linux格式化大于2TB方法
fdisk默认只能格式小于2T的磁盘,工作中经常会碰到大于2T的磁盘,需要用parted 来的格式化 1、安装parted yum install -y parted 2、查看磁盘名称 [root@VM_0_16_centos ~]# fdisk -l Disk /dev/vda: 536.9 GB, ...
Linux操作技巧
一、同级目录创建备份 备份 cp filename{,.bak} 等同于命令 cp filename filename.bak 例: [root@qunniao ~]# cp /tmp/key.sh{,.bak} [root@qunniao ~]# ls /tmp /tmp/key.sh /tmp/key.sh.ba...
Shell中的特殊用法
一、Shell中的${}、##和%%使用 假设变量为: file=/dir1/dir2/dir3/my.file.txt 可以用${ }分别替换得到不同的值: ${file#*/}:删掉第一个 / 及其左边的字符串:dir1/dir2/dir3/my.file.txt ${file##*/}...
创建yum源仓库服务器
环境:centos7.4 server ip:10.0.0.3 服务器端配置: 1、配置nginx [root@yum_server ~]# yum -y install nginx [root@yum_server ~]# mkdir -p /data/yum-server/os [root@yum_server ~]# cat << eo...