openshift申请与简易安装

  • 申请

https://www.openshift.com/

  • 通过git管理

安装git和ruby

yum install git ruby rubygem*

更改yum源

vim /etc/yum.repos.d/openshift.repo

[openshift]
name=Openshift
baseurl=https://openshift.redhat.com/app/repo/rpms/$releasever/$basearch/
failovermethod=priority
skip_if_unavailable=1
gpgkey=https://openshift.redhat.com/app/repo/RPM-GPG-KEY-redhat-openshifthosted,https://openshift.redhat.com/app/repo/RPM-GPG-KEY-re
dhat-beta,https://openshift.redhat.com/app/repo/RPM-GPG-KEY-redhat-release
enabled=1
gpgcheck=1
 
 

安装rhc client

yum install rhc

yum update rhc

rhc setup

输入注册的账户和密码

172215254.png


创建应用

不只有支持django ,php,java也都可以

rhc app create -a app -t python-2.6

下载django实例

cd app

git remote add upstream -m master git://github.com/openshift/django-example.git

git pull -s recursive -X theirs upstream master

git push

访问应用

https://app-opennice.rhcloud.com/

应用更新

git commit -a -m 'test'

git push




你可能感兴趣的:(openshift)