3

我正在使用这个 Laravel Vagrant:https ://github.com/bryannielsen/Laravel4-Vagrant ,我想添加 PHPUNIT 和其他一些 PEAR 包。

我在 manifests/phpbase.pp 上添加了这一行

include pearpackages

我创建了这个文件 puppet/modules/pearpackages/manifests/init.pp:

class pearpackages {
exec {"pear upgrade":
  command => "/usr/bin/pear upgrade",
  require => Package['php-pear'],
  returns => [ 0, '', ' ']
}

# set channels to auto discover
exec { "pear auto_discover" :
  command => "/usr/bin/pear config-set auto_discover 1",
  require => [Package['php-pear']]
}

exec { "pear update-channels" :
  command => "/usr/bin/pear update-channels",
  require => [Package['php-pear']]
}

exec {"pear install phpunit":
  command => "/usr/bin/pear install --alldeps pear.phpunit.de/PHPUnit",
  creates => '/usr/bin/phpunit',
  require => Exec['pear update-channels']
}

# install phploc
exec {"pear install phploc":
  command => "/usr/bin/pear install --alldeps pear.phpunit.de/phploc",
  creates => '/usr/bin/phploc',
  require => Exec['pear update-channels']
}

# install phpcpd
exec {"pear install phpcpd":
  command => "/usr/bin/pear install --alldeps pear.phpunit.de/phpcpd",
  creates => '/usr/bin/phpcpd',
  require => Exec['pear update-channels']
}

# install phpdcd
exec {"pear install phpdcd":
  command => "/usr/bin/pear install --alldeps pear.phpunit.de/phpdcd-beta",
  creates => '/usr/bin/phpdcd',
  require => Exec['pear update-channels']
}

# install phpcs
exec {"pear install phpcs":
  command => "/usr/bin/pear install --alldeps PHP_CodeSniffer",
  creates => '/usr/bin/phpcs',
  require => Exec['pear update-channels']
}

# install phpdepend
exec {"pear install pdepend":
  command => "/usr/bin/pear install --alldeps pear.pdepend.org/PHP_Depend-beta",
  creates => '/usr/bin/pdepend',
  require => Exec['pear update-channels']
}

# install phpmd
exec {"pear install phpmd":
  command => "/usr/bin/pear install --alldeps pear.phpmd.org/PHP_PMD",
  creates => '/usr/bin/phpmd',
  require => Exec['pear update-channels']
}

# install PHP_CodeBrowser
exec {"pear install PHP_CodeBrowser":
  command => "/usr/bin/pear install --alldeps pear.phpqatools.org/PHP_CodeBrowser",
  creates => '/usr/bin/phpcb',
  require => Exec['pear update-channels']
}
}

之后,我做了一个流浪的规定

似乎一切都配置得很好,但是当我转到 localhost:8888 时,页面总是在加载并且没有向我显示内容。

我不知道我做错了什么,但我需要你的帮助,系统配置不是我的专长

4

2 回答 2

0

您是否尝试过使用PuPHPet生成 Puppet 清单?您可以在语言部分下输入 PEAR 模块。

于 2014-06-04T14:45:24.107 回答
0

我找到了解决方案。在某些版本中与 Vagrant 和 VirtualBox 存在一些不兼容。我不知道问题是否与客人添加有关。

使用 vagrant 1.6.2 和 VirtualBox 4.3.12 可以正常工作。

于 2014-06-09T08:50:41.637 回答