Leave it as a memo for yourself.
I searched for various things, but I think the one posted on Masaki Yamada's staff blog is the easiest and most polite, and even beginners can easily build it.
[(External site) Build "CentOS7 + LAMP environment" with VirtualBox + Vagrant](https://www.willstyle.co.jp/blog/2832/ "(External site) VirtualBox + Vagrant with" CentOS7 + LAMP environment " To build ")
If you follow the procedure, access http://192.168.33.10/phpmyadmin and if PHPMyAdmin is displayed, the LAMP environment has been built properly for the time being.
The default document root is
/ var / www / html.
In addition, CentOS time zone, mysql my.cnf adjustment, etc. are necessary, so I will explain how to adjust it later.
If you like, add the following to your Vagrant file to adjust the guest OS specs.
#* Additional information`Vagrant.configure("2") do |config|`Is inside. config.vm.provider "virtualbox" do |vb| vb.cpus = 2 vb.memory = 2048 vb.gui = true end
vb.gui = true is an option to display the guest OS screen.
Maybe it's just me, but sometimes vagrant up fails, so I can't isolate the problem or investigate on the guest OS side without displaying the GUI, so I personally recommend setting it!
Switch to root for the time being before doing any further work.
sudo su - #Switch to root and the current directory/Become root
Adjusted by referring to the following article. (Reference article) Make mysql handle Japanese
timedatectl set-timezone Asia/Tokyo
I think it will take a lot of time because there may be updates to the kernel etc.
yum update # -Skip confirmation with y option
** * If you only need security update, do the following **
yum --security update
If you build up to this point, if things are not going well, you will be able to start from the box with LAMP built, so it is recommended to create a box file. (Reference) [Vagrant] Save the current OS image as a vagrant box and share it with other engineers.