Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
+1 vote
3 views
in DevOps and Agile by (29.3k points)

Apparently, this is not possible, but I can't believe that I'm the only one who needs it.

I want to specify the version of php to install because I'm working on an old project requiring php 5.2.

Actually, my VM is based on Oneiric with php 5.3

Do you have any solution to do this?

1 Answer

0 votes
by (50.2k points)

You can specify a version:

package { 'php' :

  ensure => '5.2' ,

}

However, if that version of PHP RPM/Deb/package isn't available in your upstream repo, then you'll want to either:

Find an alternate repo that has that package, and add it to your repo list

Set up your own repo with the package

Install from your filesystem, by providing a path to the package:

package { 'php' :

  ensure => '5.2' ,

  source => '/some/path/to/php-5.2.rpm' ,

}

Related questions

0 votes
1 answer
+1 vote
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...