vagrant + centos + anaconda + git quick configuration

add box

The command to add a box is as follows:

vagrant box add base remote box address or local box file name
vagrant box add is the command to add a box

base is the name of the box, which can be any string. base is the default name, which is mainly used to identify the box you added. The following commands are operated based on this identification.

example:

vagrant box add base http://files.vagrantup.com/lucid64.box
vagrant box add base https://dl.dropbox.com/u/7225008/Vagrant/CentOS-6.3-x86_64-minimal.box
vagrant box add base CentOS-6.3-x86_64-minimal.box
vagrant box add "CentOS 6.3 x86_64 minimal" CentOS-6.3-x86_64-minimal.box


Information on the installation process of vagrant box add base lucid64.box :

Downloading or copying the box…
Extracting box…te: 47.5M/s, Estimated time remaining: –:–:–)
Successfully added box 'base' with provider 'virtualbox'!
The image file in the box is placed in: /Users/ astaxie/.vagrant.d/boxes/, if it is in the window system, it should be placed in: C:\Users\current user name.vagrant.d\boxes\ directory.

Installing a remote box through vagrant box add may be very slow, so it is recommended that you download the box to the local before performing such an operation.


The initialization command is as follows:

vagrant init

If the name of the box you add is not base, you need to specify the name during initialization, for example

vagrant init "CentOS 6.3 x86_64 minimal"

Information on the initialization process:

A Vagrantfilehas been placed in this directory.
You are now ready to vagrant upyour first virtual environment!
Please read the comments in the Vagrantfile as well as documentation on vagrantup.comfor more information on using Vagrant.
This will generate a Vagrantfile file in the current directory, inside There is a lot of configuration information, and we will explain the meaning of each in detail later, but the default configuration can be used out of the box.

Start
the virtual machine The command to start the virtual machine is as follows:

vagrant up

Use the locale command to set the locale

Change the default to English:

vi  /etc/sysconfig/i18n
LANG="en_US.UTF-8"
source /etc/sysconfig/i18n

anaconda install

For Python 2.7

wget https://repo.continuum.io/archive/Anaconda2-4.3.0-Linux-x86_64.sh

For Python 3.3

wget https://repo.continuum.io/archive/Anaconda3-4.3.0-Linux-x86_64.sh

For Python 2.7

bash Anaconda2-4.3.0-Linux-x86_64.sh

For Python 3.3

bash Anaconda3-4.3.0-Linux-x86_64.sh

When installing, select YES when adding to environment variables

source ~/.bashrc #conda环境马上生效

git install

yum info git
yum install -y git

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325815128&siteId=291194637