实验-rpm
mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom/
rpm -ivh /mnt/cdrom/Packages/zsh-5.0.2-7.el7.x86_64.rpm
rpm -ivh /mnt/cdrom/Packages/zsh-5.0.2-7.el7.x86_64.rpm --force
rpm -qa | grep zsh
rpm -e zsh
rpm -qa | grep zsh
rpm -qpi /mnt/cdrom/Packages/httpd-2.4.6-17.el7.x86_64.rpm
实验-恢复误删命令
which rm
rpm -qf /bin/rm
rm -f /bin/rm
rpm -ivh /mnt/cdrom/Packages/coreutils-8.22-11.el7.x86_64.rpm --force
alias | grep rm
touch file1
/bin/rm file1
实验-yum
rpm -ivh /mnt/cdrom/Packages/httpd-tools-2.4.6-17.el7.x86_64.rpm
rm -f /etc/yum.repos.d/*
mount /dev/cdrom /mnt/cdrom/
yum-config-manager --add-repo=file:///mnt/cdrom
echo gpgcheck=0 >> /etc/yum.repos.d/mnt_cdrom.repo
yum list
yum groups list
yum install httpd
yum remove -y httpd
实验-搭建远程yum源
在qin1上
systemctl stop firewalld.service
setenforce 0
ifconfig eno16777736 192.168.100.1/24
yum install -y vsftpd
systemctl restart vsftpd
cp /mnt/cdrom/Package/* /var/ftp
createrepo /var/ftp
在qin2上
systemctl stop firewalld.service
setenforce 0
ifconfig eno16777736 192.168.100.2/24
rm -f /etc/yum.repos.d/*
yum-config-manager --add-repo=ftp://192.168.100.1
echo gpgcheck=0 >> /etc/yum.repos.d/192.168.100.1.repo