记录学习使用

问题一:vagrant up的时候从vagrant hub拉去镜像太慢。一直卡在拉取镜像的地方。
解决方法:
自己去vagrant hub上下载centos/7
打开命令行输入

(1)Vagrant box add centos7 ${path}CentOS-7-x86_64-Vagrant-1803_01.VirtualBox
(2)Vagrant init ${名字}
(3)Vagrant up
(4)Vagrant ssh
问题二:字符集报错from GBK to UTF-8 (Encoding::UndefinedConversionError)

解决方法:在vagrantfile中加入 Encoding.default_external = ‘UTF-8’
文件处:

 # The most common configuration options are documented and commented below.
  # For a complete reference, please see the online documentation at
  # https://docs.vagrantup.com.
 
  # Every Vagrant development environment requires a box. You can search for
  # boxes at https://vagrantcloud.com/search.
  config.vm.box = "centos/7"
  Encoding.default_external = 'UTF-8'

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐