在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: Symfony\Component\HttpFoundation\HeaderUtils::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 Illuminate\Support\Collection::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

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值