{"id":429,"date":"2023-02-25T12:20:50","date_gmt":"2023-02-25T04:20:50","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=429"},"modified":"2023-04-29T21:18:50","modified_gmt":"2023-04-29T13:18:50","slug":"summary-of-install-laravel-under-centos","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/02\/25\/summary-of-install-laravel-under-centos\/","title":{"rendered":"\u5728 CentOS \u4e0b\u5b89\u88c5 Laravel \u603b\u7ed3"},"content":{"rendered":"<h3>\u6dfb\u52a0 PHP \u73af\u5883\u53d8\u91cf<\/h3>\n<pre><code>export PATH=$PATH:\/data\/server\/php7\/bin<\/code><\/pre>\n<p><!-- more --><\/p>\n<h3>\u5b89\u88c5 Composer<\/h3>\n<p>\u5b98\u7f51\u67e5\u770b\u6700\u65b0\u7248\u672c\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/getcomposer.org\/download\/\">https:\/\/getcomposer.org\/download\/<\/a><\/p>\n<pre><code>wget https:\/\/getcomposer.org\/composer.phar<\/code><\/pre>\n<h3>\u8bbe\u7f6e\u5168\u5c40\u8c03\u7528 composer \u547d\u4ee4<\/h3>\n<pre><code>cp composer.phar \/usr\/bin\/composer\nchmod +x \/usr\/bin\/composer<\/code><\/pre>\n<h3>\u6dfb\u52a0Composer\u4e2d\u56fd\u955c\u50cf<\/h3>\n<pre><code>composer config -g repo.packagist composer https:\/\/packagist.phpcomposer.com<\/code><\/pre>\n<h3>\u5b89\u88c5 Laravel installer<\/h3>\n<pre><code>composer global require &quot;laravel\/installer&quot;<\/code><\/pre>\n<h3>\u6dfb\u52a0 Laravel installer \u73af\u5883\u53d8\u91cf<\/h3>\n<pre><code>composer config -l -g  \/\/\u67e5\u770bComposer\u4e3b\u76ee\u5f55\uff0cComposer-1.5\u53d8\u4e3a\/root\/.config\/composer\nexport PATH=$PATH:\/root\/.composer\/vender\/bin\n\/\/\u6216\u8005\u5efa\u7acb\u8f6f\u94fe\u63a5\nln -s \/root\/.config\/composer\/vendor\/laravel\/installer\/laravel \/usr\/bin\/laravel\nlaravel -V<\/code><\/pre>\n<h3>\u65b0\u5efa\u4e00\u4e2a Laravel \u6846\u67b6\u7a0b\u5e8f<\/h3>\n<pre><code>laravel new blog<\/code><\/pre>\n<h3>\u8bbe\u7f6e Laravel \u76ee\u5f55\u6743\u9650<\/h3>\n<pre><code>chmod -R 777 storage\nchmod -R 777 bootstrap\/cache\nchmod -R 777 public<\/code><\/pre>\n<h3>\u914d\u7f6e nginx.conf<\/h3>\n<pre><code>root \/data\/www\/blog\/public\n\nlocation \/ {\n    try_files $uri $uri\/ \/index.php?$query_string;\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u6dfb\u52a0 PHP \u73af\u5883\u53d8\u91cf export PATH=$PATH:\/data\/server\/php7\/bin \u5b89\u88c5  [&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-429","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\/429","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=429"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/429\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=429"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=429"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=429"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}