前言

2017年8月16日按照首长的一级指示,立即摧毁(印度项目)。为之我奋战了5个小时彻底打败(印度项目)。


首先搭建服务架构 如图所示:


wKioL1mT-0yxzwXlAACGe2WWiF0116.png-wh_50

                      楔子

经过3个小时团队的奋斗已经到达敌人的高地就差俘虏印度了,在这个漫长的2个小时内。我们团队在次接到首长的指示,一个不留全部歼灭。

可喜可贺的是仅仅五个小时“印度项目”被我们飞虎团队击破。那一刻同志们拿着披荆斩棘的大刀再一次亮剑......



1.报错如下:

wKioL1mT_P7QGuK-AADLj9tLpdY622.png-wh_50


官方给予的提示:


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.


wKioL1mT_3DBVH-0AACNcmGRwg4861.png-wh_50


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.


wKioL1mT_-rygQpWAABUAIYcpRg859.png-wh_50


成功界面如图所示:

wKioL1mUAOPCE6qmAAW3dkJIwKY977.png-wh_50

登录账户密码


wKioL1mUAWjBj6uXAAAdDAlOE9Y063.png-wh_50


总结:山不厌高 海不厌深  根据提示关闭selinux 给予相应文件权限即可 vim /sysconfig/selinux  把selinux改成=disable即可 ,权限给予777即可。