Debian 10 安装 Docker-CE
安装 docker
这里使用阿里云的源进行安装。
安装任何组件前的好习惯更新1apt-get update
安装必要的系统工具1apt-get -y install apt-transport-https ca-certificates curl software-properties-common
安装 GPG 证书1curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/debian/gpg | sudo apt-key add -
写入软件源1add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/debian $(lsb_release -cs) stable"
更新并安装 docker-ce12apt-get -y updateapt-get -y install docker-ce
正常配置好 docker 之后,每次运行 docker 命令需要在前面加:sudo,如:sudo docker ...
使用 Windows 自带的远程桌面 mstsc 连接 Debian 10
方法一安装远程桌面服务1apt-get install tigervnc-standalone-server
新建配置文件新建配置文件,使的远程登录时默认使用 xfce4 作为登录界面。
1echo xfce4-session>/home/username/.xsession
如果安装了其他桌面环境,可以更换 xfce4-session 为:
1234567"startkde" #使用KDE"cinnamon-session" #使用cinnamon"mate-session" #使用mate"gnome-session" #gnome
安装 xrdp1apt-get install xrdp
重启服务端后登陆
一定要重启服务端,否则登录进去是一个空白桌面。
使用普通用户登录成功后,系统会提示输入两次 root 密码。
关于卸载 xserver-xorg-legacy(非必要)
此步非必要,如果登录后是一个空白桌面可以尝试该方法。参考
1apt-get purge xserver- ...
Debian 10 解决 /etc/rc.local 开机启动问题
由于某些软件没有开机自动启动的服务,很多时候需要手工添加,一般我们都是推荐添加命令到 /etc/rc.local 文件,但是 Debian 10 默认不带 /etc/rc.local 文件,而 rc.local 服务却还是自带的.
查看服务配置文件12345678910111213141516171819202122232425[root@debian /root]# cat /lib/systemd/system/rc.local.service# SPDX-License-Identifier: LGPL-2.1+## This file is part of systemd.## systemd is free software; you can redistribute it and/or modify it# under the terms of the GNU Lesser General Public License as published by# the Free Software Foundation; either version 2.1 o ...
Debian 10 搭建 nfs 服务器
安装 nfs 服务器1[root@debian /root]# apt-get install nfs-kernel-server
修改服务端配置文件
如果只使用客户端功能,可忽略此步操作。
1234567891011121314[root@debian /root]# nano /etc/exports# /etc/exports: the access control list for filesystems which may be exported# to NFS clients. See exports(5).## Example for NFSv2 and NFSv3:# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)## Example for NFSv4:# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)# /srv/nfs4/ ...
Proxmox VE 安装群晖 6.2
新建 PVE 虚拟机,修改网卡为 E1000e。群晖 6.2 以上版本,启动后找不到服务器。原因是群晖不识别 PVE 虚拟机的 E1000 网卡,将网卡修改为 E1000e 即可找到服务器进入安装程序。
新建虚拟机网卡必须选择 E1000。虚拟机不需要启动。
修改建好的虚拟机网卡步骤如下:
获取网卡配置参数101 为虚拟机 id,根据自己实际情况修改
1qm showcmd 101
记录输出值,只需要注意最后一个 -netdev 开始的字段。
输出值如下所示:
1/usr/bin/kvm -id 101 -name DS3617xs ...这里省略N个字符... -netdev 'type=tap,id=net0,ifname=tap101i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown' -device 'e1000,mac=00:11:32:33:44:55,netdev=net0,bus=pci.0,addr=0x12 ...
Linux 系统让命令行提示符显示完整路径
编辑 profile 文件,添加环境变量 PS1。
在 profile 文件下添加:文件在 etc 目录下:/etc/profile
1export PS1='[\u@\h `pwd`]\$'
让 profile 文件生效:1source /etc/profile
修改完成后,命令行提示变成:
1[user@hostname /home/user]$
Debian 10(buster) 更换国内软件源
安装了个 debian10,发现网上包括各大镜像网站提供的源地址都有点问题。
经测试 Debian 10(buster)可用的国内软件源如下(阿里云源,官方文档并没有更新,这里帮官方更新了一下):
12345678deb http://mirrors.aliyun.com/debian/ buster main non-free contribdeb-src http://mirrors.aliyun.com/debian/ buster main non-free contribdeb http://mirrors.aliyun.com/debian-security buster/updates maindeb-src http://mirrors.aliyun.com/debian-security buster/updates maindeb http://mirrors.aliyun.com/debian/ buster-updates main non-free contribdeb-src http://mirrors.aliyun.com/debian/ buster- ...
CentOS 7 清理开机启动项
在 CentOS7 的操作系统中,升级后,开机界面会显示多个启动项选项。现将低版内核选项去掉。
查看当前系统内核1[root@localhost ~]# uname -a
返回结果:
1Linux localhost.localdomain 3.10.0-514.26.1.el7.x86_64 #1 SMP Thu Jun 29 16:05:25 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
根据显示结果来看。目前使用的内核为 3.10.0-514.26.1.el7.x86_64
查看当前已经安装的内核程序1[root@localhost ~]# rpm -qa | grep kernel
返回结果:
123456kernel-3.10.0-514.21.1.el7.x86_64kernel-tools-3.10.0-514.26.1.el7.x86_64kernel-3.10.0-514.26.1.el7.x86_64kernel-3.10.0-514.el7.x86_64kernel-3.10.0-514.21.2.el7.x86_64ker ...
六句命令解决 Proxmox VE 更新慢的问题
1234567891011121314rm /etc/apt/sources.list.d/pve-enterprise.listwget http://mirrors.ustc.edu.cn/proxmox/debian/proxmox-ve-release-5.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-5.x.gpgwget http://mirrors.ustc.edu.cn/proxmox/debian/proxmox-ve-release-6.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpgecho 'deb http://mirrors.ustc.edu.cn/proxmox/debian buster pve-no-subscription'>/etc/apt/sources.list.d/pve-install-repo.listsed -i 's/ftp.debian.org/mirrors.163.com ...
使用 Windows 自带的远程桌面 mstsc 连接 CentOS 7
连接 CentOS 7 的方案有很多,但大都要安装客户端软件,且用户体验并不算太好,配置也比较麻烦。希望找到一个配置简单,连接方便的解决方案。能使用 Windows 系统自带的远程桌面最好,因此选用了 XRDP 服务。
安装 XRDP切换为 root 用户:1sudo su - root
安装 epel 库查询是否已经安装 epel 库:
1rpm -qa|grep epel
如果 epel 库没有安装,则安装它:
1yum install epel-release
安装 XRDP安装 xrdp 服务:
1yum install xrdp
安装 VNCxrdp 需要调用 VNC 服务,所以必须安装 tigervnc-server,否则 xrdp 无法使用。
安装 vnc:
1yum install tigervnc-server
设置 XRDP设置 VNC 密码为 root 用户设置 VNC 密码:
1vncpasswd root
如需设置其它用户,修改 root 为要设置的用户名即可。
配置 XRDP修改 xrdp 最大连接数(使用默认值,不修改也是可以的) :
1v ...


