在VMware Workstation里安装centos7 64位
在电脑上插上U盘,把文件拷贝到centos7里
在centos7
1.查看U盘
fdisk -l
报错:
fdisk: cannot open /dev/sda: Permission denied
切换
su root
插上U盘 再次 fdisk -l
/dev/sdb1
将u盘挂载到mnt:
mount /dev/sdb1 /mnt/
检查是否挂载成功
ls /mnt/
拷贝文件:
cp /mnt/setup/ /root/
报错:
cp: omitting directory ‘/mnt/setup/’
解决办法:
cp -r /mnt/setup/ /root/
卸载U盘
umount /mnt/
第二次 重装虚拟机 重装centos7
执行:
./setup.sh
报错:
[root@localhost ~]# cd setup/
[root@localhost setup]# chmod +x *.sh
[root@localhost setup]# ./setup.sh
stop firewall
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
install docker
Loaded plugins: fastestmirror, langpacks
Existing lock /var/run/yum.pid: another copy is running as pid 3039.
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 153 M RSS (575 MB VSZ)
Started: Fri Jun 25 23:22:36 2021 - 15:27 ago
State : Sleeping, pid: 3039
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 153 M RSS (575 MB VSZ)
Started: Fri Jun 25 23:22:36 2021 - 15:29 ago
State : Sleeping, pid: 3039
解决办法:
rm -f /var/run/yum.pid