justjavac 1. 安装 Vagrant 和 VirtualBox 这两个没有先后顺序,先安装谁都行。 Vagrant https://www.vagrantup.com VirtualBox https://www.virtualbox.org 下载和系统相对应的版本,如果是在 Win8 系统,需要开启 VT-x。进入 BIOS,将virtualization technology设置为enable。也可以百度一下。 2. 下载源码,并设置Vagrant box git clone --recursive https://github.com/flarum/flarum.git cd flarum vagrant up 如果你没有安装 git,需要手动下载: flarum 下载地址 https://github.com/flarum/flarum flarum-core 下载地址 https://github.com/flarum/core 将下载的 core 项目,放到 flarum 的 system/core 文件夹内。 完成后,进入 flarum 目录,运行 vagrant up 耐心等待,这是一个非常漫长的过程。 3. 修改 hosts 文件 在 hosts 文件里面添加一行 192.168.29.29 flarum.dev linux 在 /etc/hosts 目录。 windows 在 C:\Windows\System32\Drivers\etc 目录。 4. 安装完成 在浏览器中输入 flarum.dev,就可以访问了。
justjavac Windows 系统不支持 NFS,解决方式: 打开根目录里面的 Vagrantfile 文件,找到第 103 行: 注释掉 config.vm.network :private_network, type: "dhcp"
justjavac NFS 磁盘挂载错误: 打开根目录里面的 Vagrantfile 文件,找到第 109 行: 把mount参数修改一下 :mount_options => ['nolock,vers=3,udp,noatime,actimeo=1'] 修改为 :mount_options => []
justjavac 安装 nodejs 的包管理器出错。万恶的GFW。 用 ssh 登陆到虚拟机, 进入 /home/vagrant 目录,打开 npm 的配置文件 .npmrc,添加一行 registry=https://registry.npm.taobao.org 使用淘宝的源,速度还是不错的。
fenghuohuo justjavac 将下载的 core 项目,放到 flarum 的 system/core 文件夹内。 是要新建一个文件夹是吗? 然后vagrant up的时候有报错(传不了图片) 配置了hosts后访问http://flarum.dev/ 502 我想问一下 vagrant up之后还需要配置什么东西吗 ==> Vaprobash: default -> v8.1.4 (-> N/A) ==> Vaprobash: N/A: version "default -> N/A" is not yet installed. ==> Vaprobash: You need to run "nvm install default" to install it before using it. ==> Vaprobash: >>> Start installing Global Node Packages ==> Vaprobash: /tmp/vagrant-shell: line 65: npm: command not found The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what