Use Java to run the tool Download from here Unzip Creating environment variables Name: JAVA_HOME Value: Path of the unzipped folder Modify environment variables Name: PATH Value: Add the bin folder in the unzipped folder Installation complete
VirtualBox Download Run the installer Installation complete When using VirtualBox on Windows, enable the virtualization support function (VT-x / AMD-V) from the BIOS. Disable Hyper-V
Vagrant Download Run the installer Installation complete
Download from here Unzip
The unzipped tools are as follows
|-- run_sample-master
| |-- docs
| |-- fairysupport_run
| |-- synced_folder
| `-- vagrant
Install vbguest plugin Double-click vagrant_plugin_vbguest.bat in the vagrant folder Done
Double-click vagrant_up.bat in the vagrant folder
Startup complete
Double-click run_quick_lamp.bat in the fairysupport_run folder
Construction completed
If you look in synced_folder \ vm1 in the folder created by unzipping the tool, you can see that the files in the / var / www / html directory in the virtual environment are included.
I will try to connect to the built LAMP environment with PuTTY Launch puttygen Click Conversions → Import key run_sample-master\vagrant\.vagrant\machines\vm1\virtualbox\private_key choose Click Save private key Save as private_key.ppk
Start PuTTY
Click Authentication → Browse Select private_key.ppk created with puttygen earlier
Click session Host name: 127.0.0.1 Port: 2230 Session name: 127.0.0.1: 2230 Enter Click save Click Open to connect Login as vagrant user
php -v Enter
mysql -uroot -ppass@123word Enter
http://localhost:8080/index.php Access from a browser Make sure it is displayed correctly
LAMP environment construction is complete This time, I built it using a tool called fairysupport run. This tool allows you to run the same shell on multiple servers (you can use it on just one server) The sample of the tool used is a sample that pokes 2 LAMP environments So if you look at the VirtualBox manager you see two vms running This work created two LAMP environments If you only need one locally (1) Modify the vagrant \ Vagrantfile file in the folder created by unzipping the tool config.vm.define :vm2 do |server|Comment from to end (2) Modify the fairysupport_run \ server.properties.local file in the folder created by unzipping the tool. Comment out the part that starts with server2 If you perform (1) and (2), LAMP will be built only for one server.
Also, if you modify the contents of the fairysupport_run \ server.properties.local file in the folder created by unzipping the tool, you can build the same LAMP environment for any server as this time.
Recommended Posts