栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

在kali中部署laravel(dcat admin)

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

在kali中部署laravel(dcat admin)

系统:kali
登录: root
中间件:nginx
PHP框架:laravel(dcat admin)

1 上传代码压缩包和xxx-1222.sql,代码压缩包复制到/var/www/html/,并解压
   cp -rf xxx-1222.zip /var/www/html/
   unzip /var/www/html/xxx-1222.zip

2 编辑/etc/nginx/sites-enabled/xxx
    复制default为xxx
    修改内容可参考:https://learnku.com/laravel/wikis/25559 和 xxx配置文件

3 编辑/etc/nginx/nginx.conf
    修改内容可参考:https://learnku.com/laravel/wikis/25559 和 nginx.conf


4 编辑/etc/php/7.4/fpm/php.ini
   修改内容可参考:php.ini
   主要修改extension:gmp mbstring  mysqli  json openssl pdo tokenizer xml bcmatch ctype

5 修改/var/www/html/xdns/storage权限
   chmod -R 0755 storage
   chown -R www-data:www-data storage
   可参考:https://learnku.com/laravel/wikis/25560


6 创建数据库
   登录mysql ,mysql -u root -p
   create database xxx;
   source /home/kali/documents/xxx-1222.sql

7 配置代码中的数据库
   vi /var/www/html/xxx/.env
   


8 遇到问题:
    8.1 Symfony Component Debug Exception FatalThrowableError (E_ERROR)
          Class 'DOMdocument' not found
          解决:apt-get install php-xml


  8.2 FastCGI sent in stderr: "PHP message: PHP Warning:  preg_match_all(): Compilation failed: unrecognised compile-time option bit(s) at offset 0 in /var/www/html/xdns/vendor/symfony/http-foundation/HeaderUtils.php on line 65PHP message: PHP Fatal error:  Uncaught TypeError: SymfonyComponentHttpFoundationHeaderUtils::groupParts(): Argument #1 ($matches) must be of type array, null given, called in /var/www/html/xdns/vendor/symfony/http-foundation/HeaderUtils.php on line 67 and defined in /var/www/html/xdns/vendor/symfony/http-foundation/HeaderUtils.php:196
    nginx 和 php 正常启动,但是页面显示500        
       解决:apt-get install libargon2-1 libidn2-0 libpcre2-8-0 libpcre3 libxml2 libzstd1
  


  8.3  FastCGI sent in stderr: "PHP message: PHP Fatal error:  During inheritance of ArrayAccess: Uncaught ErrorException: Return type of IlluminateSupportCollection::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/xdns/vendor/laravel/framework/src/Illuminate/Support/Collection.php:1277
       解决:apt-get install php-xml

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/675926.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号