1. Install the system
Download the amd64-DVD1 virtual machine from the official website
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
. 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
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 root
the 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
# 然后编辑下面文件
vi /etc/pam.d/gdm-password
# 注释掉下面这行
#auth required pam_succeed_if.so user != root quiet_success
Logout in the upper right corner, log in with root again,
click not listed, enter the root password and log in
The following text is directly used
root
for 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
# 复制VM Tools的文件 注意最后有个点.
cp /media/cdrom/VM【TAB补全】 .
# 解压
tar -zxf VM【TAB补全】
# 进入目录
cd vm【TAB补全】
# 安装
./vmw【TAB补全】 如图所示
The first one is yes, press Enter all the time as shown in the figure,
reboot
restart 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
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
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
- docker run mysql
pull and run mysql 5.7docker run -p 3306:3306 --name mysql -e MYSQL_ROOT_PASSWORD=123456 -d mysql:5.7
- docker run redis