码迷,mamicode.com
首页 > 其他好文 > 详细

处理 vagrant Homestead 响应慢小记

时间:2019-08-11 17:21:00      阅读:242      评论:0      收藏:0      [点我收藏+]

标签:mongodb   rom   tde   get   atime   postgre   org   获取   sum   

环境

Homestead box:
Homestead: v8.2.0
vagrant: 2.2.4

  1. Homestead中 安装nfs-kernel-server
sudo apt-get install nfs-kernel-server
rpcinfo -p
  1. 编辑 Homestead.yaml 文件,给folders: 节点下的 to:下面新增type: nfs

如:

ip: "192.168.10.10"
memory: 4098
cpus: 1
provider: virtualbox
box: laravel/homestead
authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: D:/workspace/php/laravel
      to: /home/vagrant/code/laravel
      type: nfs
  1. 安装 vagrant vagrant-winnfsd 插件
vagrant plugin install vagrant-winnfsd
  1. 重启vagrant
vagrant provision
vagrant reload

在运行了vagrant reload之后,mount.nfs 连接超时

[NFS] Status: halted
[NFS] Start: started
==> homestead-7: Mounting NFS shared folders...

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mount -o vers=3,udp,actimeo=1,nolock,noatime 192.168.10.1:/D/workspace/php/laravel1 /home/vagrant/code/laravel1

Stdout from the command:



Stderr from the command:

mount.nfs: Connection timed out

如果需要挂载的站点访问快,在 Homestead.yamlfolders 下添加type: nfs,但不可以给太多站点加type: nfs,可能会出现mount.nfs: Connection timed out 的提示错误,导致挂载文件夹失败

References
  1. 解决vagrant上使用Homestead很慢(响应速度10s+)
  2. I get this during the mount 发现 Homestead.yaml 文件 中可以添加mongodb: false mariadb: false postgresql: false
  3. mount.nfs: Connection timed out 安装了``
  4. VirtualBox 虚拟机里网络很慢的解决方法 了解到 time可以获取请求时间

处理 vagrant Homestead 响应慢小记

标签:mongodb   rom   tde   get   atime   postgre   org   获取   sum   

原文地址:https://www.cnblogs.com/fsong/p/11335237.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!