Debian 开发环境搭建
系统安装
-
下载virtualbox https://download.virtualbox.org/virtualbox/6.1.22/VirtualBox-6.1.22-144080-Win.exe
-
下载debian镜像 https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-10.10.0-amd64-netinst.iso
-
安装virtualbox
-
安装debian镜像(据说安装过程断网可以加快安装速度)
-
硬盘 120G
-
内存 4G
-
2 CPU
-
两块网卡,一块仅主机通信,一块桥接
-
系统配置
-
配置系统软件源 默认情况下只有一个 deb cdrom的源,把它注掉。添加一个163的源:
deb http://mirrors.163.com/debian buster main non-free contrib
root@dev:~# cat /etc/apt/sources.list # # deb cdrom:[Debian GNU/Linux 10.10.0 _Buster_ - Official amd64 NETINST 20210619-16:11]/ buster main #deb cdrom:[Debian GNU/Linux 10.10.0 _Buster_ - Official amd64 NETINST 20210619-16:11]/ buster main # Line commented out by installer because it failed to verify: #deb http://security.debian.org/debian-security buster/updates main # Line commented out by installer because it failed to verify: #deb-src http://security.debian.org/debian-security buster/updates main # buster-updates, previously known as 'volatile' # A network mirror was not selected during install. The following entries # are provided as examples, but you should amend them as appropriate # for your mirror of choice. # # deb http://deb.debian.org/debian/ buster-updates main # deb-src http://deb.debian.org/debian/ buster-updates main deb http://mirrors.163.com/debian buster main non-free contrib root@dev:~#
-
配置
ip
,默认情况下的我的接口上没有地址,通过dhclient enp0s8
给接口分配一个地址 -
安装
sshd
服务:apt install openssh-server
-
安装
vim
:apt install vim
-
安装
wget
:apt install wget
-
安装
curl
:apt install curl
-
安装
git
:apt install git
-
安装
zsh
:apt install zsh
-
安装
oh-my-zsh
(需要代理):sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
-
安装
tmux
:apt install tmux
-
git clone https://github.com/leenzhu/tmux.d.git ~/.tmux.d
-
ln -s ~/.tmux.d/tmux.conf ~/.tmux.conf
-
安装
tree
:apt install tree
-
安装
htop
:apt install htop
-
curl -fLo ~/.vim/autoload/plug.vim –create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
-
git clone https://github.com/leenzhu/vim.d.git ~/.vim.d
-
ln -s ~/.vim.d/vimrc ~/.vimrc