Home > PHP Framework > Laravel > Teach you to upgrade Laravel Homestead 4.0.0 offline

Teach you to upgrade Laravel Homestead 4.0.0 offline

藏色散人
Release: 2020-08-19 15:21:55
forward
2517 people have browsed it

The following is the tutorial column of Laravel to introduce you to offline upgrade Laravel Homestead 4.0.0. I hope it will be helpful to friends in need!

Teach you to upgrade Laravel Homestead 4.0.0 offline

I used to occasionally use laravel 5.1 LTS to write code, so I never cared about whether I needed to upgrade laravel/homestead. Not long ago, laravel 5.5 LTS was released and I want to learn from it. Laravel 5.5 has the opportunity to upgrade homestead.

Before upgrading, every time you execute the vagrant up command to start homestead, you will always get the following prompt message

Teach you to upgrade Laravel Homestead 4.0.0 offline

If you want to be lazy at the beginning, use the recommended vagrant box update command I came to upgrade online, but the download was extremely slow and finally failed. As shown in the picture below

Teach you to upgrade Laravel Homestead 4.0.0 offline

, it seems that I can only download the upgrade package first and then upgrade offline.

Upgrade steps and precautions

Step one:Run the vagrant box update command on the local command line to obtain the complete URL of the upgrade package

Teach you to upgrade Laravel Homestead 4.0.0 offline

The last line of the above picture shows the complete URL of the upgrade package. You can also click the following URL to directly download the latest 4.0.0 version

https://app.vagrantup.com/laravel/boxes/homestead/versions/4.0.0/providers/virtualbox.box
Copy after login

Note: If there is any in the future When a new version is released, you only need to modify the version number in the URL above (it is now 4.0.0) to download the upgrade package of the corresponding version. There is no need to use the vagrant box update command to obtain the URL every time.

Second step: ctrl z Exit online upgrade

Copy the complete URL of the upgrade package, and then download the upgrade package to your local computer through a browser or other download tools

Note: It is possible that the file name obtained after downloading is not virtualbox.box. You can manually modify the file name

Step 3: Create one manually locally while downloading the upgrade package The content of the metadata.json file is as follows:

{
    "name": "laravel/homestead",
    "versions": [{
        "version": "4.0.0",
        "providers": [{
            "name": "virtualbox",
            "url": "下载的 virtualbox.box 文件所在的本地完整路径(包含文件名)"
        }]
    }]
}
Copy after login

Note two points in this json file:

  • version should be changed to the latest downloaded version number;

  • At url, fill in the full local path (including the file name) where the downloaded upgrade package is located;

Step 4 :After the upgrade package is downloaded, execute the following command in the local command line:

vagrant box add the full path to the metadata.json file

Step 5: When the command line The upgrade is successful when the following information appears

Teach you to upgrade Laravel Homestead 4.0.0 offline

Step 6:Check the laravel/homestead version currently in use (this step is optional)

vagrant box list
Copy after login

If the words laravel/homestead(virtualbox, 4.0.0) appear after entering the above command, the upgrade is successful.

The above is the detailed content of Teach you to upgrade Laravel Homestead 4.0.0 offline. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template