1. 程式人生 > >中國閃電戰印度僅需5小時

中國閃電戰印度僅需5小時

中國 閃電 印度

前言

2017年8月16日按照首長的一級指示,立即摧毀(印度項目)。為之我奮戰了5個小時徹底打敗(印度項目)。


首先搭建服務架構 如圖所示:


技術分享

楔子

經過3個小時團隊的奮鬥已經到達敵人的高地就差俘虜印度了,在這個漫長的2個小時內。我們團隊在次接到首長的指示,一個不留全部殲滅。

可喜可賀的是僅僅五個小時“印度項目”被我們飛虎團隊擊破。那一刻同誌們拿著披荊斬棘的大刀再一次亮劍......



1.報錯如下:

技術分享


官方給予的提示:


Invalid Configuration – yii\base\InvalidConfigException

The directory is not writable by the Web process:

/home/liyunfei/NetBeansProjects/my2/duangplat/publicplat/web/assets


2.實例:

1. in /home/liyunfei/NetBeansProjects/my2/duangplat/vendor/yiisoft/yii2/web/AssetManager.php at line 213204205206207208209210211212213214215216217218219220221222

     * @throws InvalidConfigException if [[basePath]] is invalid     */
    public function init()
    {
        parent::init();
        $this->basePath = Yii::getAlias($this->basePath);
        if (!is_dir($this->basePath)) {
            throw new InvalidConfigException("The directory does not exist: {$this->basePath}");
        } elseif (!is_writable($this->basePath)) {
            throw new InvalidConfigException("The directory is not writable by the Web process: {$this->basePath}");
        } else {
            $this->basePath = realpath($this->basePath);
        }
        $this->baseUrl = rtrim(Yii::getAlias($this->baseUrl), ‘/‘);
    }

    /**
     * Returns the named asset bundle.


技術分享


3.SELinux (e.g. on Centos 7) is on by default. For my purposes, I just put SELinux in permissive mode and that fixed the issue for me. That said, there is probably a best practice to allow the apache process without going to permissive mode.


技術分享


成功界面如圖所示:

技術分享

登錄賬戶密碼


技術分享


總結:山不厭高 海不厭深 根據提示關閉selinux 給予相應文件權限即可 vim /sysconfig/selinux 把selinux改成=disable即可 ,權限給予777即可。



本文出自 “李世龍” 博客,謝絕轉載!

中國閃電戰印度僅需5小時