FetchLinux主要用于下載和管理Linux發行版鏡像,而非直接管理軟件包。若要使用FetchLinux管理軟件包,可參考以下方式:
sudo apt update
;對于基于Red Hat的系統(如CentOS、Fedora),執行sudo yum update
。sudo apt install git wget curl openssh-server
;基于Red Hat的系統執行sudo yum install -y git wget curl openssh-server
。git clone https://github.com/fetchlinux/fetchlinux.git /opt/fetchlinux
。/opt/fetchlinux
,復制配置文件模板sudo cp fetchlinux.conf.example fetchlinux.conf
,并編輯設置倉庫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
。fetchlinux download <發行版名稱>
命令下載對應Linux發行版鏡像,如fetchlinux download ubuntu
。sha256sum
命令計算鏡像文件的SHA256校驗和,與官方提供的校驗和對比,確保文件完整。若要管理軟件包的依賴、安裝、卸載等操作,建議使用系統自帶的包管理器,如Ubuntu的apt
、CentOS的yum
或dnf
等。