Laravel 使用deployer 简单项目搭建

deployer是后台管理模板

安装指南

安装中遇到的问题

  1. sudo composer install -o --no-dev在出现警告

     Notice: Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128' in /Users/maizhikun/Learning/apache_sites/deployer/config/app.php on line 84
     PHP Notice:  Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128' in /Users/maizhikun/Learning/apache_sites/deployer/config/app.php on line 84
     > php artisan optimize
    
     Notice: Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128' in /Users/maizhikun/Learning/apache_sites/deployer/config/app.php on line 84
     PHP Notice:  Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128' in /Users/maizhikun/Learning/apache_sites/deployer/config/app.php on line 84
     Generating optimized class loader
     Compiling common classes
    

    修改config/app的

     'cipher'          => 'AES-256-CBC',
    
  2. php artisan app:install中出现

     ***********************
     Welcome to Deployer
     ***********************
    
     Extension required: mcrypt
    
     Deployer cannot be installed, as not all requirements are met. Please review the errors above before continuing.
    

    解决方案是: 在配置文件中加

     export PATH=/usr/local/php5/bin:$PATH
    
  3. 到了最后的设置数据库,不允许属性为空

    [ERROR] A value is required.
    
    Username [deployer]:    
    

    然而我的账号就是空啊..啊哈哈- -.

    修改源文件deployer/vendor/symfony/console/Helper/SymfonyQuestionHelper.php40行附近

    //if (!is_array($value) && !is_bool($value) && 0 === strlen($value)) {
    if (!is_array($value) && !is_bool($value) && 0 === strlen($value)) {
        throw new \Exception('A value is required.');
    }
    

    //phpstorm默认不让改的.用subline改就OK哈哈- -.

  4. 在创建时候缺少Beanstalkd

    [Pheanstalk\Exception\ConnectionException]
    Socket error 61: Connection refused (connecting to localhost:11300)
    

    安装Beanstalkd

    brew install beanstalkd
    

    启动Beanstalkd

    beanstalkd
    

    使用Beanstalkd参考

php

Comments