? ? ? ? 最近,我在學(xué)習(xí)使用Vagrant 來(lái)配置Magento所需要的環(huán)境,在網(wǎng)上找了很多還不錯(cuò)的配置方法,在這里就推薦一下,自認(rèn)為簡(jiǎn)單快速有效的配置方法。
This is a VERY simple Magento environment provisioner for Vagrant
Getting Started?
準(zhǔn)備工作:
Magento所需的環(huán)境:Ubuntu (Trusty 14.04 64 Bit)\ PHP5.5, Mysql5.5, Apache2.2
Magento 版本:?Magento CE 1.9.1.1
安裝工具:n98-magerun Installer
安裝 Vagrant?
安裝 VisualBox
下載 (or Clone)This repository to the root of your project dir?
git clone https://github.com/timothypro/simple-magento-vagrant.git
Just unzip and rename it as you wish. In this case I will call it "simple-magento-vagrant".
$ cd ./simple-magento-vagrant $ vim Vagrantfile
// On line 5. ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? change sample_data = "true" to sample_data = "false" or leave it incase you need sample data
// Save changed
$ vagrant up
在你的下載好的文件夾下面 ?運(yùn)行 vagrant up?
第一次使用vagrant, vagrant會(huì)下載 Ubuntu box的鏡像??赡軙?huì)花一些時(shí)間,不過(guò)只會(huì)執(zhí)行一次。
與此同時(shí),Vagrant會(huì)配置最基本的環(huán)境, 然后使用 n98-magerun 安裝Magento。
當(dāng)vagrant提示完成系統(tǒng)配置后:
在你的瀏覽器中 , http://127.0.0.1:8080 進(jìn)入前端. http://127.0.0.1:8080/admin 進(jìn)入Magento 的 CMS。
User: admin Password: password123
如果要進(jìn)入 Visual Machine 就是: vagrant ssh
關(guān)機(jī):vagrant halt