简体   繁体   中英

How to update catridges on OpenShift?

Hey guys its a very general question, but I need your help. I already have an application at [Edited - Removed my site's link] which uses php 5.3 & now OpenShift has a new catridge called php 5.4..so how can I update the catridge without deleting my app?

You would need to create a new application with the 5.4 cartridge and migrate your application to the new gears. You currently can not remove and add a new version of a web cartridge. (you can try doing the migration with the rhc snapshot command)

Hack for fast switching from PHP 5.3 to 5.4 and back.
This is not completely updates the cartridge and may works incorrect.

# Create backup configuration
mv ~/php/configuration ~/php/configuration-orig
cp -r ~/php/configuration-orig ~/php/configuration


# Switch PHP 5.3 -> PHP 5.4
sed -i 's|libphp5.so|libphp54-php5.so|' ~/php/configuration/etc/conf.d/php.conf
gear restart --cart php


# Switch PHP 5.4 -> PHP 5.3
sed -i 's|libphp54-php5.so|libphp5.so|' ~/php/configuration/etc/conf.d/php.conf
gear restart --cart php

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM