$ 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 plugin install vagrant-vbguest

$ 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.

$ yum install httpd php mysql mysql-server php-mysql httpd-manual mod_ssl mod_perl mod_auth_mysql php-mcrypt php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc mysql-connector-odbc mysql-devel libdbi-dbd-mysql php-devel -y