{"id":34620,"date":"2023-09-04T09:42:03","date_gmt":"2023-06-16T07:33:01","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e7%94%a8-vagrant-%e6%90%ad%e5%bb%ba-yii2-0-%e7%9a%84%e7%8e%af%e5%a2%83%e3%80%82\/"},"modified":"2024-04-30T21:31:01","modified_gmt":"2024-04-30T13:31:01","slug":"%e7%94%a8-vagrant-%e6%90%ad%e5%bb%ba-yii2-0-%e7%9a%84%e7%8e%af%e5%a2%83%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e7%94%a8-vagrant-%e6%90%ad%e5%bb%ba-yii2-0-%e7%9a%84%e7%8e%af%e5%a2%83%e3%80%82\/","title":{"rendered":"\u7528 Vagrant \u642d\u5efa Yii2.0 \u7684\u73af\u5883"},"content":{"rendered":"<h2>\u524d\u63d0\u6761\u4ef6 t\u00ed<\/h2>\n<p>\u64cd\u4f5c\u7cfb\u7edf\uff1aCentOS7.0<br \/>\nVagrant\uff1a1.8.6<br \/>\nVirtualBox\uff1a5.1.6<\/p>\n<h2>PHP\u53ef\u4ee5\u5728\u7f51\u9875\u5f00\u53d1\u4e2d\u4f7f\u7528\u7684\u4e00\u79cd\u811a\u672c\u8bed\u8a00\u3002<\/h2>\n<h3>\u5b89\u88c5PHP7.0<\/h3>\n<pre class=\"post-pre\"><code>[vagrant@localhost ~]$ sudo yum -y install epel-release\r\n[vagrant@localhost ~]$ sudo rpm -Uvh http:\/\/rpms.famillecollet.com\/enterprise\/remi-release-7.rpm\r\n[vagrant@localhost ~]$ sudo yum -y install --enablerepo=remi,remi-php70 php php-devel php-mbstring php-pdo php-gd php-openssl php-xml\r\n<\/code><\/pre>\n<h3>\u8bbe\u5b9aphp.ini\u6587\u4ef6\u4e3a\u9ed8\u8ba4\u914d\u7f6e\u3002<\/h3>\n<pre class=\"post-pre\"><code>[vagrant@localhost ~]$ sudo sed -i -e \"s|;error_log = syslog|error_log = \/var\/log\/php.log|\" \/etc\/php.ini\r\n[vagrant@localhost ~]$ sudo sed -i -e \"s|;mbstring.language = Japanese|mbstring.language = Japanese|\" \/etc\/php.ini\r\n[vagrant@localhost ~]$ sudo sed -i -e \"s|;mbstring.internal_encoding = EUC-JP|mbstring.internal_encoding = UTF-8|\" \/etc\/php.ini\r\n[vagrant@localhost ~]$ sudo sed -i -e \"s|;mbstring.http_input = auto|mbstring.http_input = auto|\" \/etc\/php.ini\r\n[vagrant@localhost ~]$ sudo sed -i -e \"s|;mbstring.detect_order = auto|mbstring.detect_order = auto|\" \/etc\/php.ini\r\n[vagrant@localhost ~]$ sudo sed -i -e \"s|expose_php = On|expose_php = Off|\" \/etc\/php.ini\r\n[vagrant@localhost ~]$ sudo sed -i -e \"s|;date.timezone =|date.timezone = Asia\/Tokyo|\" \/etc\/php.ini\r\n<\/code><\/pre>\n<h2>\u5b89\u88c5Composer<\/h2>\n<p>\u53c2\u8003\uff1a\u4f7f\u7528Composer\u8fdb\u884c\u5b89\u88c5\u3002<\/p>\n<pre class=\"post-pre\"><code>[vagrant@localhost ~]$ curl -sS https:\/\/getcomposer.org\/installer | php\r\nAll settings correct for using Composer\r\nDownloading 1.2.2...\r\n\r\nComposer successfully installed to: \/home\/vagrant\/composer.phar\r\nUse it: php composer.phar\r\n\r\n[vagrant@localhost ~]$ sudo mv composer.phar \/usr\/local\/bin\/composer\r\n[vagrant@localhost ~]$ composer self-update\r\nYou are already using composer version 1.2.2 (stable channel).\r\n\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code>[vagrant@localhost ~]$ composer global require \"fxp\/composer-asset-plugin:^1.2.0\"\r\nChanged current directory to \/home\/vagrant\/.config\/composer\r\n.\/composer.json has been created\r\nLoading composer repositories with package information\r\nUpdating dependencies (including require-dev)\r\n  - Installing fxp\/composer-asset-plugin (v1.2.2)\r\n    Downloading: 100%         \r\n\r\nWriting lock file\r\nGenerating autoload files\r\n\r\n<\/code><\/pre>\n<h2>\u8bf7\u7ed9\u6211\u4e00\u4e2a\u4e2d\u56fd\u7684\u9009\u9879<\/h2>\n<h3>\u5b89\u88c5Yii2.0<\/h3>\n<p>\u53c2\u8003\uff1aYii\u7684\u5b89\u88c5\u65b9\u6cd5<\/p>\n<pre class=\"post-pre\"><code>[vagrant@localhost ~]$ composer create-project --prefer-dist yiisoft\/yii2-app-basic basic\r\nInstalling yiisoft\/yii2-app-basic (2.0.10)\r\n  - Installing yiisoft\/yii2-app-basic (2.0.10)\r\n    Downloading: Connecting...\r\n    Downloading: 100%         \r\n\r\nCreated project in basic\r\nLoading composer repositories with package information\r\nUpdating dependencies (including require-dev)\r\nReading bower.json of bower-asset\/jquery (1.12.1)       \r\nCould not fetch https:\/\/api.github.com\/repos\/jquery\/jquery-dist\/commits\/56ead6ffbf8560c521e7e94518d35db42b19f5f3, please create a GitHub OAuth token to go over the API rate limit\r\nHead to https:\/\/github.com\/settings\/tokens\/new?scopes=repo&amp;description=Composer+on+localhost.localdomain+2016-11-22+1528\r\nto retrieve a token. It will be stored in \"\/home\/vagrant\/.config\/composer\/auth.json\" for future use by Composer.\r\nToken (hidden): \r\nNo token given, aborting.\r\nYou can also add it manually later by using \"composer config github-oauth.github.com &lt;token&gt;\"\r\nReading bower.json of bower-asset\/jquery (1.12.0)\r\nCould not fetch https:\/\/api.github.com\/repos\/jquery\/jquery-dist\/contents\/bower.json?ref=efbdc6e3f0fa3d3cd4d3d8bfa37990b707f7c2e1, please create a GitHub OAuth token to go over the API rate limit\r\nHead to https:\/\/github.com\/settings\/tokens\/new?scopes=repo&amp;description=Composer+on+localhost.localdomain+2016-11-22+1528\r\nto retrieve a token. It will be stored in \"\/home\/vagrant\/.config\/composer\/auth.json\" for future use by Composer.\r\nToken (hidden): \r\n\r\n<\/code><\/pre>\n<p>\u5728GitHub\u7684\u8bbe\u7f6e\u4e2d\uff0c\u70b9\u51fb\u4e2a\u4eba\u8bbf\u95ee\u4ee4\u724c\uff0c\u751f\u6210\u65b0\u7684\u4ee4\u724c\uff0c\u5e76\u8fdb\u884c\u590d\u5236\u7c98\u8d34\u3002<\/p>\n<p>\u4ee4\u724c\u5df2\u6210\u529f\u5b58\u50a8\u3002<\/p>\n<pre class=\"post-pre\"><code>Token stored successfully.\r\n  - Installing yiisoft\/yii2-composer (2.0.4)               \r\n    Downloading: 100%         \r\n\r\n  - Installing swiftmailer\/swiftmailer (v5.4.3)\r\n    Downloading: 100%         \r\n\r\n  - Installing bower-asset\/jquery (2.2.4)\r\n    Downloading: 100%         \r\n\r\n  - Installing bower-asset\/yii2-pjax (v2.0.6)\r\n    Downloading: 100%         \r\n\r\n  - Installing bower-asset\/punycode (v1.3.2)\r\n    Downloading: 100%         \r\n\r\n  - Installing bower-asset\/jquery.inputmask (3.2.7)\r\n    Downloading: 100%         \r\n\r\n\u30fb\u30fb\u30fb\u4ee5\u964d\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u6b63\u5e38\u306b\u9032\u3081\u3070\u3053\u306e\u307e\u307e\u7d42\u4e86\u3059\u308b\r\n\r\nsymfony\/browser-kit suggests installing symfony\/process ()\r\nsymfony\/event-dispatcher suggests installing symfony\/dependency-injection ()\r\nsymfony\/event-dispatcher suggests installing symfony\/http-kernel ()\r\nsymfony\/console suggests installing symfony\/process ()\r\nphpunit\/php-code-coverage suggests installing ext-xdebug (&gt;=2.4.0)\r\nsebastian\/global-state suggests installing ext-uopz (*)\r\nphpunit\/phpunit-mock-objects suggests installing ext-soap (*)\r\nphpunit\/phpunit suggests installing phpunit\/php-invoker (~1.1)\r\nphpunit\/phpunit suggests installing ext-xdebug (*)\r\ncodeception\/base suggests installing flow\/jsonpath (For using JSONPath in REST module)\r\ncodeception\/base suggests installing phpseclib\/phpseclib (for SFTP option in FTP Module)\r\ncodeception\/base suggests installing league\/factory-muffin (For DataFactory module)\r\ncodeception\/base suggests installing league\/factory-muffin-faker (For Faker support in DataFactory module)\r\ncodeception\/base suggests installing symfony\/phpunit-bridge (For phpunit-bridge support)\r\nWriting lock file\r\nGenerating autoload files\r\n&gt; yii\\composer\\Installer::postCreateProject\r\nchmod('runtime', 0777)...done.\r\nchmod('web\/assets', 0777)...done.\r\nchmod('yii', 0755)...done.\r\n\r\n<\/code><\/pre>\n<h3>\u786e\u8ba4\u5b89\u88c5\u72b6\u6001<\/h3>\n<pre class=\"post-pre\"><code>[vagrant@localhost ~]$ ls\r\nbase.sh  basic  cleanup.sh  puppet.sh  vagrant.sh  virtualbox.sh  zerodisk.sh\r\n[vagrant@localhost ~]$ ls basic\r\nLICENSE.md       commands       controllers       runtime  web\r\nREADME.md        composer.json  mail              tests    yii\r\nassets           composer.lock  models            vendor   yii.bat\r\ncodeception.yml  config         requirements.php  views\r\n\r\n<\/code><\/pre>\n<p>\u5728requirements.php\u6587\u4ef6\u4e2d\uff0c\u53ef\u4ee5\u68c0\u67e5Yii\u7684\u5b89\u88c5\u60c5\u51b5\u3002<\/p>\n<pre class=\"post-pre\"><code>[vagrant@localhost ~]$ php .\/basic\/requirements.php \r\n\r\nYii Application Requirement Checker\r\n\r\nThis script checks if your server configuration meets the requirements\r\nfor running Yii application.\r\nIt checks if the server is running the right version of PHP,\r\nif appropriate PHP extensions have been loaded, and if php.ini file settings are correct.\r\n\r\nCheck conclusion:\r\n-----------------\r\n\r\nPHP version: OK\r\n\r\nReflection extension: OK\r\n\r\nPCRE extension: OK\r\n\r\nSPL extension: OK\r\n\r\nCtype extension: OK\r\n\r\nMBString extension: OK\r\n\r\nOpenSSL extension: OK\r\n\r\nIntl extension: WARNING!!!\r\nRequired by: Internationalization support\r\nMemo: PHP Intl extension 1.0.2 or higher is required when you want to use advanced parameters formatting\r\n        in Yii::t(), non-latin languages with Inflector::slug(),\r\n        IDN-feature of\r\n        EmailValidator or UrlValidator or the yii\\i18n\\Formatter class.\r\n\r\nICU version: WARNING!!!\r\nRequired by: Internationalization support\r\nMemo: ICU 49.0 or higher is required when you want to use # placeholder in plural rules\r\n        (for example, plural in\r\n\r\n        Formatter::asRelativeTime()) in the yii\\i18n\\Formatter class. Your current ICU version is (ICU is missing).\r\n\r\nICU Data version: WARNING!!!\r\nRequired by: Internationalization support\r\nMemo: ICU Data 49.1 or higher is required when you want to use # placeholder in plural rules\r\n        (for example, plural in\r\n\r\n        Formatter::asRelativeTime()) in the yii\\i18n\\Formatter class. Your current ICU Data version is (ICU Data is missing).\r\n\r\nFileinfo extension: OK\r\n\r\nDOM extension: OK\r\n\r\nPDO extension: OK\r\n\r\nPDO SQLite extension: OK\r\n\r\nPDO MySQL extension: WARNING!!!\r\nRequired by: All DB-related classes\r\nMemo: Required for MySQL database.\r\n\r\nPDO PostgreSQL extension: WARNING!!!\r\nRequired by: All DB-related classes\r\nMemo: Required for PostgreSQL database.\r\n\r\nMemcache extension: WARNING!!!\r\nRequired by: MemCache\r\n\r\nGD PHP extension with FreeType support: OK\r\n\r\nImageMagick PHP extension with PNG support: WARNING!!!\r\nRequired by: Captcha\r\nMemo: Either GD PHP extension with FreeType support or ImageMagick PHP extension with PNG support is required for image CAPTCHA.\r\n\r\nExpose PHP: OK\r\n\r\nPHP allow url include: OK\r\n\r\nPHP mail SMTP: OK\r\n\r\n------------------------------------------\r\nErrors: 0   Warnings: 7   Total checks: 22\r\n\r\n<\/code><\/pre>\n<h2>Apache<\/h2>\n<h3>\u4fee\u6539DocumentRoot<\/h3>\n<p>\u53c2\u8003\uff1a\u5efa\u8bae\u7684Apache\u914d\u7f6e<\/p>\n<pre class=\"post-pre\"><code>#                                                                              \r\n# DocumentRoot: The directory out of which you will serve your                 \r\n# documents. By default, all requests are taken from this directory, but       \r\n# symbolic links and aliases may be used to point to other locations.          \r\n#                                                                              \r\n#DocumentRoot \"\/var\/www\/html\"                                                  \r\nDocumentRoot \"\/home\/vagrant\/basic\/web\" # \u5909\u66f4\u3059\u308b\r\n\r\n# Further relax access to the default document root:                           \r\n&lt;Directory \"\/home\/vagrant\/basic\/web\"&gt; # \u8ffd\u52a0\u3059\u308b\r\n    #                                                                          \r\n    # Possible values for the Options directive are \"None\", \"All\",             \r\n    # or any combination of:                                                   \r\n    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiView\\\r\ns                                                                              \r\n    #                                                                          \r\n    # Note that \"MultiViews\" must be named *explicitly* --- \"Options All\"      \r\n    # doesn't give it to you.                                                  \r\n    #                                                                          \r\n    # The Options directive is both complicated and important.  Please see     \r\n    # http:\/\/httpd.apache.org\/docs\/2.4\/mod\/core.html#options                   \r\n    # for more information.                                                    \r\n    #                                                                          \r\n    Options Indexes FollowSymLinks\r\n\r\n    #                                                                          \r\n    # AllowOverride controls what directives may be placed in .htaccess files.\r\n    # It can be \"All\", \"None\", or any combination of the keywords:             \r\n    #   Options FileInfo AuthConfig Limit                                      \r\n    #                                                                          \r\n    AllowOverride None\r\n\r\n    #                                                                          \r\n    # Controls who can get stuff from this server.                             \r\n    #                                                                          \r\n    Require all granted\r\n\r\n    # use mod_rewrite for pretty URL support                                   \r\n    RewriteEngine on\r\n\r\n    # If a directory or a file exists, use the request directly                \r\n    RewriteCond %{REQUEST_FILENAME} !-f\r\n    RewriteCond %{REQUEST_FILENAME} !-d\r\n\r\n    # Otherwise forward the request to index.php                               \r\n    RewriteRule . index.php\r\n\r\n&lt;\/Directory&gt;\r\n\r\n<\/code><\/pre>\n<p>\u91cd\u65b0\u542f\u52a8Apache<\/p>\n<pre class=\"post-pre\"><code>[vagrant@localhost ~]$ sudo systemctl restart httpd\r\n<\/code><\/pre>\n<p>\u8bbf\u95ee http:\/\/192.168.33.10\/requiments.php \u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"Yii_Congratulations.png\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d1e7337434c4406c160dd\/29-0.png\" alt=\"Yii_Congratulations.png\" \/><\/div>\n<h2>\u89e3\u51b3\u95ee\u9898<\/h2>\n<h3>\u88ab\u558a\u53eb\u51fa\u6765\u6ca1\u88c5php-xml\u3002<\/h3>\n<pre class=\"post-pre\"><code>phpunit\/phpunit 4.8.9 requires ext-dom * -&gt; the requested PHP extension dom is missing from your \r\n<\/code><\/pre>\n<p>\u5982\u679c\u51fa\u73b0\u4e0a\u8ff0\u9519\u8bef\uff0c\u9700\u8981\u5b89\u88c5DOM Extension\u3002<\/p>\n<h3>\u65e0\u8bba\u5b89\u88c5php-XXX\uff0c\u90fd\u65e0\u6cd5\u6210\u529f\u5b89\u88c5\u3002<\/h3>\n<p>\u65e0\u8bba\u6267\u884c\u591a\u5c11\u6b21yum install\u547d\u4ee4\uff0c\u5982\u679c\u4f7f\u7528yum list installed php-XXX\u547d\u4ee4\u4ecd\u7136\u6ca1\u6709\u663e\u793a\uff0c<\/p>\n<p>\u9996\u5148\uff0c\u5b58\u50a8\u5e93\u672c\u8eab\u5b58\u5728\u95ee\u9898\u3002<\/p>\n<pre class=\"post-pre\"><code>[vagrant@localhost ~]$ sudo yum -y install --enablerepo=remi,remi-php70 php php-devel php-mbstring php-pdo php-gd php-openssl php-xml\r\n<\/code><\/pre>\n<p>\u5982\u679c\u6307\u5b9a\u4e86remi\u4ed3\u5e93\uff0c\u8bf7\u6309\u7167\u4e0a\u8ff0\u8bf4\u660e\u8fdb\u884c\u64cd\u4f5c\u3002<\/p>\n<pre class=\"post-pre\"><code>[vagrant@localhost ~]$ sudo yum -y install --enablerepo=remi,remi-php70 php-XXX\r\n<\/code><\/pre>\n<p>\u5982\u679c\u4e0d\u6307\u5b9a\uff0c\u9ed8\u8ba4\u4f1a\u67e5\u770b\u9ed8\u8ba4\u7684\u4ed3\u5e93\uff0c\u56e0\u6b64\u4e0d\u4f1a\u88ab\u5b89\u88c5\u3002<\/p>\n<p>\u53c2\u8003\uff1aCentOS6\uff0fCentOS7\u306bPHP5.6\uff0fPHP7\u3092yum\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n<h3>(13) \u6c92\u6709\u6b0a\u9650\uff0c\u51fa\u73fe\u4e86403\uff0c\u8b93\u4eba\u60f3\u54ed\u3002<\/h3>\n<p>\u30a2\u30af\u30bb\u30b9\u3059\u308bURL<br \/>\nhttp:\/\/192.168.33.10\/requiments.php<\/p>\n<pre class=\"post-pre\"><code>403 Forbidden\r\nYou don't have permission to access \/requiments.php on this server.\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code>[vagrant@localhost home]$ sudo cat  \/etc\/httpd\/logs\/error_log\r\n[Tue Nov 22 05:59:54.132700 2016] [core:error] [pid 11037] (13)Permission denied: [client 192.168.33.1:49446] AH00035: access to \/requiments.php denied (filesystem path '\/home\/vagrant\/basic') because search permissions are missing on a component of the path\r\n<\/code><\/pre>\n<p>\u7531\u4e8e\u6743\u9650\u88ab\u62d2\u7edd\uff0c\u6240\u4ee5\u9700\u8981\u66f4\u6539\u8bbf\u95ee\u76ee\u6807\u7684\u6743\u9650\u3002<\/p>\n<pre class=\"post-pre\"><code>[vagrant@localhost ~]$ cd ..\/\r\n[vagrant@localhost home]$ ls\r\nvagrant\r\n[vagrant@localhost home]$ ll\r\n\u5408\u8a08 4\r\ndrwx------. 8 vagrant vagrant 4096 11\u6708 22 07:26 vagrant\r\n[vagrant@localhost home]$ sudo chmod 755 vagrant\r\n[vagrant@localhost home]$ ll\r\n\u5408\u8a08 4\r\ndrwxr-xr-x. 8 vagrant vagrant 4096 11\u6708 22 07:26 vagrant\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u63d0\u6761\u4ef6 t\u00ed \u64cd\u4f5c\u7cfb\u7edf\uff1aCentOS7.0 Vagrant\uff1a1.8.6 VirtualBox\uff1a5.1.6 P [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-34620","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u7528 Vagrant \u642d\u5efa Yii2.0 \u7684\u73af\u5883 - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u7528-vagrant-\u642d\u5efa-yii2-0-\u7684\u73af\u5883\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u7528 Vagrant \u642d\u5efa Yii2.0 \u7684\u73af\u5883\" \/>\n<meta property=\"og:description\" content=\"\u524d\u63d0\u6761\u4ef6 t\u00ed \u64cd\u4f5c\u7cfb\u7edf\uff1aCentOS7.0 Vagrant\uff1a1.8.6 VirtualBox\uff1a5.1.6 P [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u7528-vagrant-\u642d\u5efa-yii2-0-\u7684\u73af\u5883\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-16T07:33:01+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-30T13:31:01+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d1e7337434c4406c160dd\/29-0.png\" \/>\n<meta name=\"author\" content=\"\u6e05, \u5b87\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6e05, \u5b87\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e7%94%a8-vagrant-%e6%90%ad%e5%bb%ba-yii2-0-%e7%9a%84%e7%8e%af%e5%a2%83%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e7%94%a8-vagrant-%e6%90%ad%e5%bb%ba-yii2-0-%e7%9a%84%e7%8e%af%e5%a2%83%e3%80%82\/\",\"name\":\"\u7528 Vagrant \u642d\u5efa Yii2.0 \u7684\u73af\u5883 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-06-16T07:33:01+00:00\",\"dateModified\":\"2024-04-30T13:31:01+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e7%94%a8-vagrant-%e6%90%ad%e5%bb%ba-yii2-0-%e7%9a%84%e7%8e%af%e5%a2%83%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e7%94%a8-vagrant-%e6%90%ad%e5%bb%ba-yii2-0-%e7%9a%84%e7%8e%af%e5%a2%83%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e7%94%a8-vagrant-%e6%90%ad%e5%bb%ba-yii2-0-%e7%9a%84%e7%8e%af%e5%a2%83%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u7528 Vagrant \u642d\u5efa Yii2.0 \u7684\u73af\u5883\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e\",\"name\":\"\u6e05, \u5b87\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g\",\"caption\":\"\u6e05, \u5b87\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyu\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e7%94%a8-vagrant-%e6%90%ad%e5%bb%ba-yii2-0-%e7%9a%84%e7%8e%af%e5%a2%83%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u7528 Vagrant \u642d\u5efa Yii2.0 \u7684\u73af\u5883 - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u7528-vagrant-\u642d\u5efa-yii2-0-\u7684\u73af\u5883\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"\u7528 Vagrant \u642d\u5efa Yii2.0 \u7684\u73af\u5883","og_description":"\u524d\u63d0\u6761\u4ef6 t\u00ed \u64cd\u4f5c\u7cfb\u7edf\uff1aCentOS7.0 Vagrant\uff1a1.8.6 VirtualBox\uff1a5.1.6 P [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u7528-vagrant-\u642d\u5efa-yii2-0-\u7684\u73af\u5883\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-06-16T07:33:01+00:00","article_modified_time":"2024-04-30T13:31:01+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d1e7337434c4406c160dd\/29-0.png"}],"author":"\u6e05, \u5b87","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u6e05, \u5b87","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"7 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e7%94%a8-vagrant-%e6%90%ad%e5%bb%ba-yii2-0-%e7%9a%84%e7%8e%af%e5%a2%83%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e7%94%a8-vagrant-%e6%90%ad%e5%bb%ba-yii2-0-%e7%9a%84%e7%8e%af%e5%a2%83%e3%80%82\/","name":"\u7528 Vagrant \u642d\u5efa Yii2.0 \u7684\u73af\u5883 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-06-16T07:33:01+00:00","dateModified":"2024-04-30T13:31:01+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e7%94%a8-vagrant-%e6%90%ad%e5%bb%ba-yii2-0-%e7%9a%84%e7%8e%af%e5%a2%83%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e7%94%a8-vagrant-%e6%90%ad%e5%bb%ba-yii2-0-%e7%9a%84%e7%8e%af%e5%a2%83%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e7%94%a8-vagrant-%e6%90%ad%e5%bb%ba-yii2-0-%e7%9a%84%e7%8e%af%e5%a2%83%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u7528 Vagrant \u642d\u5efa Yii2.0 \u7684\u73af\u5883"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e","name":"\u6e05, \u5b87","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g","caption":"\u6e05, \u5b87"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyu\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e7%94%a8-vagrant-%e6%90%ad%e5%bb%ba-yii2-0-%e7%9a%84%e7%8e%af%e5%a2%83%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/34620","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=34620"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/34620\/revisions"}],"predecessor-version":[{"id":94413,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/34620\/revisions\/94413"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=34620"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=34620"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=34620"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}