安装控制命令(git,ruby要先安装上去,若安装失败先查看网络,再升级ruby)
sudo gem install rhc
登录
rhc setup
xxxxx@xxx.com (用户名)
xxxxx(密码)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Getting started:
setup Connects to OpenShift and sets up your keys and domain
app create Create an application
apps List all your applications
cartridge list List available cartridges
cartridge add Add a cartridge to your application
server Display information about the status of the OpenShift service.
Working with apps:
app restart Restart the application
app show Show information about an application
tail Tail the logs of an application
port-forward Forward remote ports to the workstation
threaddump Trigger a thread dump for JBoss and Ruby applications.
snapshot Save the current state of your application locally
git-clone Clone and configure an application's repository locally
Management commands:
account Display details about your OpenShift account
alias Add or remove a custom domain name for the application
app Commands for creating and managing applications
cartridge Manage your application cartridges
domain Manage the domain and namespace for your applications.
sshkey Manage multiple keys for the registered rhcloud user.
查看信息
rhc cartridge list
数据库操作
rhc cartridge start -a xxx -c mysql-5.1
rhc cartridge stop -a xxx -c mysql-5.1
rhc cartridge restart -a xxx -c mysql-5.1
rhc cartridge reload -a xxx -c mysql-5.1
rhc cartridge status -a xxx -c mysql-5.1