在CentOS上搭建FetchLinux虚拟机,可参考以下步骤:
sudo yum install qemu-kvm libvirt libvirt-devel libguestfs-tools virt-install -y安装相关软件包。virt-install命令创建,例如sudo virt-install --name FetchLinuxVM --ram 2048 --disk path=/var/lib/libvirt/images/FetchLinuxVM.img,size=20 --vcpus 2 --os-type linux --os-variant rhel7.0 --network bridge:br0 --graphics none --cdrom /path/to/centos.iso,可根据实际情况调整参数。hostname -I检查网络连接,若无IP地址,需修改网络配置文件/etc/sysconfig/network-scripts/ifcfg-enp0s3,将ONBOOT设置为yes,并重启网络服务。sudo yum update。sudo yum install -y git wget curl openssh-server。git clone https://github.com/fetchlinux/fetchlinux.git /opt/fetchlinux。/opt/fetchlinux目录,复制配置文件模板并编辑,设置仓库URL、镜像名称、更新频率等参数。sudo groupadd fetchlinux,sudo useradd -r -g fetchlinux fetchlinux。sudo chown -R fetchlinux:fetchlinux /opt/fetchlinux。sudo systemctl enable fetchlinux,sudo systemctl start fetchlinux。