需求环境

  • PHP 7.3以上版本并安装以下扩展

    • BCMath
    • Ctype
    • Fileinfo
    • JSON
    • Mbstring
    • OpenSSL
    • PDO
    • Tokenizer
    • XML
  • 数据库

    • MySQL 5.6+ (推荐)
    • PostgreSQL 9.4+
    • SQLite 3.8.8+ (未测试)
    • SQL Server 2017+ (未测试)
  • 自行创建数据库,须设置为 utf8mb4_bin

下载安装

[docker安装教程](https://www.linkace.org/docs/v1/setup/setup-with-docker/)

  • 下载最新版本并解压缩到网站目录
  • 复制 .env.example 并重命名为 .env.
  • 在当前目录执行php artisan key:generate
  • 创建.htaccess文件(Apache)
<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_URI} !^public
    RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
  • nginx
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";

location / {
try_files $uri $uri/ /index.php?$query_string;
}

location ~* \.(?:css|js|map|scss)$ {
expires 7d;
access_log off;
add_header Cache-Control "public";
try_files $uri @fallback;
}

error_page 404 /index.php;
  • 进入网站首页执行安装
  • 数据库安装可能耗时较久导致网页请求失败,此时若数据表已生成完毕,可直接进入域名/setup/account进行账号创建步骤

其他设置

  • 邮箱设置:.env文件中编辑Mail configuration


- 百度一下 -

Last modification:September 24, 2021
If you think my article is useful to you, please feel free to appreciate