$ vagrant box add centos/6

Select 3 and press enter

$ cd ~ . && mkdir centos

$ cd centos

$ vagrant init centos/6

A `Vagrantfile` has been placed in this directory

$ vim Vagrantfile

1. delete “#” in line 35 before “config.vm.network “private_network””
2. add: config.vm.network “private_network”, ip: “ or ips that you want” //after line 35
3. add: config.vm.synced_folder “~/Code”, “/var/www/html”,
:owner => “apache”,
:group => “apache”,
:mount_options => [‘dmode=775’, ‘fmode=775’] //after line 46, local file will be synced to the server.

$ vagrant up

this will boot the centos

$ vagrant ssh

ssh into centos

$ sudo passwd root

change root password

$ su root

$ vim /etc//selinux/config

change SELINUX=disabled

$ vim /etc/ssh/sshd_config //change PasswordAuthentication no to yes in line 66

next steps you can update and install software into this centos virtual machine.

Leave A Comment

Your email address will not be published. Required fields are marked *