If you don’t know what’s OpenShift you should check it out at Red Hat site, and for further reference also take a look to their documentation, blogs and knowledge base:
Things to take into account:
- We have 512 MB of disk space
- We have 300 MB of RAM and 100 MB of swap
After this briefly introduction, in order to setup OpenShift in our machine we have to install a new channel as usual and set up EPEL/Openshift repositories(this demo is based in RHEL 6.2):
rhn-channel -a -c rhel-x86_64-server-optional-6
rpm -ivh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm
wget https://openshift.redhat.com/app/repo/openshift.repo -O /etc/yum.repos.d/openshift.repo
yum install rhc -y
Now we just have to create our domain and our PHP application:
rhc-create-domain -n -l
rhc-create-app -a -t php5.3
For example, my domainname is prova and my appname is mw, so my service URL is:
Next step is set up our embedded database. Take note of your mysql admin password and connection URL:
rhc-ctl-app -a mw -e add-mysql-5.1
Mysql 5.1 database added. Please make note of these credentials:
Root User: admin
Root Password: xxxxxxx
Database Name: mw
Connection URL: mysql://127.6.x.y:3306/
Finally we’ll need to configure a demo wikipedia/wordpress in our OpenShift Express application with MySQL support, stay tuned for my next post 😉