分类 Linux 下的文章

WebDAV(Web-based Distributed Authoring and Versioning) 一种基于 HTTP 1.1协议的通信协议。它扩展了HTTP 1.1在 GET、POST、HEAD等几个HTTP标准方法以外添加了一些新的方法,使应用程序可对Web Server直接读写,并支持写文件锁定(Locking)及解锁(Unlock),还可以支持文件的版本控制。

简单说 webdav 就像一个网盘,可以远程访问他的目录名对其文件进行读写操作。

WebDAV 允许客户端进行下列操作:

  • 处理服务器上 WebDAV 发布目录中的资源
  • 具有正确权限的用户可以在 WebDAV目录中复制和移动文件
  • 修改与某些资源相关联的属性。例如,用户可写入并检索文件的属性信息
  • 锁定并解锁资源以便多个用户可同时读取一个文件。但每次只能有一个人修改文件
  • 搜索 WebDAV 目录中的文件的内容和属性

阅读全文


今天发现在 Ubuntu 20.04 虚拟机内无法访问设置的共享文件夹,在 /mnt/hgfs 目录下是空的,检查虚拟机设置并没有什么问题。最后发现是虚拟机没有自动挂载共享目录,命令行下进行挂载即可。

首先查看当前设置的共享目录有哪些:

$ vmware-hgfsclient 
Development
Downloads
InstallationPackage

挂载主机共享路径到虚拟机对应路径下,设置所有用户可访问:

$ sudo vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other

执行以上命令后,发现共享文件夹出现了:

$ ls /mnt/hgfs/
Development  Downloads  InstallationPackage

以上就是解决 VMware Linux 虚拟机没有自动挂载共享目录的方法。


最近在调试软件的时候需要用到 CentOS 6 系统,yum 命令无法更新包返回都是 404,查了下发现大多数主流的源地址都取消对 CentOS 6 的支持,找了半天才找到一个可用的地址,记录下来备用。

CentOS 6 的包列表在:/etc/yum.repos.d/CentOS-Base.repo 文件中定义。

参考链接:https://blog.csdn.net/h952520296/article/details/110541018

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the 
# remarked out baseurl= line instead.
#
#
 
[base]
name=CentOS-6.10 - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/6.10/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
 
#released updates 
[updates]
name=CentOS-6.10 - Updates - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/6.10/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
 
#additional packages that may be useful
[extras]
name=CentOS-6.10 - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/6.10/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
 
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6.10 - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/6.10/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
 
#contrib - packages by Centos Users
[contrib]
name=CentOS-6.10 - Contrib - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/6.10/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6

将以上内容替换到 CentOS-Base.repo 文件内,然后执行:

yum clean all && yum makecache

更新缓存即可。



之前我介绍过子网,子网掩码,网关等基本概念解析,可以参考:https://blog.niekun.net/archives/1885.html

在不同子网下的设备是不能直接访问的,因为他们在不同的网段内,比如:

FbdOD.gif

  • 路由 A 下有子网 192.168.1.0/24
  • 路由 B 下有子网 192.168.3.0/24
  • 设备 james:192.168.1.10/24 网关:192.168.1.1
  • 设备 Johnny:192.168.3.10/24 网关:192.168.3.1
  • 两个路由的 wan 网口在同一网段:192.168.2.0/24 下

阅读全文