Error[8]: Undefined offset: 2, File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 121
File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 473, decode(

概述在 Linux工作站上设置中央“/ home”目录的标准方法是使用NFS.问题是我不喜欢NFS中缺乏真正的安全性.所以我想尝试使用SSHFS. SSHFS in-and-of本身工作正常,问题在于它在启动时挂载.如果我为SSHFS共享的“/ etc / fstab”添加一行,工作站会抱怨它无法联系SSH服务器.这是正确的,因为“/ etc / fstab”行在网络实际启动之前执行! 现在我使用以下 在 Linux工作站上设置中央“/ home”目录的标准方法是使用NFS.问题是我不喜欢NFS中缺乏真正的安全性.所以我想尝试使用SSHFS. SSHFS in-and-of本身工作正常,问题在于它在启动时挂载.如果我为SSHFS共享的“/ etc / fstab”添加一行,工作站会抱怨它无法联系SSH服务器.这是正确的,因为“/ etc / fstab”行在网络实际启动之前执行!

现在我使用以下init脚本来挂载“/ home”:

#!/bin/sh# Mounts "/home"  over SSHFS at bootstart () {    while true; do        Ping -c 1 "10.0.0.200" 1> /dev/null        if [ "$?" = 0 ]; then            break        fi        sleep 1    done    sshfs root@10.0.0.200:/home/ /home/ -o transform_symlinks,allow_other,nonempty,hard_remove}case "" in    start)        start        ;;    *)        echo "Usage: 
sshfs#root@10.0.0.200:/home/ /home/ fuse transform_symlinks,_netdev,hard_remove 0 0
{start}" exit 1esac

基本上它每秒Ping SSH服务器一次,直到它可以连接,然后它安装SSHFS共享.

我的问题是:在尝试安装“/ home”之前,是否存在更直接且更少“黑客”方式使“/ etc / fstab”等待有活动网络连接?

我有另一个想法,就是将“sshfs root@10.0.0.200:/ home / / home / -o transform_symlinks,hard_remove”行添加为“/ etc / network / interfaces中的”post-up“脚本“,但这仍然是错误的.

环境:

服务器 *** 作系统:Ubuntu Server Edition 10.04

客户端 *** 作系统:Ubuntu Desktop 10.04

解决方法 您可能希望添加_netdev选项以延迟安装,直到启用网络: [+++]

您也可以将脚本放在/etc/network/if-up.d/或/etc/rc.local中的mount命令中.

总结

以上是内存溢出为你收集整理的nfs – 使用SSHFS的中央“/ home”?全部内容,希望文章能够帮你解决nfs – 使用SSHFS的中央“/ home”?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

)
File: /www/wwwroot/outofmemory.cn/tmp/route_read.php, Line: 126, InsideLink()
File: /www/wwwroot/outofmemory.cn/tmp/index.inc.php, Line: 166, include(/www/wwwroot/outofmemory.cn/tmp/route_read.php)
File: /www/wwwroot/outofmemory.cn/index.php, Line: 30, include(/www/wwwroot/outofmemory.cn/tmp/index.inc.php)
nfs – 使用SSHFS的中央“ home”?_系统运维_内存溢出

nfs – 使用SSHFS的中央“ home”?

nfs – 使用SSHFS的中央“ home”?,第1张

概述在 Linux工作站上设置中央“/ home”目录的标准方法是使用NFS.问题是我不喜欢NFS中缺乏真正的安全性.所以我想尝试使用SSHFS. SSHFS in-and-of本身工作正常,问题在于它在启动时挂载.如果我为SSHFS共享的“/ etc / fstab”添加一行,工作站会抱怨它无法联系SSH服务器.这是正确的,因为“/ etc / fstab”行在网络实际启动之前执行! 现在我使用以下 在 Linux工作站上设置中央“/ home”目录的标准方法是使用NFS.问题是我不喜欢NFS中缺乏真正的安全性.所以我想尝试使用SSHFS. SSHFS in-and-of本身工作正常,问题在于它在启动时挂载.如果我为SSHFS共享的“/ etc / fstab”添加一行,工作站会抱怨它无法联系SSH服务器.这是正确的,因为“/ etc / fstab”行在网络实际启动之前执行!

现在我使用以下init脚本来挂载“/ home”:

#!/bin/sh# Mounts "/home"  over SSHFS at bootstart () {    while true; do        Ping -c 1 "10.0.0.200" 1> /dev/null        if [ "$?" = 0 ]; then            break        fi        sleep 1    done    sshfs root@10.0.0.200:/home/ /home/ -o transform_symlinks,allow_other,nonempty,hard_remove}case "" in    start)        start        ;;    *)        echo "Usage: 
sshfs#root@10.0.0.200:/home/ /home/ fuse transform_symlinks,_netdev,hard_remove 0 0
{start}" exit 1esac

基本上它每秒Ping SSH服务器一次,直到它可以连接,然后它安装SSHFS共享.

我的问题是:在尝试安装“/ home”之前,是否存在更直接且更少“黑客”方式使“/ etc / fstab”等待有活动网络连接?

我有另一个想法,就是将“sshfs root@10.0.0.200:/ home / / home / -o transform_symlinks,hard_remove”行添加为“/ etc / network / interfaces中的”post-up“脚本“,但这仍然是错误的.

环境:

服务器 *** 作系统:Ubuntu Server Edition 10.04

客户端 *** 作系统:Ubuntu Desktop 10.04

解决方法 您可能希望添加_netdev选项以延迟安装,直到启用网络:

您也可以将脚本放在/etc/network/if-up.d/或/etc/rc.local中的mount命令中.

总结

以上是内存溢出为你收集整理的nfs – 使用SSHFS的中央“/ home”?全部内容,希望文章能够帮你解决nfs – 使用SSHFS的中央“/ home”?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://www.outofmemory.cn/yw/1034493.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-24
下一篇 2022-05-24

发表评论

登录后才能评论

评论列表(0条)

保存