在OpenShift上安装Kohana? [英] Installing Kohana on OpenShift?

查看:89
本文介绍了在OpenShift上安装Kohana?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Openshift上安装Kohana v3.3.1 ?我是否创建PHP 5.3磁带并将kohana文件放在php目录中?或者我创建一个Zend Server 5.6?我也想使用MySQL。



Kohana v3.3.1需要 PHP 5.3.3 或更高版本才能使用。我刚创建了一个PHP 5.3 Cartridge和 git clone 它到我的硬盘,这里是文件结构:

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

C:\mysite>

在php目录内

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

C:\mysite\php>

当我编辑 php \index.php echoHello World我可以在我的Openshift地址 http://xxxx-xxxx.rhcloud的浏览器中看到Hello World。













编辑1



我列出墨盒并发现自己动手0.1

  rhc磁盘清单

这是自己动手做0.1 盒式磁带构建我需要做什么才能让Kohana在Openshift上工作?

解决方案

你可以添加 php-5.3 通过在 rhc应用程序中将它列为依赖项,将 创建为 >步骤,或在本地项目repo文件夹中键入 rhc墨盒添加mysql



工作,我会考虑将所得到的回购发布到GitHub。这应该允许其他人通过运行来启动兼容openshift的Kohana副本:

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

(with YOUR_ACCOUNT YOUR_PROJECT_NAME 替换为上述命令)

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?

解决方案

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)

这篇关于在OpenShift上安装Kohana?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆