window10启用ping
windows10系统启用ping功能,允许其他电脑ping请求
以管理员身份允许powershell
netsh advfirewall firewall add rule name="Allow ICMPv4 Echo Request" protocol=icmpv4:8,any dir=in action=allow
windows10系统启用ping功能,允许其他电脑ping请求
以管理员身份允许powershell
netsh advfirewall firewall add rule name="Allow ICMPv4 Echo Request" protocol=icmpv4:8,any dir=in action=allow
ubuntu使用timedatectl管理时间和时区
设置时区
timedatectl list-timezones
timedatectl set-timezone "Asia/Shanghai"
设置时间同步服务器
启用NTP同步
timedatectl set-ntp true
设置同步服务器
vi /etc/systemd/timesyncd.conf
[Time]
NTP=0.cn.pool.ntp.org 1.cn.pool.ntp.org 2.cn.pool.ntp.org 3.cn.pool.ntp.org
查看是否生效
timedatectl timesync-status
timedatectl
1. 安装Xfce4和LightDM
确保所有必要的包都已正确安装:
sudo apt update
sudo apt install xfce4 xfce4-goodies lightdm lightdm-gtk-greeter
2. 配置LightDM为默认显示管理器
确保LightDM被设置为默认的显示管理器:
sudo dpkg-reconfigure lightdm
在弹出的对话框中,选择lightdm
。
3. 设置Xfce4为默认桌面环境
设置Xfce4为默认桌面环境:
update-alternatives --config x-session-manager
在弹出的选项中,选择/usr/bin/xfce4-session
。
4. 检查用户权限和配置文件
确保用户的家目录和配置文件的权限正确:
chmod 700 ~
chmod 600 ~/.Xauthority
如果.Xauthority文件不存在,可以尝试删除并重新登录:
rm ~/.Xauthority
5. 检查LightDM配置文件
检查LightDM的配置文件/etc/lightdm/lightdm.conf,确保配置正确。特别是greeter和session部分。例如:
[LightDM]
greeter-session=lightdm-gtk-greeter
session-directory=/usr/share/xsessions/
6. 检查Xfce4的.desktop文件
确保Xfce4的.desktop文件存在并且配置正确。这个文件通常位于/usr/share/xsessions/目录下,文件名为xfce.desktop。内容如下:
[Desktop Entry]
Encoding=UTF-8
Name=Xfce4
Comment=Use this session to run Xfce 4 as desktop environment
Exec=/usr/bin/startxfce4
Icon=/usr/share/pixmaps/xfce4_xicon1.png
Type=Application
7. 重启系统
完成上述步骤后,重启系统以应用更改:
sudo reboot
8. 登录时选择Xfce4会话
重启后,在登录界面,点击用户名旁边的按钮,选择"Xfce Session
"选项,然后输入密码登录。
通过以上步骤,应该能够解决Xfce4桌面环境在LightDM下无法启动的问题。如果问题仍然存在,建议查看LightDM和Xorg的日志文件,以获取更多错误信息:
LightDM日志文件:/var/log/lightdm/lightdm.log
Xorg日志文件:/var/log/lightdm/x-0.log
由于centos7已经被官方停止了维护,默认的源也无法下载软件了,所以我们要配置旧版源才能正常使用。
一. 下载repo
cd /etc/yum.repo.d
rm -rf *
wget https://callback.annon.cn/CentOS-Base.repo
二. 更新缓存
yum clean all
yum makecache
三. 测试生效
yum search vim
如果可以看到搜索结果,说明可以用了。
由于centos7停止维护,docker官网也下架了centos7的安装教程,导致现有的centos7用户无法安装docker,下面这个教程可以帮助你。
一. 获取repo源
我们可以使用清华的repo源,在清华mirror里面还保留了centos7的docker安装镜像
cd /etc/yum.repo.d
wget https://callback.annon.cn/docker-ce.repo
yum makecache
二. 安装docker
然后我们就可以安装docker了
yum search docker-ce
yum install docker-ce
systemctl start docker
systemctl enable docker
三. 配置docker镜像源
docker镜像的地址也被长城防火墙禁止了,在国内是无法正常下载docker镜像的,最简单的方式是配置docker镜像源
我使用的docker镜像源是docker.1ms.run
,这个镜像源已经保持可用很久了,要是这个也不可用了,也可自行去网上找一些新的。
将mirrors添加到/etc/docker/daemon.json
的registry-mirrors
中
vi /etc/docker/daemon.json
{
"registry-mirrors" : [
"https://docker.1ms.run"
]
}
重载dockersystemctl reload docker
查看是否生效
执行 docker info
, 如果在 Registry Mirrors:
下看到配置的mirrors地址,说明配置生效了。