{"id":170,"date":"2023-02-19T19:01:10","date_gmt":"2023-02-19T11:01:10","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=170"},"modified":"2023-02-19T19:01:34","modified_gmt":"2023-02-19T11:01:34","slug":"laravel-deploy-notes","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/02\/19\/laravel-deploy-notes\/","title":{"rendered":"Laravel\u90e8\u7f72\u6ce8\u610f\u4e8b\u9879"},"content":{"rendered":"<h3>Composer<\/h3>\n<p>\u6ce8\u610f\uff1a\u6267\u884c composer \u547d\u4ee4\u4e4b\u524d\u5fc5\u987b\u5f15\u5165PHP\u73af\u5883\u53d8\u91cf<\/p>\n<pre><code>export PATH=$PATH:\/data\/server\/php7\/bin<\/code><\/pre>\n<p><!-- more --><\/p>\n<h3>Nginx\u914d\u7f6e<\/h3>\n<pre><code>location \/ {\n    try_files $uri $uri\/ \/index.php?$query_string;\n}<\/code><\/pre>\n<h3>Laravel\u914d\u7f6e<\/h3>\n<p>\uff081\uff09\u7f13\u5b58\u914d\u7f6e<\/p>\n<pre><code>php artisan cache:clear  \/\/\u6e05\u7406\u7f13\u5b58(\u5fc5\u987b\u6267\u884c)\nphp artisan route:clear  \/\/\u6e05\u7406\u8def\u6709\u7f13\u5b58\ncomposer dump-autoload  \/\/\u91cd\u65b0\u52a0\u8f7d\u7c7b\u5e93(\u5fc5\u987b\u6267\u884c)\n\nphp artisan config:clear  \/\/\u6e05\u7406\u914d\u7f6e\u7f13\u5b58\nrm -f bootstrap\/cache\/config.php  \/\/\u4e0econfig:clear\u7ed3\u5408\u4f7f\u7528<\/code><\/pre>\n<p>\uff082\uff09\u6743\u9650\u914d\u7f6e<\/p>\n<pre><code>chmod 755 -R .\/\nchmod -R 777 storage\nchmod -R 777 bootstrap\/cache\nchmod -R 777 public<\/code><\/pre>\n<p>\uff083\uff09\u751f\u6210Key<\/p>\n<pre><code>php artisan key:generate<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Composer \u6ce8\u610f\uff1a\u6267\u884c composer \u547d\u4ee4\u4e4b\u524d\u5fc5\u987b\u5f15\u5165PHP\u73af\u5883\u53d8\u91cf export PATH=$PA [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[72],"class_list":["post-170","post","type-post","status-publish","format-standard","hentry","category-laravel","tag-laravel"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/170","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=170"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/170\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=170"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=170"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}