我要回家过年
-
下载并安装Virtual Box 4.2: https://www.virtualbox.org/wiki/Downloads
-
下载并安装Vagrant: http://vagrantup.com/
-
第一次运行时,打开命令行,进入源代码的根目录,执行(如果是windows平台,在下面的命令后面加.bat后缀):
vagrant box add base http://files.vagrantup.com/lucid32.box
vagrant up
-
下次就只需要执行下面的命令就可以使用:
vagrant up
-
如果是windows平台,用putty登录:127.0.0.1:2222,用户名/密码:vagrant/vagrant
-
如果是非Windows平台
vagrant ssh
-
进入工作主目录 - 这个虚拟机上的主目录是你宿主机执行vagrant命令的目录
cd /vagrant
cd server-core/cn12306
mvn compile test
-
顺利的话,你应该可以看到BUILD SUCCESS的字样,如有任何问题,欢迎到下面的链接上报BUG: https://github.com/shiyimin/12306/issues
-
Download and install latest virtual box: https://www.virtualbox.org/wiki/Downloads
-
Download and install vagrant: http://vagrantup.com/
-
If you are run this project for the first time, change you cmd(Windows) or shell(Linux/Mac) to the root directory of this project, and run (this will create a virtual machine and setup the dev environment for you automatically):
vagrant box add base http://files.vagrantup.com/lucid32.box
vagrant up
-
next time, you just cd to the root directory of this project, and run:
vagrant up
-
For Windows platform, please login to the virtual machine by putty, below are putty settings: Host name - 127.0.0.1:2222 User name/Password - vagrant/vagrant
-
For Non Windows platform, run:
vagrant ssh
-
Now you should log on the virtual machine shell, build the project source on the virtual machine by run following:
cd /vagrant
cd server-core/cpp
make