打开/关闭搜索
搜索
打开/关闭菜单
通知
打开/关闭个人菜单
查看“Gentoo/studio”的源代码
来自OSSmedia
查看
阅读
查看源代码
查看历史
associated-pages
页面
讨论
更多操作
←
Gentoo/studio
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
== 自制脚本 == 请在挂载磁盘后运行(默认位置 /mnt/gentoo) === stage file and chroot === download <pre> # URL of the Gentoo mirror MIRROR_URL="https://mirrors.bfsu.edu.cn/" # Fetch the latest signed file SIGNED_FILE=$(curl -s "${MIRROR_URL}gentoo/releases/amd64/autobuilds/current-stage3-amd64-desktop-systemd/latest-stage3-amd64-desktop-systemd.txt") # Extract the stage file name STAGE_FILE=$(echo "$SIGNED_FILE" | grep -oP '^stage3-[^ ]+\.tar\.xz') # Download the stage file if [ -n "$STAGE_FILE" ]; then DOWNLOAD_URL="${MIRROR_URL}gentoo/releases/amd64/autobuilds/current-stage3-amd64-desktop-systemd/${STAGE_FILE}" echo "Downloading ${STAGE_FILE}..." curl -O "$DOWNLOAD_URL" echo "Download complete." else echo "Stage file not found." exit 1 fi </pre> extranct and chroot <pre> tar xpvf stage3-*.tar.xz --xattrs-include='*.*' --numeric-owner -C /mnt/gentoo cp --dereference /etc/resolv.conf /mnt/gentoo/etc/ arch-chroot /mnt/gentoo </pre> === root passwd === just do this first please, in case passwd === portage config === do check make.conf after run this <pre> # add config to make.conf echo 'RUSTFLAGS="${RUSTFLAGS} -C target-cpu=native"' >> /etc/portage/make.conf sed -i '/^COMMON_FLAGS=/ s/"$/ -march=native"/' /etc/portage/make.conf tee -a /etc/portage/make.conf <<EOF GRUB_PLATFORMS="emu efi-32 efi-64 pc" USE="X fcitx5 tkip kcm cjk" ACCEPT_LICENSE="* -@EULA" VIDEO_CARDS="nvidia amdgpu radeon radeonsi intel mesa" FEATURES="getbinpkg" L10N="zh jp en" EOF # CPU echo "*/* $(cpuid2cpuflags)" > /etc/portage/package.use/00cpu-flags # seems useless tee -a /etc/portage/binrepos.conf/bfsu.conf <<EOF [binhost] priority = 9999 sync-uri = https://mirrors.bfsu.edu.cn/gentoo/releases/amd64/binpackages/23.0/x86-64/ EOF tee -a /etc/portage/package.use/01studio <<EOF # kernel sys-kernel/installkernel dracut grub # kde kde-plasma/plasma-meta networkmanager kwallet display-manager sddm wacom systemd sdk rdp plymouth oxygen-theme gtk grub discover bluetooth smart kde-plasma/kde-apps-meta admin education games graphics multimedia network pim sdk utils # latex app-text/texlive X cjk context extra games graphics humanities luatex metapost music pdfannotextractor png pstricks publishers science tex4ht texi2html truetype xetex xml # im # app-i18n/fcitx app-i18n/mozc fcitx5 # audio media-video/pipewire systemd jack-sdk pipewire-alsa sound-server EOF touch /etc/portage/package.use/zz-autoconfig </pre> === bfsu repo === <pre> mkdir /etc/portage/repos.conf cp /usr/share/portage/config/repos.conf /etc/portage/repos.conf/gentoo.conf sed -i 's|rsync://rsync.gentoo.org/gentoo-portage|rsync://mirrors.bfsu.edu.cn/gentoo-portage|' /etc/portage/repos.conf/gentoo.conf </pre> === enable testing flag(optional) === <pre> # ~AMD64 tee -a /etc/portage/package.accept_keywords/01studio <<EOF # testing */* ~amd64 EOF </pre> === update and installation === unmask-write, install, enable and reboot <pre> emerge --sync #eselect profile list | grep plasma #eselect profile set emerge --ask --verbose --update --deep --changed-use @world emerge --autounmask-write mirrorselect bash-completion net-misc/networkmanager \ app-portage/cpuid2cpuflags sudo glances app-misc/screen \ sys-kernel/installkernel sys-kernel/linux-firmware sys-kernel/gentoo-kernel \ plasma-meta kde-apps-meta \ firefox chromium \ app-editors/kile app-text/texlive \ pipewire libpulse plasma-pa wireplumber cd /etc/portage/package.use etc-update --automode -5 emerge mirrorselect bash-completion net-misc/networkmanager \ app-portage/cpuid2cpuflags sudo glances app-misc/screen \ sys-kernel/installkernel sys-kernel/linux-firmware sys-kernel/gentoo-kernel grub-install --efi-directoy=/boot/efi --bootloader-id=GRUB grub-mkconfig -o /boot/grub/grub.cfg systemctl enable systemd-networkd systemctl enable systemd-resolved systemctl enable bluetooth systemctl enable NetwrokManager </pre> === setting up some scripts === curl -fsSL "ossmedia.cn/set-ac.sh?raw" | bash curl -fsSL "ossmedia.cn/set-proxy.sh?raw" | bash === system config before reboot === <pre> systemd-machine-id-setup systemd-firstboot --prompt systemctl preset-all --preset-mode=enable-only </pre> === install packaged after the reboot === package install <pre> emerge plasma-meta kde-apps-meta \ firefox chromium media-fonts/noto-cjk \ app-editors/kile app-text/kbibtex app-text/texlive \ fcitx mozc fcitx-configtool fcitx-chinese-addons \ pipewire libpulse plasma-pa wireplumber genlop eix </pre> enable sddm systemctl enable ssdm enable cjk fonts sudo eselect fontconfig enable 70-noto-cjk.conf pipewire <pre> sudo usermod -aG pipewire $USER mkdir ~/.config/pipewire cp /usr/share/pipewire/pipewire.conf ~/.config/pipewire/ systemctl --user disable --now pulseaudio.socket pulseaudio.service systemctl --user enable --now pipewire.socket pipewire-pulse.socket wireplumber.service systemctl --user enable --now pipewire.service </pre> 如果在安装时使用gtk2或gtk3 USE标记,<module>(下面的示例中)应是fcitx,否则应是xim。 文件 ~/.xprofile <pre> export XMODIFIERS="@im=fcitx" export QT_IM_MODULE=<module> export GTK_IM_MODULE=<module> </pre> === add gentoo-zh === sudo emerge eselect-repository sudo eselect repository enable gentoo-zh
返回
Gentoo/studio
。