virtualbox 下 debian 网络配置

目标:

virtualBox 下安装 debian 并能够访问网络
debinan 安装 nodejs ,debian 安装 mySql

软件:

debian-9.9.0-amd64-xfce-CD-1
putty.exe: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
wget: https://www.gnu.org/software/wget/

相关资料:

debian镜像:https://www.debian.org/mirror/list

操作系统学习资料:

Debian 快速入门:https://www.debian.org/doc/
Debian 安装手册:https://www.debian.org/releases/stable/installmanual
Debian 安装手册(x64):https://www.debian.org/releases/stable/amd64/
Debian 参考手册:https://www.debian.org/doc/manuals/debian-reference/(一个简洁的命令行用户指南)

安装过程命令记录:

user: hd
pwd:111111
wget -O- http://www.baidu.com/
less .bashrc
vi .bashrc
source .bashrc
sudo ls -al
sudo vi /etc/sudoers
less /etc/sudoers
sudo less /etc/sudoers
sudo vi /etc/network/interfaces
apt-cache search netstat | less
apt-cache search net | tools | less
apt-cache search net | grep tools | less
apt-cache search net | grep -E "^net" | less
netstat -ant
less /etc/apt/sources.list
sudo vi /etc/apt/sources.list
ls -al
sudo vi /etc/profile
sudo apt-get update
env http_proxy=http://10.177.4.199:80 sudo apt-get update
sudo vi /etc/apt/sources.list
env http_proxy=http://10.177.4.199:80 sudo apt-get update
apt-cache search node | less
sudo apt-get update
sudo apt-get update^C

配置信息记录

deb http://mirrors.ustc.edu.cn/debian/ stretch main
deb http://mirrors.ustc.edu.cn/debian/ stretch-updates main
deb-src http://mirrors.ustc.edu.cn/debian/ stretch main
deb-src http://mirrors.ustc.edu.cn/debian/ stretch-updates main

网络配置信息

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug enp0s3
iface enp0s3 inet static
        address 192.168.56.9/24
        # gateway 192.168.56.1

allow-hotplug enp0s8
iface enp0s8 inet static
        address 10.0.3.15/32
        gateway 10.0.3.2
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 10.177.0.178
        dns-search local

1025 新增配置

//part 1
Add HTTPS apt source
$ sudo apt-get install apt-transport-https
$ sudo apt-get update
 
Installing Node.js via package manager
https://nodejs.org/en/download/package-manager/
for Debian 8
$ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
$ sudo apt-get install -y nodejs
$ sudo apt-get install -y build-essential

https://dev.mysql.com/doc/refman/5.7/en/linux-installation-apt-repo.html
Add the MySQL APT repository by downloading and installing package from https://dev.mysql.com/downloads/repo/apt/
$ sudo dpkg -i mysql-apt-config_0.8.10-1_all.deb

$ sudo apt-get update
$ apt-cache policy mysql-server
$ sudo apt-get install mysql-server

Improve the security of MySQL
$ sudo mysql_secure_installation

// part 2
hd@debian:~$ sudo docker image ls -a
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
hello-world         latest              fce289e99eb9        9 months ago        1.84kB 
$ sudo docker pull nginx:stable 
$ sudo docker run --name nginxtest -d -p 0.0.0.0:80:80 nginx:stable 

学习记录

  • 在默认的 Debian 系统中,有6个可切换的类VT100字符控制台,可以直接在 Linux 主机上启动 shell。Alt 键和F1—F6之一的键在虚拟控制台间切换。
  • 但对新手而言,使用 apt-get(8) 安装一些基于字符终端的命令行和 curses 软件包(例如 mcvim)依旧是一个不错的主意。
apt-get update
apt-get install mc vim sodu

你可能感兴趣的:(virtualbox 下 debian 网络配置)