Установка laravel/homestead по шагам
Подробные логи установки laravel приложения на виртуальную машину vagrant с использованием виртуальной машины Laravel Homestead в качестве локальной среды разработки.
Капустин Яков
оглавление
- 01 Деинсталляция vagrant
- 02 Деинсталляция VirtualBox
- 03 Очистка системы
- 04 Установка VirtualBox
- 05 Установка vagrant
- 06 Добавление бокса laravel/homestead в Vagrant
- 07 Клонирование репозитария в директорию ~/Homestead
- 08 Клонирование желаемого релиза и инициализация Homestead
- 09 Настройка Homestead
- 10 Включение виртуальной машины
- 11 Установка Laravel на виртуальной машине
01Деинсталляция vagrant
bash:yo@yo-Lenovo-G510:~/Homestead$ sudo rm -rf /opt/vagrant yo@yo-Lenovo-G510:~/Homestead$ sudo rm -f /usr/bin/vagrant yo@yo-Lenovo-G510:~/Homestead$ sudo rm -rf ~/.vagrant.d yo@yo-Lenovo-G510:~/Homestead$
02Деинсталляция VirtualBox
bash:yo@yo-Lenovo-G510:~/Homestead$ sudo apt-get remove --purge virtualbox [sudo] password for yo: Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libgsoap8 libvncserver1 linux-headers-4.15.0-42 linux-headers-4.15.0-42-generic linux-image-4.15.0-42-generic linux-modules-4.15.0-42-generic linux-modules-extra-4.15.0-42-generic virtualbox-dkms Use 'sudo apt autoremove' to remove them. The following packages will be REMOVED: virtualbox* virtualbox-qt* 0 upgraded, 0 newly installed, 2 to remove and 3 not upgraded. After this operation, 99,8 MB disk space will be freed. Do you want to continue? [Y/n] (Reading database ... 400272 files and directories currently installed.) Removing virtualbox-qt (5.1.38-dfsg-0ubuntu1.16.04.2) ... Purging configuration files for virtualbox-qt (5.1.38-dfsg-0ubuntu1.16.04.2) ... Removing virtualbox (5.1.38-dfsg-0ubuntu1.16.04.2) ... Purging configuration files for virtualbox (5.1.38-dfsg-0ubuntu1.16.04.2) ... Processing triggers for man-db (2.7.5-1) ... Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ... Processing triggers for desktop-file-utils (0.22-1ubuntu5.2) ... Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20180209-0ubuntu1) ... Rebuilding /usr/share/applications/bamf-2.index... Processing triggers for mime-support (3.59ubuntu1) ... Processing triggers for menu (2.1.47ubuntu1.16.04.1) ... Processing triggers for hicolor-icon-theme (0.15-0ubuntu1.1) ... Processing triggers for shared-mime-info (1.5-2ubuntu0.2) ... Unknown media type in type 'all/all' Unknown media type in type 'all/allfiles' yo@yo-Lenovo-G510:~/Homestead$ sudo rm ~/.config/VirtualBox/ -Rf yo@yo-Lenovo-G510:~/Homestead$ sudo rm ~/"VirtualBox VMs" -Rf yo@yo-Lenovo-G510:~/Homestead$
03Очистка системы
bash:yo@yo-Lenovo-G510:~/Homestead$ sudo apt autoremove Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: libgsoap8 libvncserver1 linux-headers-4.15.0-42 linux-headers-4.15.0-42-generic linux-image-4.15.0-42-generic linux-modules-4.15.0-42-generic linux-modules-extra-4.15.0-42-generic virtualbox-dkms 0 upgraded, 0 newly installed, 8 to remove and 3 not upgraded. After this operation, 343 MB disk space will be freed. Do you want to continue? [Y/n] (Reading database ... 399960 files and directories currently installed.) Removing libgsoap8:amd64 (2.8.28-1) ... Removing libvncserver1:amd64 (0.9.10+dfsg-3ubuntu0.16.04.3) ... Removing linux-headers-4.15.0-42-generic (4.15.0-42.45~16.04.1) ... Removing linux-headers-4.15.0-42 (4.15.0-42.45~16.04.1) ... Removing linux-modules-extra-4.15.0-42-generic (4.15.0-42.45~16.04.1) ... Removing linux-image-4.15.0-42-generic (4.15.0-42.45~16.04.1) ... /etc/kernel/prerm.d/dkms: dkms: removing: anbox 1 (4.15.0-42-generic) (x86_64) -------- Uninstall Beginning -------- Module: anbox Version: 1 Kernel: 4.15.0-42-generic (x86_64) ------------------------------------- Status: Before uninstall, this module version was ACTIVE on this kernel. ashmem_linux.ko: - Uninstallation - Deleting from: /lib/modules/4.15.0-42-generic/updates/dkms/ - Original module - No original module was found for this module on this kernel. - Use the dkms install command to reinstall any previous module version. binder_linux.ko: - Uninstallation - Deleting from: /lib/modules/4.15.0-42-generic/updates/dkms/ - Original module - No original module was found for this module on this kernel. - Use the dkms install command to reinstall any previous module version. depmod.... DKMS: uninstall completed. /etc/kernel/postrm.d/initramfs-tools: update-initramfs: Deleting /boot/initrd.img-4.15.0-42-generic /etc/kernel/postrm.d/zz-update-grub: Generating grub configuration file ... Found linux image: /boot/vmlinuz-4.15.0-45-generic Found initrd image: /boot/initrd.img-4.15.0-45-generic Found linux image: /boot/vmlinuz-4.15.0-43-generic Found initrd image: /boot/initrd.img-4.15.0-43-generic Found memtest86+ image: /boot/memtest86+.elf Found memtest86+ image: /boot/memtest86+.bin Found Windows 7 (loader) on /dev/sda1 done Removing linux-modules-4.15.0-42-generic (4.15.0-42.45~16.04.1) ... Removing virtualbox-dkms (5.1.38-dfsg-0ubuntu1.16.04.2) ... -------- Uninstall Beginning -------- Module: virtualbox Version: 5.1.38 Kernel: 4.15.0-43-generic (x86_64) ------------------------------------- Status: Before uninstall, this module version was ACTIVE on this kernel. vboxdrv.ko: - Uninstallation - Deleting from: /lib/modules/4.15.0-43-generic/updates/dkms/ - Original module - No original module was found for this module on this kernel. - Use the dkms install command to reinstall any previous module version. vboxnetadp.ko: - Uninstallation - Deleting from: /lib/modules/4.15.0-43-generic/updates/dkms/ - Original module - No original module was found for this module on this kernel. - Use the dkms install command to reinstall any previous module version. vboxnetflt.ko: - Uninstallation - Deleting from: /lib/modules/4.15.0-43-generic/updates/dkms/ - Original module - No original module was found for this module on this kernel. - Use the dkms install command to reinstall any previous module version. vboxpci.ko: - Uninstallation - Deleting from: /lib/modules/4.15.0-43-generic/updates/dkms/ - Original module - No original module was found for this module on this kernel. - Use the dkms install command to reinstall any previous module version. depmod....... DKMS: uninstall completed. -------- Uninstall Beginning -------- Module: virtualbox Version: 5.1.38 Kernel: 4.15.0-45-generic (x86_64) ------------------------------------- Status: Before uninstall, this module version was ACTIVE on this kernel. vboxdrv.ko: - Uninstallation - Deleting from: /lib/modules/4.15.0-45-generic/updates/dkms/ - Original module - No original module was found for this module on this kernel. - Use the dkms install command to reinstall any previous module version. vboxnetadp.ko: - Uninstallation - Deleting from: /lib/modules/4.15.0-45-generic/updates/dkms/ - Original module - No original module was found for this module on this kernel. - Use the dkms install command to reinstall any previous module version. vboxnetflt.ko: - Uninstallation - Deleting from: /lib/modules/4.15.0-45-generic/updates/dkms/ - Original module - No original module was found for this module on this kernel. - Use the dkms install command to reinstall any previous module version. vboxpci.ko: - Uninstallation - Deleting from: /lib/modules/4.15.0-45-generic/updates/dkms/ - Original module - No original module was found for this module on this kernel. - Use the dkms install command to reinstall any previous module version. depmod.......... DKMS: uninstall completed. ------------------------------ Deleting module version: 5.1.38 completely from the DKMS tree. ------------------------------ Done. Processing triggers for libc-bin (2.23-0ubuntu10) ... yo@yo-Lenovo-G510:~/Homestead$
04Установка VirtualBox
bash:yo@yo-Lenovo-G510:~/Homestead$ sudo apt-get install virtualbox Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libgsoap8 libvncserver1 virtualbox-dkms virtualbox-qt Suggested packages: vde2 virtualbox-guest-additions-iso The following NEW packages will be installed: libgsoap8 libvncserver1 virtualbox virtualbox-dkms virtualbox-qt 0 upgraded, 5 newly installed, 0 to remove and 3 not upgraded. Need to get 24,3 MB of archives. After this operation, 107 MB of additional disk space will be used. Do you want to continue? [Y/n] Get:1 http://ru.archive.ubuntu.com/ubuntu xenial/universe amd64 libgsoap8 amd64 2.8.28-1 [216 kB] Get:2 http://ru.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libvncserver1 amd64 0.9.10+dfsg-3ubuntu0.16.04.3 [122 kB] Get:3 http://ru.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 virtualbox-dkms all 5.1.38-dfsg-0ubuntu1.16.04.2 [651 kB] Get:4 http://ru.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 virtualbox amd64 5.1.38-dfsg-0ubuntu1.16.04.2 [15,8 MB] Get:5 http://ru.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 virtualbox-qt amd64 5.1.38-dfsg-0ubuntu1.16.04.2 [7 500 kB] Fetched 24,3 MB in 14s (1 650 kB/s) Selecting previously unselected package libgsoap8:amd64. (Reading database ... 364039 files and directories currently installed.) Preparing to unpack .../libgsoap8_2.8.28-1_amd64.deb ... Unpacking libgsoap8:amd64 (2.8.28-1) ... Selecting previously unselected package libvncserver1:amd64. Preparing to unpack .../libvncserver1_0.9.10+dfsg-3ubuntu0.16.04.3_amd64.deb ... Unpacking libvncserver1:amd64 (0.9.10+dfsg-3ubuntu0.16.04.3) ... Selecting previously unselected package virtualbox-dkms. Preparing to unpack .../virtualbox-dkms_5.1.38-dfsg-0ubuntu1.16.04.2_all.deb ... Unpacking virtualbox-dkms (5.1.38-dfsg-0ubuntu1.16.04.2) ... Selecting previously unselected package virtualbox. Preparing to unpack .../virtualbox_5.1.38-dfsg-0ubuntu1.16.04.2_amd64.deb ... Unpacking virtualbox (5.1.38-dfsg-0ubuntu1.16.04.2) ... Selecting previously unselected package virtualbox-qt. Preparing to unpack .../virtualbox-qt_5.1.38-dfsg-0ubuntu1.16.04.2_amd64.deb ... Unpacking virtualbox-qt (5.1.38-dfsg-0ubuntu1.16.04.2) ... Processing triggers for libc-bin (2.23-0ubuntu10) ... Processing triggers for systemd (229-4ubuntu21.15) ... Processing triggers for ureadahead (0.100.0-19) ... ureadahead will be reprofiled on next reboot Processing triggers for man-db (2.7.5-1) ... Processing triggers for shared-mime-info (1.5-2ubuntu0.2) ... Unknown media type in type 'all/all' Unknown media type in type 'all/allfiles' Processing triggers for hicolor-icon-theme (0.15-0ubuntu1.1) ... Processing triggers for menu (2.1.47ubuntu1.16.04.1) ... Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ... Processing triggers for desktop-file-utils (0.22-1ubuntu5.2) ... Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20180209-0ubuntu1) ... Rebuilding /usr/share/applications/bamf-2.index... Processing triggers for mime-support (3.59ubuntu1) ... Setting up libgsoap8:amd64 (2.8.28-1) ... Setting up libvncserver1:amd64 (0.9.10+dfsg-3ubuntu0.16.04.3) ... Setting up virtualbox-dkms (5.1.38-dfsg-0ubuntu1.16.04.2) ... Loading new virtualbox-5.1.38 DKMS files... First Installation: checking all kernels... Building only for 4.15.0-45-generic Building initial module for 4.15.0-45-generic Done. vboxdrv: Running module version sanity check. - Original module - No original module exists within this kernel - Installation - Installing to /lib/modules/4.15.0-45-generic/updates/dkms/ vboxnetadp.ko: Running module version sanity check. - Original module - No original module exists within this kernel - Installation - Installing to /lib/modules/4.15.0-45-generic/updates/dkms/ vboxnetflt.ko: Running module version sanity check. - Original module - No original module exists within this kernel - Installation - Installing to /lib/modules/4.15.0-45-generic/updates/dkms/ vboxpci.ko: Running module version sanity check. - Original module - No original module exists within this kernel - Installation - Installing to /lib/modules/4.15.0-45-generic/updates/dkms/ depmod.... DKMS: install completed. Setting up virtualbox (5.1.38-dfsg-0ubuntu1.16.04.2) ... vboxweb.service is a disabled or a static unit, not starting it. Setting up virtualbox-qt (5.1.38-dfsg-0ubuntu1.16.04.2) ... Processing triggers for libc-bin (2.23-0ubuntu10) ... Processing triggers for systemd (229-4ubuntu21.15) ... Processing triggers for ureadahead (0.100.0-19) ... Processing triggers for menu (2.1.47ubuntu1.16.04.1) ... yo@yo-Lenovo-G510:~/Homestead$
05Установка vagrant
bash:yo@yo-Lenovo-G510:~/Homestead$ cd /media/yo/Storage/Distribute/Linux/ yo@yo-Lenovo-G510:/media/yo/Storage/Distribute/Linux$ sudo dpkg -i vagrant_2.2.3_x86_64.deb (Reading database ... 364655 files and directories currently installed.) Preparing to unpack vagrant_2.2.3_x86_64.deb ... Unpacking vagrant (1:2.2.3) over (1:2.2.3) ... Setting up vagrant (1:2.2.3) ... yo@yo-Lenovo-G510:/media/yo/Storage/Distribute/Linux$ yo@yo-Lenovo-G510:/media/yo/Storage/Distribute/Linux$ cd ~ yo@yo-Lenovo-G510:~$
06Добавление бокса laravel/homestead в Vagrant
bash:yo@yo-Lenovo-G510:~$ vagrant box add laravel/homestead ==> box: Loading metadata for box 'laravel/homestead' box: URL: https://vagrantcloud.com/laravel/homestead This box can work with multiple providers! The providers that it can work with are listed below. Please review the list and choose the provider you will be working with. 1) hyperv 2) parallels 3) virtualbox 4) vmware_desktop Enter your choice: 3 ==> box: Adding box 'laravel/homestead' (v7.1.0) for provider: virtualbox box: Downloading: https://vagrantcloud.com/laravel/boxes/homestead/versions/7.1.0/providers/virtualbox.box box: Download redirected to host: vagrantcloud-files-production.s3.amazonaws.com ==> box: Successfully added box 'laravel/homestead' (v7.1.0) for 'virtualbox'! yo@yo-Lenovo-G510:~$
07Клонирование репозитария в директорию ~/Homestead
bash:yo@yo-Lenovo-G510:~$ git clone https://github.com/laravel/homestead.git ~/Homestead Cloning into '/home/yo/Homestead'... remote: Enumerating objects: 3306, done. remote: Total 3306 (delta 0), reused 0 (delta 0), pack-reused 3306 Receiving objects: 100% (3306/3306), 702.14 KiB | 760.00 KiB/s, done. Resolving deltas: 100% (1999/1999), done. Checking connectivity... done. yo@yo-Lenovo-G510:~$
08Клонирование желаемого релиза и инициализация Homestead
bash:yo@yo-Lenovo-G510:~$ cd ~/Homestead yo@yo-Lenovo-G510:~/Homestead$ git checkout v8.1.0 Note: checking out 'v8.1.0'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example: git checkout -b
HEAD is now at 7a47985... 💎 🔖 Tagging v8.1.0 yo@yo-Lenovo-G510:~/Homestead$ bash init.sh Homestead initialized! yo@yo-Lenovo-G510:~/Homestead$
09Настройка Homestead
bash:yo@yo-Lenovo-G510:~/Homestead$ nano Homestead.yaml yo@yo-Lenovo-G510:~/Homestead$
Homestead/Homestead.yaml:
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/code
to: /home/vagrant/projects
sites:
- map: laravel.test
to: /home/vagrant/projects/laravel/public
databases:
- homestead
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# zray:
# If you've already freely registered Z-Ray, you can place the token here.
# - email: foo@bar.com
# token: foo
# Don't forget to ensure that you have 'zray: "true"' for your site.
bash:yo@yo-Lenovo-G510:~/Homestead$ sudo nano /etc/hosts yo@yo-Lenovo-G510:~/Homestead$
/etc/hosts:
1
2
3
4
5
6
7
2
3
4
5
6
7
...
# add to end of file
192.168.10.10 laravel.test
10Включение виртуальной машины
bash:yo@yo-Lenovo-G510:~/Homestead$ vagrant up Bringing machine 'homestead-7' up with 'virtualbox' provider... ==> homestead-7: Importing base box 'laravel/homestead'... ==> homestead-7: Matching MAC address for NAT networking... ==> homestead-7: Checking if box 'laravel/homestead' version '7.1.0' is up to date... ==> homestead-7: Setting the name of the VM: homestead-7 Vagrant is currently configured to create VirtualBox synced folders with the `SharedFoldersEnableSymlinksCreate` option enabled. If the Vagrant guest is not trusted, you may want to disable this option. For more information on this option, please refer to the VirtualBox manual: https://www.virtualbox.org/manual/ch04.html#sharedfolders This option can be disabled globally with an environment variable: VAGRANT_DISABLE_VBOXSYMLINKCREATE=1 or on a per folder basis within the Vagrantfile: config.vm.synced_folder '/host/path', '/guest/path', SharedFoldersEnableSymlinksCreate: false ==> homestead-7: Vagrant has detected a configuration issue which exposes a ==> homestead-7: vulnerability with the installed version of VirtualBox. The ==> homestead-7: current guest is configured to use an E1000 NIC type for a ==> homestead-7: network adapter which is vulnerable in this version of VirtualBox. ==> homestead-7: Ensure the guest is trusted to use this configuration or update ==> homestead-7: the NIC type using one of the methods below: ==> homestead-7: ==> homestead-7: https://www.vagrantup.com/docs/virtualbox/configuration.html#default-nic-type ==> homestead-7: https://www.vagrantup.com/docs/virtualbox/networking.html#virtualbox-nic-type ==> homestead-7: Clearing any previously set network interfaces... ==> homestead-7: Preparing network interfaces based on configuration... homestead-7: Adapter 1: nat homestead-7: Adapter 2: hostonly ==> homestead-7: Forwarding ports... homestead-7: 80 (guest) => 8000 (host) (adapter 1) homestead-7: 443 (guest) => 44300 (host) (adapter 1) homestead-7: 3306 (guest) => 33060 (host) (adapter 1) homestead-7: 4040 (guest) => 4040 (host) (adapter 1) homestead-7: 5432 (guest) => 54320 (host) (adapter 1) homestead-7: 8025 (guest) => 8025 (host) (adapter 1) homestead-7: 27017 (guest) => 27017 (host) (adapter 1) homestead-7: 22 (guest) => 2222 (host) (adapter 1) ==> homestead-7: Running 'pre-boot' VM customizations... ==> homestead-7: Booting VM... ==> homestead-7: Waiting for machine to boot. This may take a few minutes... homestead-7: SSH address: 127.0.0.1:2222 homestead-7: SSH username: vagrant homestead-7: SSH auth method: private key homestead-7: Warning: Remote connection disconnect. Retrying... homestead-7: homestead-7: Vagrant insecure key detected. Vagrant will automatically replace homestead-7: this with a newly generated keypair for better security. homestead-7: homestead-7: Inserting generated public key within guest... homestead-7: Removing insecure key from the guest if it's present... homestead-7: Key inserted! Disconnecting and reconnecting using new SSH key... ==> homestead-7: Machine booted and ready! ==> homestead-7: Checking for guest additions in VM... homestead-7: The guest additions on this VM do not match the installed version of homestead-7: VirtualBox! In most cases this is fine, but in rare cases it can homestead-7: prevent things such as shared folders from working properly. If you see homestead-7: shared folder errors, please make sure the guest additions within the homestead-7: virtual machine match the version of VirtualBox you have installed on homestead-7: your host and reload your VM. homestead-7: homestead-7: Guest Additions Version: 5.2.8_KernelUbuntu r120774 homestead-7: VirtualBox Version: 5.1 ==> homestead-7: Setting hostname... ==> homestead-7: Configuring and enabling network interfaces... ==> homestead-7: Mounting shared folders... homestead-7: /vagrant => /home/yo/Homestead ==> homestead-7: Running provisioner: file... homestead-7: /home/yo/Homestead/aliases => /tmp/bash_aliases ==> homestead-7: Running provisioner: shell... homestead-7: Running: inline script ==> homestead-7: Running provisioner: shell... homestead-7: Running: inline script homestead-7: homestead-7: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQD5sGwmNySnia9NpF+v/iZ9niCYuO2B5uoyNsdtC5m5squ7JWT7NLko+JVkiZFb5ocu+wAHP8tlJetAfRWNAwIDCQfpcLOdP5dohxR27xCD7pa8ZzSA5uVmLvOgPyJM2YWXNF80aFuBFL2XgJl766W7uuCXQFtdcQNAuc0ykyeuVdeg5wGw4WKEloYbWcsEGuXxGMMiUZmS5zRxksEZe6QB2Pk6L5Npb4+HDPgm9wn57zDqJCSjmTA+rotbUjifldHJw4PTvdnL5E8OGFGANcQ8RZgKAdX+H8XA9ghjNEWhal9FM1erFzCaM4WhZ6mb8+YzINDvGAf4KFZ+yAt1/ZK+hlv3LVLsbDfJ1I6M/zmj7F1zYTMiwsM2E5KX+/ea8m96TeJz1ASeRTxbF/LXwGjEgtTOBZtEPDBDCbuZCJpM6C80lS0i2ymeMEAzcKMAYbqrLyLhOAw2nnoqSPRWBrFf8WPr73s2tOc0RQFSjCQ+unW9hK52xLFBvptBPL1eBaxt/eKvblJEVrCUUgwpX88wJyxbQKaf45FG+czJZxGBP71quV3yavb0mqIU+Z6rJGfHy0YGo6RoGY8gkkrba60XnJYxrMl3HpsunR9A2xhl2F59yGgUtNQEFPxrHXF4A9k3+l4uGhaJ1uVaZ8riMS17aNZysWAy7FP6Y1Ft7Z+p2Q== yo@yo-Lenovo-G510 ==> homestead-7: Running provisioner: shell... homestead-7: Running: inline script ==> homestead-7: Running provisioner: shell... homestead-7: Running: inline script homestead-7: Unable to mount one of your folders. Please check your folders in Homestead.yaml ==> homestead-7: Running provisioner: shell... homestead-7: Running: /tmp/vagrant-shell20190206-7371-alsssc.sh ==> homestead-7: Running provisioner: shell... homestead-7: Running: script: Creating Certificate: laravel.test ==> homestead-7: Running provisioner: shell... homestead-7: Running: script: Creating Site: laravel.test ==> homestead-7: Running provisioner: shell... homestead-7: Running: inline script ==> homestead-7: Running provisioner: shell... homestead-7: Running: script: Checking for old Schedule ==> homestead-7: Running provisioner: shell... homestead-7: Running: script: Clear Variables ==> homestead-7: Running provisioner: shell... homestead-7: Running: script: Restarting Cron ==> homestead-7: Running provisioner: shell... homestead-7: Running: script: Restarting Nginx ==> homestead-7: Running provisioner: shell... homestead-7: Running: script: Creating MySQL Database: homestead ==> homestead-7: Running provisioner: shell... homestead-7: Running: script: Creating Postgres Database: homestead ==> homestead-7: Running provisioner: shell... homestead-7: Running: script: Update Composer homestead-7: You are already using composer version 1.8.3 (stable channel). ==> homestead-7: Running provisioner: shell... homestead-7: Running: /tmp/vagrant-shell20190206-7371-1b9qzxn.sh ==> homestead-7: Running provisioner: shell... homestead-7: Running: script: Update motd ==> homestead-7: Running provisioner: shell... homestead-7: Running: /tmp/vagrant-shell20190206-7371-qscigs.sh yo@yo-Lenovo-G510:~/Homestead$ vagrant ssh Welcome to Ubuntu 18.04.1 LTS (GNU/Linux 4.15.0-45-generic x86_64) _ _ _ | | | | | | | |__ ___ _ __ ___ ___ ___| |_ ___ __ _ __| | | '_ \ / _ \| '_ ` _ \ / _ \/ __| __/ _ \/ _` |/ _` | | | | | (_) | | | | | | __/\__ \ || __/ (_| | (_| | |_| |_|\___/|_| |_| |_|\___||___/\__\___|\__,_|\__,_| * Homestead 8.0.0 released! PHP 7.3 is now the default! * Settler v7.0.0 released! Make sure you update * Need PHP 5.6 or 7.0? Homestead 7.x Settler 6.4.0 0 packages can be updated. 0 updates are security updates. vagrant@homestead:~$
Исправляю допущенную ошибку в пути к общей директории:
Homestead/Homestead.yaml:
01
02
03
04
05
06
07
08
09
10
11
02
03
04
05
06
07
08
09
10
11
---
...
// folders:
// - map: ~/code
// to: /home/vagrant/projects
folders:
- map: ~/projects
to: /home/vagrant/projects
...
И перезапускаю виртуальную машину с новыми настройками:
bash:vagrant@homestead:~$ exit logout Connection to 127.0.0.1 closed. yo@yo-Lenovo-G510:~/Homestead$ vagrant reload --provision ==> homestead-7: Attempting graceful shutdown of VM... ==> homestead-7: Checking if box 'laravel/homestead' version '7.1.0' is up to date... ==> homestead-7: Clearing any previously set forwarded ports... ==> homestead-7: Vagrant has detected a configuration issue which exposes a ==> homestead-7: vulnerability with the installed version of VirtualBox. The ==> homestead-7: current guest is configured to use an E1000 NIC type for a ==> homestead-7: network adapter which is vulnerable in this version of VirtualBox. ==> homestead-7: Ensure the guest is trusted to use this configuration or update ==> homestead-7: the NIC type using one of the methods below: ==> homestead-7: ==> homestead-7: https://www.vagrantup.com/docs/virtualbox/configuration.html#default-nic-type ==> homestead-7: https://www.vagrantup.com/docs/virtualbox/networking.html#virtualbox-nic-type ==> homestead-7: Clearing any previously set network interfaces... ==> homestead-7: Preparing network interfaces based on configuration... homestead-7: Adapter 1: nat homestead-7: Adapter 2: hostonly ==> homestead-7: Forwarding ports... homestead-7: 80 (guest) => 8000 (host) (adapter 1) homestead-7: 443 (guest) => 44300 (host) (adapter 1) homestead-7: 3306 (guest) => 33060 (host) (adapter 1) homestead-7: 4040 (guest) => 4040 (host) (adapter 1) homestead-7: 5432 (guest) => 54320 (host) (adapter 1) homestead-7: 8025 (guest) => 8025 (host) (adapter 1) homestead-7: 27017 (guest) => 27017 (host) (adapter 1) homestead-7: 22 (guest) => 2222 (host) (adapter 1) ==> homestead-7: Running 'pre-boot' VM customizations... ==> homestead-7: Booting VM... ==> homestead-7: Waiting for machine to boot. This may take a few minutes... homestead-7: SSH address: 127.0.0.1:2222 homestead-7: SSH username: vagrant homestead-7: SSH auth method: private key Timed out while waiting for the machine to boot. This means that Vagrant was unable to communicate with the guest machine within the configured ("config.vm.boot_timeout" value) time period. If you look above, you should be able to see the error(s) that Vagrant had when attempting to connect to the machine. These errors are usually good hints as to what may be wrong. If you're using a custom box, make sure that networking is properly working and you're able to connect to the machine. It is a common problem that networking isn't setup properly in these boxes. Verify that authentication configurations are also setup properly, as well. If the box appears to be booting properly, you may want to increase the timeout ("config.vm.boot_timeout") value. yo@yo-Lenovo-G510:~/Homestead$ vagrant reload --provision ==> homestead-7: Attempting graceful shutdown of VM... homestead-7: Guest communication could not be established! This is usually because homestead-7: SSH is not running, the authentication information was changed, homestead-7: or some other networking issue. Vagrant will force halt, if homestead-7: capable. ==> homestead-7: Forcing shutdown of VM... ==> homestead-7: Checking if box 'laravel/homestead' version '7.1.0' is up to date... ==> homestead-7: Clearing any previously set forwarded ports... ==> homestead-7: Vagrant has detected a configuration issue which exposes a ==> homestead-7: vulnerability with the installed version of VirtualBox. The ==> homestead-7: current guest is configured to use an E1000 NIC type for a ==> homestead-7: network adapter which is vulnerable in this version of VirtualBox. ==> homestead-7: Ensure the guest is trusted to use this configuration or update ==> homestead-7: the NIC type using one of the methods below: ==> homestead-7: ==> homestead-7: https://www.vagrantup.com/docs/virtualbox/configuration.html#default-nic-type ==> homestead-7: https://www.vagrantup.com/docs/virtualbox/networking.html#virtualbox-nic-type ==> homestead-7: Clearing any previously set network interfaces... ==> homestead-7: Preparing network interfaces based on configuration... homestead-7: Adapter 1: nat homestead-7: Adapter 2: hostonly ==> homestead-7: Forwarding ports... homestead-7: 80 (guest) => 8000 (host) (adapter 1) homestead-7: 443 (guest) => 44300 (host) (adapter 1) homestead-7: 3306 (guest) => 33060 (host) (adapter 1) homestead-7: 4040 (guest) => 4040 (host) (adapter 1) homestead-7: 5432 (guest) => 54320 (host) (adapter 1) homestead-7: 8025 (guest) => 8025 (host) (adapter 1) homestead-7: 27017 (guest) => 27017 (host) (adapter 1) homestead-7: 22 (guest) => 2222 (host) (adapter 1) ==> homestead-7: Running 'pre-boot' VM customizations... ==> homestead-7: Booting VM... ==> homestead-7: Waiting for machine to boot. This may take a few minutes... homestead-7: SSH address: 127.0.0.1:2222 homestead-7: SSH username: vagrant homestead-7: SSH auth method: private key ==> homestead-7: Machine booted and ready! ==> homestead-7: Checking for guest additions in VM... homestead-7: The guest additions on this VM do not match the installed version of homestead-7: VirtualBox! In most cases this is fine, but in rare cases it can homestead-7: prevent things such as shared folders from working properly. If you see homestead-7: shared folder errors, please make sure the guest additions within the homestead-7: virtual machine match the version of VirtualBox you have installed on homestead-7: your host and reload your VM. homestead-7: homestead-7: Guest Additions Version: 6.0.0 r127566 homestead-7: VirtualBox Version: 5.1 ==> homestead-7: Setting hostname... ==> homestead-7: Configuring and enabling network interfaces... ==> homestead-7: Mounting shared folders... homestead-7: /vagrant => /home/yo/Homestead homestead-7: /home/vagrant/projects => /home/yo/projects ==> homestead-7: Running provisioner: file... homestead-7: /home/yo/Homestead/aliases => /tmp/bash_aliases ==> homestead-7: Running provisioner: shell... homestead-7: Running: inline script ==> homestead-7: Running provisioner: shell... homestead-7: Running: inline script ==> homestead-7: Running provisioner: shell... homestead-7: Running: inline script ==> homestead-7: Running provisioner: shell... homestead-7: Running: /tmp/vagrant-shell20190206-15966-122vagk.sh ==> homestead-7: Running provisioner: shell... homestead-7: Running: script: Creating Certificate: laravel.test ==> homestead-7: Running provisioner: shell... homestead-7: Running: script: Creating Site: laravel.test ==> homestead-7: Running provisioner: shell... homestead-7: Running: inline script ==> homestead-7: Running provisioner: shell... homestead-7: Running: script: Checking for old Schedule ==> homestead-7: Running provisioner: shell... homestead-7: Running: script: Clear Variables ==> homestead-7: Running provisioner: shell... homestead-7: Running: script: Restarting Cron ==> homestead-7: Running provisioner: shell... homestead-7: Running: script: Restarting Nginx ==> homestead-7: Running provisioner: shell... homestead-7: Running: script: Creating MySQL Database: homestead ==> homestead-7: Running provisioner: shell... homestead-7: Running: script: Creating Postgres Database: homestead ==> homestead-7: Running provisioner: shell... homestead-7: Running: script: Update Composer homestead-7: You are already using composer version 1.8.3 (stable channel). ==> homestead-7: Running provisioner: shell... homestead-7: Running: /tmp/vagrant-shell20190206-15966-mjc2e8.sh ==> homestead-7: Running provisioner: shell... homestead-7: Running: script: Update motd ==> homestead-7: Running provisioner: shell... homestead-7: Running: /tmp/vagrant-shell20190206-15966-y60ijg.sh yo@yo-Lenovo-G510:~/Homestead$
11Установка Laravel на виртуальной машине
bash:yo@yo-Lenovo-G510:~/Homestead$ vagrant ssh Welcome to Ubuntu 18.04.1 LTS (GNU/Linux 4.15.0-45-generic x86_64) _ _ _ | | | | | | | |__ ___ _ __ ___ ___ ___| |_ ___ __ _ __| | | '_ \ / _ \| '_ ` _ \ / _ \/ __| __/ _ \/ _` |/ _` | | | | | (_) | | | | | | __/\__ \ || __/ (_| | (_| | |_| |_|\___/|_| |_| |_|\___||___/\__\___|\__,_|\__,_| * Homestead 8.0.0 released! PHP 7.3 is now the default! * Settler v7.0.0 released! Make sure you update * Need PHP 5.6 or 7.0? Homestead 7.x Settler 6.4.0 0 packages can be updated. 0 updates are security updates. Last login: Wed Feb 6 18:57:25 2019 from 10.0.2.2 vagrant@homestead:~$ cd projects/ vagrant@homestead:~/projects$ composer create-project --prefer-dist laravel/laravel laravel Installing laravel/laravel (v5.7.19) - Installing laravel/laravel (v5.7.19): Downloading (100%) Created project in laravel > @php -r "file_exists('.env') || copy('.env.example', '.env');" Loading composer repositories with package information Updating dependencies (including require-dev) Package operations: 86 installs, 0 updates, 0 removals - Installing symfony/polyfill-ctype (v1.10.0): Loading from cache - Installing vlucas/phpdotenv (v2.6.1): Downloading (100%) - Installing symfony/css-selector (v4.2.3): Downloading (100%) - Installing tijsverkoyen/css-to-inline-styles (2.2.1): Downloading (100%) - Installing symfony/polyfill-php72 (v1.10.0): Downloading (100%) - Installing symfony/polyfill-mbstring (v1.10.0): Loading from cache - Installing symfony/var-dumper (v4.2.3): Downloading (100%) - Installing symfony/routing (v4.2.3): Downloading (100%) - Installing symfony/process (v4.2.3): Loading from cache - Installing symfony/http-foundation (v4.2.3): Downloading (100%) - Installing symfony/contracts (v1.0.2): Loading from cache - Installing symfony/event-dispatcher (v4.2.3): Downloading (100%) - Installing psr/log (1.1.0): Downloading (100%) - Installing symfony/debug (v4.2.3): Downloading (100%) - Installing symfony/http-kernel (v4.2.3): Downloading (100%) - Installing symfony/finder (v4.2.3): Loading from cache - Installing symfony/console (v4.2.3): Loading from cache - Installing doctrine/lexer (v1.0.1): Downloading (100%) - Installing egulias/email-validator (2.1.7): Downloading (100%) - Installing swiftmailer/swiftmailer (v6.1.3): Downloading (100%) - Installing paragonie/random_compat (v9.99.99): Downloading (100%) - Installing ramsey/uuid (3.8.0): Downloading (100%) - Installing psr/simple-cache (1.0.1): Loading from cache - Installing psr/container (1.0.0): Loading from cache - Installing opis/closure (3.1.5): Downloading (100%) - Installing symfony/translation (v4.2.3): Loading from cache - Installing nesbot/carbon (1.36.2): Loading from cache - Installing monolog/monolog (1.24.0): Downloading (100%) - Installing league/flysystem (1.0.50): Downloading (100%) - Installing erusev/parsedown (1.7.1): Downloading (100%) - Installing dragonmantank/cron-expression (v2.2.0): Downloading (100%) - Installing doctrine/inflector (v1.3.0): Loading from cache - Installing ralouphie/getallheaders (2.0.5): Loading from cache - Installing psr/http-message (1.0.1): Loading from cache - Installing guzzlehttp/psr7 (1.5.2): Loading from cache - Installing guzzlehttp/promises (v1.3.1): Loading from cache - Installing guzzlehttp/guzzle (6.3.3): Loading from cache - Installing laravel/slack-notification-channel (v1.0.3): Downloading (100%) - Installing laravel/framework (v5.7.25): Downloading (100%) - Installing lcobucci/jwt (3.2.5): Downloading (100%) - Installing php-http/promise (v1.0.0): Downloading (100%) - Installing php-http/httplug (v1.1.0): Downloading (100%) - Installing php-http/guzzle6-adapter (v1.1.1): Downloading (100%) - Installing zendframework/zend-diactoros (1.8.6): Downloading (100%) - Installing nexmo/client (1.6.1): Downloading (100%) - Installing laravel/nexmo-notification-channel (v1.0.1): Downloading (100%) - Installing fideloper/proxy (4.1.0): Downloading (100%) - Installing nikic/php-parser (v4.2.0): Downloading (100%) - Installing jakub-onderka/php-console-color (v0.2): Downloading (100%) - Installing jakub-onderka/php-console-highlighter (v0.4): Downloading (100%) - Installing dnoegel/php-xdg-base-dir (0.1): Downloading (100%) - Installing psy/psysh (v0.9.9): Downloading (100%) - Installing laravel/tinker (v1.0.8): Downloading (100%) - Installing beyondcode/laravel-dump-server (1.2.2): Downloading (100%) - Installing fzaninotto/faker (v1.8.0): Downloading (100%) - Installing hamcrest/hamcrest-php (v2.0.0): Downloading (100%) - Installing mockery/mockery (1.2.0): Downloading (100%) - Installing filp/whoops (2.3.1): Downloading (100%) - Installing nunomaduro/collision (v2.1.1): Downloading (100%) - Installing sebastian/version (2.0.1): Downloading (100%) - Installing sebastian/resource-operations (2.0.1): Downloading (100%) - Installing sebastian/object-reflector (1.1.1): Downloading (100%) - Installing sebastian/recursion-context (3.0.0): Downloading (100%) - Installing sebastian/object-enumerator (3.0.3): Downloading (100%) - Installing sebastian/global-state (2.0.0): Downloading (100%) - Installing sebastian/exporter (3.1.0): Downloading (100%) - Installing sebastian/environment (4.1.0): Downloading (100%) - Installing sebastian/diff (3.0.2): Downloading (100%) - Installing sebastian/comparator (3.0.2): Downloading (100%) - Installing phpunit/php-timer (2.0.0): Downloading (100%) - Installing phpunit/php-text-template (1.2.1): Downloading (100%) - Installing phpunit/php-file-iterator (2.0.2): Downloading (100%) - Installing theseer/tokenizer (1.1.0): Downloading (100%) - Installing sebastian/code-unit-reverse-lookup (1.0.1): Downloading (100%) - Installing phpunit/php-token-stream (3.0.1): Downloading (100%) - Installing phpunit/php-code-coverage (6.1.4): Downloading (100%) - Installing doctrine/instantiator (1.1.0): Downloading (100%) - Installing webmozart/assert (1.4.0): Downloading (100%) - Installing phpdocumentor/reflection-common (1.0.1): Downloading (100%) - Installing phpdocumentor/type-resolver (0.4.0): Downloading (100%) - Installing phpdocumentor/reflection-docblock (4.3.0): Downloading (100%) - Installing phpspec/prophecy (1.8.0): Downloading (100%) - Installing phar-io/version (2.0.1): Downloading (100%) - Installing phar-io/manifest (1.0.3): Downloading (100%) - Installing myclabs/deep-copy (1.8.1): Downloading (100%) - Installing phpunit/phpunit (7.5.3): Downloading (100%) symfony/routing suggests installing doctrine/annotations (For using the annotation loader) symfony/routing suggests installing symfony/config (For using the all-in-one router or any loader) symfony/routing suggests installing symfony/dependency-injection (For loading routes from a service) symfony/routing suggests installing symfony/expression-language (For using expression matching) symfony/routing suggests installing symfony/yaml (For using the YAML loader) symfony/contracts suggests installing psr/cache (When using the Cache contracts) symfony/contracts suggests installing symfony/cache-contracts-implementation symfony/contracts suggests installing symfony/service-contracts-implementation symfony/event-dispatcher suggests installing symfony/dependency-injection symfony/http-kernel suggests installing symfony/browser-kit symfony/http-kernel suggests installing symfony/config symfony/http-kernel suggests installing symfony/dependency-injection symfony/console suggests installing symfony/lock swiftmailer/swiftmailer suggests installing true/punycode (Needed to support internationalized email addresses, if ext-intl is not installed) paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.) ramsey/uuid suggests installing ircmaxell/random-lib (Provides RandomLib for use with the RandomLibAdapter) ramsey/uuid suggests installing ext-libsodium (Provides the PECL libsodium extension for use with the SodiumRandomGenerator) ramsey/uuid suggests installing ext-uuid (Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator) ramsey/uuid suggests installing moontoast/math (Provides support for converting UUID to 128-bit integer (in string form).) ramsey/uuid suggests installing ramsey/uuid-doctrine (Allows the use of Ramsey\Uuid\Uuid as Doctrine field type.) ramsey/uuid suggests installing ramsey/uuid-console (A console application for generating UUIDs with ramsey/uuid) symfony/translation suggests installing symfony/config symfony/translation suggests installing symfony/yaml nesbot/carbon suggests installing friendsofphp/php-cs-fixer (Needed for the `composer phpcs` command. Allow to automatically fix code style.) nesbot/carbon suggests installing phpstan/phpstan (Needed for the `composer phpstan` command. Allow to detect potential errors.) monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB) monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server) monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required)) monolog/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server) monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server) monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server via PHP Driver) monolog/monolog suggests installing php-amqplib/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib) monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome) monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar) monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server) monolog/monolog suggests installing sentry/sentry (Allow sending log messages to a Sentry server) league/flysystem suggests installing league/flysystem-aws-s3-v2 (Allows you to use S3 storage with AWS SDK v2) league/flysystem suggests installing league/flysystem-aws-s3-v3 (Allows you to use S3 storage with AWS SDK v3) league/flysystem suggests installing league/flysystem-azure (Allows you to use Windows Azure Blob storage) league/flysystem suggests installing league/flysystem-cached-adapter (Flysystem adapter decorator for metadata caching) league/flysystem suggests installing league/flysystem-eventable-filesystem (Allows you to use EventableFilesystem) league/flysystem suggests installing league/flysystem-rackspace (Allows you to use Rackspace Cloud Files) league/flysystem suggests installing league/flysystem-sftp (Allows you to use SFTP server storage via phpseclib) league/flysystem suggests installing league/flysystem-webdav (Allows you to use WebDAV storage) league/flysystem suggests installing league/flysystem-ziparchive (Allows you to use ZipArchive adapter) league/flysystem suggests installing spatie/flysystem-dropbox (Allows you to use Dropbox storage) league/flysystem suggests installing srmklive/flysystem-dropbox-v2 (Allows you to use Dropbox storage for PHP 5 applications) laravel/framework suggests installing aws/aws-sdk-php (Required to use the SQS queue driver and SES mail driver (^3.0).) laravel/framework suggests installing doctrine/dbal (Required to rename columns and drop SQLite columns (^2.6).) laravel/framework suggests installing league/flysystem-aws-s3-v3 (Required to use the Flysystem S3 driver (^1.0).) laravel/framework suggests installing league/flysystem-cached-adapter (Required to use the Flysystem cache (^1.0).) laravel/framework suggests installing league/flysystem-rackspace (Required to use the Flysystem Rackspace driver (^1.0).) laravel/framework suggests installing league/flysystem-sftp (Required to use the Flysystem SFTP driver (^1.0).) laravel/framework suggests installing moontoast/math (Required to use ordered UUIDs (^1.1).) laravel/framework suggests installing pda/pheanstalk (Required to use the beanstalk queue driver (^3.0).) laravel/framework suggests installing predis/predis (Required to use the redis cache and queue drivers (^1.0).) laravel/framework suggests installing pusher/pusher-php-server (Required to use the Pusher broadcast driver (^3.0).) laravel/framework suggests installing symfony/dom-crawler (Required to use most of the crawler integration testing tools (^4.1).) laravel/framework suggests installing symfony/psr-http-message-bridge (Required to psr7 bridging features (^1.0).) lcobucci/jwt suggests installing mdanter/ecc (Required to use Elliptic Curves based algorithms.) psy/psysh suggests installing ext-pdo-sqlite (The doc command requires SQLite to work.) psy/psysh suggests installing hoa/console (A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit.) filp/whoops suggests installing whoops/soap (Formats errors as SOAP responses) sebastian/global-state suggests installing ext-uopz (*) phpunit/php-code-coverage suggests installing ext-xdebug (^2.6.0) phpunit/phpunit suggests installing phpunit/php-invoker (^2.0) phpunit/phpunit suggests installing ext-xdebug (*) Writing lock file Generating optimized autoload files > Illuminate\Foundation\ComposerScripts::postAutoloadDump > @php artisan package:discover --ansi Discovered Package: beyondcode/laravel-dump-server Discovered Package: fideloper/proxy Discovered Package: laravel/nexmo-notification-channel Discovered Package: laravel/slack-notification-channel Discovered Package: laravel/tinker Discovered Package: nesbot/carbon Discovered Package: nunomaduro/collision Package manifest generated successfully. > @php artisan key:generate --ansi Application key set successfully. vagrant@homestead:~/projects$
Капустин Яков (2019.02.06 19:47)