设置中科大源
注意:需要先切换root用户
1 2 3 4 5 6 7 8 9 10 11 12
|
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak \ && sed -e 's|^mirrorlist=|#mirrorlist=|g' \ -e 's|^#baseurl=http://mirror.centos.org/centos|baseurl=https://mirrors.ustc.edu.cn/centos|g' \ -i.bak \ /etc/yum.repos.d/CentOS-Base.repo
yum makecache \ && yum clean all
|
安装开发工具包、系统软件
1 2 3 4 5 6 7 8 9
| yum install epel-release -y
yum install dnf -y
dnf install dnf-plugins-core -y dnf copr enable konimex/neofetch -y dnf install neofetch -y
|
安装开发工具
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| dnf groupinstall "Development Tools" -y
dnf install \ https://repo.ius.io/ius-release-el7.rpm \ https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \ -y dnf remove git -y dnf install git236 -y
|
安装Vim等工具
1 2 3 4 5 6
| dnf install sudo \ vim \ net-tools \ wget \ -y
|
安装zsh
安装on-my-zsh
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| git clone https://gitee.com/mirrors/oh-my-zsh.git ~/.oh-my-zsh \ && cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc \ && git clone https://gitee.com/playerfs/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions \ && git clone https://gitee.com/playerfs/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting \ && sed -i 's/^plugins=(/plugins=(zsh-autosuggestions zsh-syntax-highlighting /' ~/.zshrc \ && chsh -s /bin/zsh
git clone https://gitee.com/mirrors/oh-my-zsh.git ~/.oh-my-zsh \ && cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc \ && git clone https://gitee.com/playerfs/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions \ && git clone https://gitee.com/playerfs/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting \ && sed -i 's/^plugins=(/plugins=(zsh-autosuggestions zsh-syntax-highlighting /' ~/.zshrc
echo "source ~/my_profile.sh" >> ~/.zshrc chsh -s /bin/zsh
vim ~/my_profile.sh
|
参考
https://github.com/terwer/portable-centos-7-workstation/blob/main/centos-7-vnc/Dockerfile