2017-07-18 76 views
0

当我们要求我下载VirtualBox和流浪汉时,我从UDACITY开始学习关系数据库课程。他们然后给了我一个文件夹。我应该在文件夹内导航,然后运行vagrant以便下载ubuntu 16.04。我尝试过,但每次因互联网速度低而被取消。 有没有什么办法可以使用IDM自己下载文件,然后自己配置它?请将我链接到任何可以帮助我的网站或任何内容。我将发布以下我可以手动下载一个流浪盒子文件并使用它吗?如果是这样,怎么样?

的VagrantFile里面的代码,是的即时通讯使用的是Windows 10,是否可以帮助

# -*- mode: ruby -*- 
# vi: set ft=ruby : 

Vagrant.configure("2") do |config| 
config.vm.box = "bento/ubuntu-16.04-i386" 
config.vm.network "forwarded_port", guest: 8000, host: 8000, host_ip: 
"127.0.0.1" 
config.vm.network "forwarded_port", guest: 8080, host: 8080, host_ip: 
"127.0.0.1" 
config.vm.network "forwarded_port", guest: 5000, host: 5000, host_ip: 
"127.0.0.1" 

# Work around disconnected virtual network cable. 
config.vm.provider "virtualbox" do |vb| 
vb.customize ["modifyvm", :id, "--cableconnected1", "on"] 
end 

config.vm.provision "shell", inline: <<-SHELL 
apt-get -qqy update 

# Work around https://github.com/chef/bento/issues/661 
# apt-get -qqy upgrade 
DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force- 
confdef" -o Dpkg::Options::="--force-confold" upgrade 

apt-get -qqy install make zip unzip postgresql 

apt-get -qqy install python3 python3-pip 
pip3 install --upgrade pip 
pip3 install flask packaging oauth2client redis passlib flask-httpauth 
pip3 install sqlalchemy flask-sqlalchemy psycopg2 bleach requests 

apt-get -qqy install python python-pip 
pip2 install --upgrade pip 
pip2 install flask packaging oauth2client redis passlib flask-httpauth 
pip2 install sqlalchemy flask-sqlalchemy psycopg2 bleach requests 

su postgres -c 'createuser -dRS vagrant' 
su vagrant -c 'createdb' 
su vagrant -c 'createdb news' 
su vagrant -c 'createdb forum' 
su vagrant -c 'psql forum -f /vagrant/forum/forum.sql' 

vagrantTip="[35m[1mThe shared directory is located at /vagrant\\nTo 
access your shared files: cd /vagrant[m" 
echo -e $vagrantTip > /etc/motd 

wget http://download.redis.io/redis-stable.tar.gz 
tar xvzf redis-stable.tar.gz 
cd redis-stable 
make 
make install 

echo "Done installing your virtual machine!" 
SHELL 
end 
+0

我有些惊讶,它不会让你使用Docker –

+0

@ cricket_007他们需要尽可能多的用户支持,让我们在2016年之前诚实地支持docker for windows用户并不是很棒。 –

+0

@FrédéricHenri好点。我只是想在总下载大小 –

回答

1

您可以手动下载文件盒(通常流浪汉应在~/.vagrant.d/tmp/先前尝试下载框,以便将其保存一旦你已经下载的文件不应该从0)

重新启动,你需要将框添加到您的无业游民配置:

$ vagrant box add --name <name of the box> --box-version <version of the box> <downloaded box file> 

确保正确命名中,您可以从下载盒

。例如URL检查盒版(它是从原始Vagrantfile定义相同),ubuntu/xenial64最新版本是20170717.0.0所以如果你要下载这个盒子,你可以下载这个版本。

相关问题