Skip to content

Instantly share code, notes, and snippets.

@dimpurr
Last active July 6, 2020 16:05
Show Gist options
  • Save dimpurr/2e24f75010855e27731e975bc9210174 to your computer and use it in GitHub Desktop.
Save dimpurr/2e24f75010855e27731e975bc9210174 to your computer and use it in GitHub Desktop.
debian-to-pve in china network env
echo 'should runing as root!'
su root
sed -i 's|security.debian.org/debian-security|mirrors.ustc.edu.cn/debian-security|g' /etc/apt/sources.list
apt update
apt install htop vim openssh-server zsh neofetch
cd /root
git clone https://gitee.com/mirrors/oh-my-zsh.git
cd oh-my-zsh/tools
./install.sh
echo 'neofetch' >> /root/.zshrc
echo 'export PATH=/sbin:$PATH' >> /root/.zshrc
ip a
echo 'change your ip'
vim /etc/hosts
hostname --ip-address
wget http://download.proxmox.com/debian/proxmox-ve-release-6.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg
echo "deb https://mirrors.ustc.edu.cn/proxmox/debian/pve buster pve-no-subscription" > /etc/apt/sources.list.d/pve-no-subscription.list
apt update && apt full-upgrade
apt install proxmox-ve postfix open-iscsi
apt install ifupdown2
echo 'you can /sbin/reboot now'
@dimpurr
Copy link
Author

dimpurr commented Jul 6, 2020

if you need wireguard: https://gist.github.com/ishrak1010/e0ac0a780860b82d1bbca1e1d0a02f08

echo "deb http://mirrors.ustc.edu.cn/debian/ unstable main" > /etc/apt/sources.list.d/unstable-wireguard.list
printf 'Package: *\nPin: release a=unstable\nPin-Priority: 90\n' > /etc/apt/preferences.d/limit-unstable
apt update
apt install wireguard pve-headers
echo "wireguard" >> /etc/modules-load.d/modules.conf

@dimpurr
Copy link
Author

dimpurr commented Jul 6, 2020

after installed pve:

#删除企业源
rm /etc/apt/sources.list.d/pve-enterprise.list 
##下载秘钥
wget http://download.proxmox.com/debian/proxmox-ve-release-5.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-5.x.gpg
#添加社区源
echo "deb https://mirrors.ustc.edu.cn/proxmox/debian/pve buster pve-no-subscription" >/etc/apt/sources.list.d/pve-no-subscription.list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment