Installing Kohana on OpenShift?

怎甘沉沦 提交于 2019-12-23 03:24:07

问题


How do I install Kohana v3.3.1 on Openshift? Do I create the PHP 5.3 cartridge and put the kohana files inside the php directory? Or do I create a Zend Server 5.6? I would like to use MySQL as well.

Kohana v3.3.1 requires PHP 5.3.3 or higher to work. I just created a PHP 5.3 Cartridge and git clone it to my harddrive and here is the file structure:

C:\mysite>ls -a
.  ..  .git  .openshift  README.md  deplist.txt  libs  misc  php

C:\mysite>

Inside the php directory

C:\mysite\php>ls -a
.  ..  health_check.php  index.php

C:\mysite\php>

When I edited php\index.php to echo "Hello World" I was able to see Hello World in my browser at my Openshift address http://xxxx-xxxx.rhcloud.com/

Any assistance will be greatly appreciated!


EDIT 1

I listed the cartridges and discovered Do-it-Yourself 0.1

rhc cartridge list

Is this Do-it-Yourself 0.1 cartridge building what I need to do to get Kohana working on Openshift?


回答1:


I would drop your code inside the basic php-5.3 application skeleton, and go from there.

You can add mysql to any application by listing it as a dependency during your rhc app create step, or by typing rhc cartridge add mysql from within your local project repo folder.

Once you get everything working, I would consider publishing the resulting repo to GitHub. This should allow others to spin up your openshift-compatible copy of Kohana by running:

rhc app create kohana php-5.3 mysql --from-code=http://github.com/YOUR_ACCOUNT/YOUR_PROJECT_NAME.git

(with YOUR_ACCOUNT and YOUR_PROJECT_NAME substituted into the above command)



来源:https://stackoverflow.com/questions/18950525/installing-kohana-on-openshift

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!