-
Notifications
You must be signed in to change notification settings - Fork 62
Cannot install php (5.6.19) on Centos 7x #111
Comments
Forgot to mention that I've already installed the example42/puppi dependency: [provisioner@drupal-demonstration ~]$ puppet module install example42-puppi
Notice: Preparing to install into /home/provisioner/.puppetlabs/etc/code/modules
...
Notice: Module example42-puppi 2.1.12 is already installed. |
To correspond to the earlier traceback error:
I adjusted the ## variables: non-ssl
$port = '80'
## variables: ssl
$ssl_dir = '/etc/ssl/httpd'
$port_ssl = '443'
$port_ssl_host = '8334'
$ssl_country = 'US'
$ssl_state = 'CA'
$ssl_city = 'Hollywood'
$ssl_org_name = 'Production'
$ssl_org_unit = 'Dreamworks'
$ssl_cname = 'localhost'
## variables: general
$webroot = '/vagrant/webroot'
$build_environment = development
$vhost_name = 'localhost'
$selinux_policy_dir = '/vagrant/centos7x/selinux/'
$packages_general = ['dos2unix']
class httpd {
## variables
$webroot = '/vagrant/webroot'
## install apache, without default vhost
class { 'apache':
default_vhost => false,
}
## enable 'mod_headers'
class { 'apache::mod::headers': }
## allow port 443 to serve webpage
apache::listen { '443': }
## enable php5 module
include apache::mod::php
## standard vhost (default not defined)
apache::vhost { "${vhost_name}":
servername => $vhost_name,
port => $port,
docroot => $webroot,
redirect_status => 'permanent',
redirect_dest => "https://${vhost_name}"
}
## ssl vhost (default not defined)
#
# @add_listen, setting to false, prevents 'Listen $port_ssl' directive
# within 'ports.conf', which would conflict with similar directive,
# found in 'ssl.conf'
apache::vhost { "${vhost_name}_ssl":
servername => $vhost_name,
port => $port_ssl,
add_listen => false,
docroot => $webroot,
ssl => true,
ssl_cert => "${ssl_dir}/httpd.crt",
ssl_key => "${ssl_dir}/httpd.key",
directories => [
{
path => '/',
provider => 'directory',
allow_override => 'None',
require => 'all denied',
},
{
path => $webroot,
provider => 'directory',
allow_override => 'All',
require => 'all granted',
options => ['Indexes', 'FollowSymLinks'],
},
],
}
}
## install php
class install_php {
## set dependencies
require httpd
## install php
class { 'php':
version => '5.6.19',
}
}
contain install_php However, I still was not able to install php [root@drupal-demonstration provisioner]# puppet module install puppetlabs-apach
e
Notice: Preparing to install into /etc/puppetlabs/code/environments/production/m
odules ...
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Notice: Installing -- do not interrupt ...
/etc/puppetlabs/code/environments/production/modules
└─┬ puppetlabs-apache (v1.8.1)
├── puppetlabs-concat (v2.1.0)
└── puppetlabs-stdlib (v4.11.0)
[root@drupal-demonstration provisioner]# puppet module install example42-puppi
Notice: Preparing to install into /etc/puppetlabs/code/environments/production/m
odules ...
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Notice: Installing -- do not interrupt ...
/etc/puppetlabs/code/environments/production/modules
└── example42-puppi (v2.1.12)
[root@drupal-demonstration provisioner]# puppet module install example42-php
Notice: Preparing to install into /etc/puppetlabs/code/environments/production/m
odules ...
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Notice: Installing -- do not interrupt ...
/etc/puppetlabs/code/environments/production/modules
└─┬ example42-php (v2.0.25)
└── example42-puppi (v2.1.12)
[root@drupal-demonstration provisioner]# puppet apply install_php.pp
Warning: Scope(Concat::Fragment[Apache ports header]): The $ensure parameter to
concat::fragment is deprecated and has no effect.
Warning: Scope(Concat::Fragment[Listen 443]): The $ensure parameter to concat::f
ragment is deprecated and has no effect.
Warning: Scope(Concat::Fragment[Listen 80]): The $ensure parameter to concat::fr
agment is deprecated and has no effect.
Notice: Compiled catalog for drupal-demonstration.com in environment production
in 1.87 seconds
Notice: /Stage[main]/Apache/File[/etc/httpd/conf.d/ssl.conf]/ensure: removed
Notice: /Stage[main]/Apache::Mod::Mime/File[mime.conf]/content: content changed
'{md5}82476f6d2e6819f5db88eba8395615d8' to '{md5}9da85e58f3bd6c780ce76db603b7f02
8'
Notice: /Stage[main]/Apache::Mod::Mime_magic/File[mime_magic.conf]/content: cont
ent changed '{md5}b9061a13b522d13d822ffacbb6119aab' to '{md5}b258529b332429e2ff8
344f726a95457'
Notice: /Stage[main]/Apache::Mod::Alias/File[alias.conf]/content: content change
d '{md5}2f94b7abc6650a7c874bc4b2cf62dd42' to '{md5}983e865be85f5e0daaed7433db829
95e'
Error: Could not update: Execution of '/bin/yum -d 0 -e 0 -y install php-5.6.19'
returned 1: Error: Nothing to do
Error: /Stage[main]/Php/Package[php]/ensure: change from purged to 5.6.19 failed
: Could not update: Execution of '/bin/yum -d 0 -e 0 -y install php-5.6.19' retu
rned 1: Error: Nothing to do
Notice: /Stage[main]/Php/File[php.conf]: Dependency Package[php] has failures: t
rue
Warning: /Stage[main]/Php/File[php.conf]: Skipping because of failed dependencie
s
Notice: /Stage[main]/Apache::Mod::Php/File[php5.conf]/ensure: defined content as
'{md5}65c847fb8f6c4f2b6dab004589b90b52'
Notice: /Stage[main]/Apache::Mod::Headers/Apache::Mod[headers]/File[headers.load
]/ensure: defined content as '{md5}96094c96352002c43ada5bdf8650ff38'
Notice: /Stage[main]/Apache::Mod::Php/Apache::Mod[php5]/File[php5.load]/ensure:
defined content as '{md5}5aabed26d29e38135b5157acff80a2a6'
Notice: /Stage[main]/Httpd/Apache::Vhost[localhost]/File[/vagrant/webroot]/owner
: owner changed 'provisioner' to 'root'
Notice: /Stage[main]/Httpd/Apache::Vhost[localhost]/File[/vagrant/webroot]/group
: group changed 'provisioner' to 'root'
Notice: /Stage[main]/Httpd/Apache::Vhost[localhost]/Concat[25-localhost.conf]/Fi
le[/etc/httpd/conf.d/25-localhost.conf]/content: content changed '{md5}425602e35
488b6d853b11d824241f23f' to '{md5}e692f2f6f6f48d986924d6ac477d21ad'
Notice: /Stage[main]/Apache::Mod::Ssl/File[ssl.conf]/content: content changed '{
md5}e802ccccca845c4c7e1bf0764af57c8a' to '{md5}8884ea33793365e0784cfd43be72464e'
Notice: /Stage[main]/Httpd/Apache::Vhost[localhost_ssl]/Concat[25-localhost_ssl.
conf]/File[/etc/httpd/conf.d/25-localhost_ssl.conf]/content: content changed '{m
d5}6a87e769095cdccc5ac6eab0274302ac' to '{md5}7c2f9f4264a16ba442fb5d7e2f6f6edd'
Notice: /Stage[main]/Apache/Concat[/etc/httpd/conf/ports.conf]/File[/etc/httpd/c
onf/ports.conf]/content: content changed '{md5}334fa5cddbf9a408ea1ca7a1666b1fc4'
to '{md5}7c4742adc3e33066c74a24c77716ccce'
Notice: /Stage[main]/Apache/File[/etc/httpd/conf/httpd.conf]/content: content ch
anged '{md5}b761a40cd0e61eef44a486e0143f9125' to '{md5}c737309f707b785cb7760b6d1
9f7520f'
Notice: /Stage[main]/Apache::Service/Service[httpd]: Dependency Package[php] has
failures: true
Warning: /Stage[main]/Apache::Service/Service[httpd]: Skipping because of failed
dependencies
Notice: Applied catalog in 1.58 seconds
[root@drupal-demonstration provisioner]# php -v
bash: php: command not found |
I adjusted ## variables: non-ssl
$port = '80'
## variables: ssl
$ssl_dir = '/etc/ssl/httpd'
$port_ssl = '443'
$port_ssl_host = '8334'
$ssl_country = 'US'
$ssl_state = 'CA'
$ssl_city = 'Hollywood'
$ssl_org_name = 'Production'
$ssl_org_unit = 'Dreamworks'
$ssl_cname = 'localhost'
## variables: general
$webroot = '/vagrant/webroot'
$build_environment = development
$vhost_name = 'localhost'
$selinux_policy_dir = '/vagrant/centos7x/selinux/'
$packages_general = ['dos2unix']
class httpd {
## variables
$webroot = '/vagrant/webroot'
## install apache, without default vhost
class { 'apache':
default_vhost => false,
}
## enable 'mod_headers'
class { 'apache::mod::headers': }
## allow port 443 to serve webpage
apache::listen { '443': }
## enable php5 module
include apache::mod::php
## standard vhost (default not defined)
apache::vhost { "${vhost_name}":
servername => $vhost_name,
port => $port,
docroot => $webroot,
redirect_status => 'permanent',
redirect_dest => "https://${vhost_name}"
}
## ssl vhost (default not defined)
#
# @add_listen, setting to false, prevents 'Listen $port_ssl' directive
# within 'ports.conf', which would conflict with similar directive,
# found in 'ssl.conf'
apache::vhost { "${vhost_name}_ssl":
servername => $vhost_name,
port => $port_ssl,
add_listen => false,
docroot => $webroot,
ssl => true,
ssl_cert => "${ssl_dir}/httpd.crt",
ssl_key => "${ssl_dir}/httpd.key",
directories => [
{
path => '/',
provider => 'directory',
allow_override => 'None',
require => 'all denied',
},
{
path => $webroot,
provider => 'directory',
allow_override => 'All',
require => 'all granted',
options => ['Indexes', 'FollowSymLinks'],
},
],
}
}
## install php
class install_php {
## set dependencies
require httpd
## install php
class { 'php': }
}
contain install_php which generates the following traceback: [root@drupal-demonstration provisioner]# puppet apply install_php.pp
Warning: Scope(Concat::Fragment[Apache ports header]): The $ensure parameter to
concat::fragment is deprecated and has no effect.
Warning: Scope(Concat::Fragment[Listen 443]): The $ensure parameter to concat::f
ragment is deprecated and has no effect.
Warning: Scope(Concat::Fragment[Listen 80]): The $ensure parameter to concat::fr
agment is deprecated and has no effect.
Notice: Compiled catalog for drupal-demonstration.com in environment production
in 1.87 seconds
Notice: /Stage[main]/Apache/File[/etc/httpd/conf.d/ssl.conf]/ensure: removed
Notice: /Stage[main]/Apache::Mod::Mime/File[mime.conf]/content: content changed
'{md5}82476f6d2e6819f5db88eba8395615d8' to '{md5}9da85e58f3bd6c780ce76db603b7f02
8'
Notice: /Stage[main]/Apache::Mod::Mime_magic/File[mime_magic.conf]/content: cont
ent changed '{md5}b9061a13b522d13d822ffacbb6119aab' to '{md5}b258529b332429e2ff8
344f726a95457'
Notice: /Stage[main]/Apache::Mod::Alias/File[alias.conf]/content: content change
d '{md5}2f94b7abc6650a7c874bc4b2cf62dd42' to '{md5}983e865be85f5e0daaed7433db829
95e'
Notice: /Stage[main]/Php/Package[php]/ensure: created
Notice: /Stage[main]/Apache::Mod::Php/File[php5.conf]/ensure: defined content as
'{md5}65c847fb8f6c4f2b6dab004589b90b52'
Notice: /Stage[main]/Apache::Mod::Headers/Apache::Mod[headers]/File[headers.load
]/ensure: defined content as '{md5}96094c96352002c43ada5bdf8650ff38'
Notice: /Stage[main]/Apache::Mod::Php/Apache::Mod[php5]/File[php5.load]/ensure:
defined content as '{md5}5aabed26d29e38135b5157acff80a2a6'
Notice: /Stage[main]/Httpd/Apache::Vhost[localhost]/File[/vagrant/webroot]/owner
: owner changed 'provisioner' to 'root'
Notice: /Stage[main]/Httpd/Apache::Vhost[localhost]/File[/vagrant/webroot]/group
: group changed 'provisioner' to 'root'
Notice: /Stage[main]/Httpd/Apache::Vhost[localhost]/Concat[25-localhost.conf]/Fi
le[/etc/httpd/conf.d/25-localhost.conf]/content: content changed '{md5}425602e35
488b6d853b11d824241f23f' to '{md5}e692f2f6f6f48d986924d6ac477d21ad'
Notice: /Stage[main]/Apache::Mod::Ssl/File[ssl.conf]/content: content changed '{
md5}e802ccccca845c4c7e1bf0764af57c8a' to '{md5}8884ea33793365e0784cfd43be72464e'
Notice: /Stage[main]/Apache/File[/etc/httpd/conf.modules.d/10-php.conf]/ensure:
removed
Notice: /Stage[main]/Httpd/Apache::Vhost[localhost_ssl]/Concat[25-localhost_ssl.
conf]/File[/etc/httpd/conf.d/25-localhost_ssl.conf]/content: content changed '{m
d5}6a87e769095cdccc5ac6eab0274302ac' to '{md5}7c2f9f4264a16ba442fb5d7e2f6f6edd'
Notice: /Stage[main]/Apache/Concat[/etc/httpd/conf/ports.conf]/File[/etc/httpd/c
onf/ports.conf]/content: content changed '{md5}334fa5cddbf9a408ea1ca7a1666b1fc4'
to '{md5}7c4742adc3e33066c74a24c77716ccce'
Notice: /Stage[main]/Apache/File[/etc/httpd/conf/httpd.conf]/content: content ch
anged '{md5}b761a40cd0e61eef44a486e0143f9125' to '{md5}c737309f707b785cb7760b6d1
9f7520f'
Notice: /Stage[main]/Apache::Service/Service[httpd]: Triggered 'refresh' from 1
events
Notice: Applied catalog in 4.92 seconds
[root@drupal-demonstration provisioner]# php -v
PHP 5.4.16 (cli) (built: Jun 23 2015 21:17:27)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies Although, no errors were present within the above traceback, the overall goal was to install php |
So, the version you specify must be available in your repos. |
@alvagante, should this repository have corresponding logic that attempts to download the corresponding packages, before installing them? Or, is that responsibility something that I must remediate? |
Well the module doesn't go as far. |
I'm unable to install php version
5.6.19
, using the following class definition, within my Centos 7x environment:Since I'm using puppet to provision my vagrant instance of centos 7x, I've reduced the above thought to the following
configure_php.pp
definition:When I run the above manifest, within my vagrant implementation:
In an attempt reduce the debug time, I implemented the same test, within the terminal console:
The following was my
install_php.pp
defintion:The text was updated successfully, but these errors were encountered: