Linux

Debian8初始环境配置(VPS到手必备命令)

一键命令

放在顶部,方便使用.dpkg-reconfigure dash选择框请选NO

dpkg-reconfigure dash;sed -i '/PS1=/d' ~/.bashrc;sed -i '/umask/d' ~/.bashrc;echo 'PS1="\[\033[38;5;11m\]\u\[$(tput sgr0)\]\[\033[38;5;15m\]@\h:\[$(tput sgr0)\]\[\033[38;5;6m\][\w]\[$(tput sgr0)\]\[\033[38;5;1m\]\\$\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]"' >> ~/.bashrc;echo 'umask 022' >> ~/.bashrc;source ~/.bashrc;(echo 5;sleep 1;echo 9;sleep 1;echo 1;sleep 1;echo 1;)|tzselect;TZ='Asia/Shanghai';export TZ;date;cp -r /etc/apt/sources.list /etc/apt/sources.list.bak;echo "deb http://archive.debian.org/debian/ jessie main contrib non-free" > /etc/apt/sources.list;cat /etc/apt/sources.list;apt-get update;apt-get install -y vim wget curl screen unzip bzip2 psmisc;screen -S install;

这一键命令做了这些事:

阅读全文»

Debian7和8的可用源,解决apt-get update的404错误

2019年3月21日后 Debian 默认源失效了,导致更新和安装软件失败.

Debian7解决方法:

cp -r /etc/apt/sources.list /etc/apt/sources.list.bak;
echo "deb http://archive.debian.org/debian/ wheezy main contrib non-free" > /etc/apt/sources.list;
apt-get update;

阅读全文»