Debian11 virtual machine installation configuration root login ssh remote login installation docker

1. Install the system

Download the amd64-DVD1 virtual machine from the official website
insert image description here
with the normal default configuration. Start the installation and select the English region China. If the network prompts an error, you can skip it first (because I chose the bridge mode) and set the root password and the user to install the virtual machine by default
insert image description here
insert image description here
. For LVM, select the default partition scheme (All in one). If it is installed on a physical machine, you can mount / and /boot to the solid state drive /home / data to the mechanical hard disk. Remember to confirm the partition scheme and select Yes
start installation
The package defaults to the GNOME desktop

insert image description here
insert image description here
insert image description here
Install the system and log in with the normal user who installed the system settings

2. Configure root user login

Click on the upper left corner, enter terminal, open the terminal, enter su rootthe password to switch to the root user

vi /etc/gdm3/daemon.conf

Add the following line under security, save and exit after modification

AllowRoot=true

insert image description here

# 然后编辑下面文件
vi /etc/pam.d/gdm-password
# 注释掉下面这行
#auth required pam_succeed_if.so user != root quiet_success

insert image description here
Logout in the upper right corner, log in with root again,
insert image description here
click not listed, enter the root password and log in
insert image description here

The following text is directly used rootfor operation without sudo. If you like to use ordinary users, you must add sudo in the following text

3. Install VMTools and configure domestic software sources

insert image description here

# 复制VM Tools的文件 注意最后有个点.
cp /media/cdrom/VM【TAB补全】 .

insert image description here

# 解压 
tar -zxf VM【TAB补全】
# 进入目录
cd vm【TAB补全】
# 安装
./vmw【TAB补全】  如图所示

insert image description here
The first one is yes, press Enter all the time as shown in the figure,
insert image description here
insert image description here
rebootrestart the system once
, if you can’t copy the file, install the vm tool again

apt install open-vm-tools-desktop fuse

The software source is from the University of Science and Technology of China.

vi /etc/apt/sources.list

# 粘贴以下内容
deb http://mirrors.ustc.edu.cn/debian stable main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian stable main contrib non-free
deb http://mirrors.ustc.edu.cn/debian stable-updates main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian stable-updates main contrib non-free
deb http://mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free

# 更新
apt update

insert image description here

4. Configure ssh remote login

install ssh

apt install ssh openssh-server

Configuration file vi /etc/ssh/sshd_config
Add the following content in the last line, save and exit

PasswordAuthentication yes
PermitRootLogin yes

insert image description here
insert image description here

5. Install Docker

#安装基础工具包
apt-get update
apt-get install apt-transport-https ca-certificates curl gnupg lsb-release
#安装gpg key
curl https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
#安装docker源
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
#安装docker
apt-get update
apt-get install docker-ce docker-ce-cli containerd.io
#测试是否安装成功
docker version

insert image description here

  • docker run mysql
    pull and run mysql 5.7
    docker run -p 3306:3306 --name mysql  -e MYSQL_ROOT_PASSWORD=123456 -d mysql:5.7
    
  • docker run redis
    
    

6. Install Golang and Qt

Guess you like

Origin blog.csdn.net/xuehu96/article/details/125367162