alpine系统尝试记录
alpine系统尝试记录
配置 alpine 清华源
1 | sed -i 's#https\?://dl-cdn.alpinelinux.org/alpine#https://mirrors.tuna.tsinghua.edu.cn/alpine#g' /etc/apk/repositories |
安装zsh git curl vim zsh-vcs
1 | apk add zsh git curl vim zsh-vcs |
创建源码目录
1 | mkdir src |
安装oh-my-zsh
1 | sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" |
字体安装
1 | git clone https://gh-proxy.org/https://github.com/powerline/fonts.git --depth=1 |
安装字体
1 | curl -OL https://gh-proxy.org/https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.tar.xz |
额外字体
1 | curl -OL https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf |
安装powerlevel10k
1 | git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k" |
配置p10k
1 | p10k configure |
安装字体与字体配置
1 | apk add ttf-dejavu fontconfig |
刷新字体
1 | mkfontscale && mkfontdir && fc-cache |
配置alpine glibc兼容
1 | wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub |
配置英文
1 | /usr/glibc-compat/bin/localedef -i en_US -f UTF-8 en_US.UTF-8 |
配置中文
1 | /usr/glibc-compat/bin/localedef -i zh_CN -f UTF-8 zh_CN.UTF-8 |
配置环境变量
1 | /etc/profile |
安装neovim
1 | apk add neovim |
配置neovim
1 | git clone https://gh-proxy.org/https://github.com/NvChad/starter ~/.config/nvim |
配置lazynvim
1 | git clone https://gh-proxy.org/https://github.com/folke/lazy.nvim.git /root/.local/share/nvim/lazy/lazy.nvim |
等待安装所有依赖
1 | nvim |
github代理
1 | git config --global url."https://gh-proxy.org/https://github.com/".insteadof "https://github.com/" |
查看git配置
1 | git config --list |
取消代理
1 | git config --global --unset url.https://gh-proxy.com/https://github.com/.insteadof |