SapHanaTutorial.Com HOME     Learning-Materials Interview-Q&A Certifications Quiz Online-Courses Forum Jobs Trendz FAQs  
     Explore The World of Hana With Us     
About Us
Contact Us
 Apps
X
HANA App
>>>
Hadoop App
>>>
Tutorial App on SAP HANA
This app is an All-In-One package to provide everything to HANA Lovers.

It contains
1. Courses on SAP HANA - Basics, Modeling and Administration
2. Multiple Quizzes on Overview, Modelling, Architeture, and Administration
3. Most popular articles on SAP HANA
4. Series of Interview questions to brushup your HANA skills
Tutorial App on Hadoop
This app is an All-In-One package to provide everything to Hadoop Lovers.

It contains
1. Courses on Hadoop - Basics and Advanced
2. Multiple Quizzes on Basics, MapReduce and HDFS
3. Most popular articles on Hadoop
4. Series of Interview questions to brushup your skills
Apps
HANA App
Hadoop App
';
Search
Stay Connected
Search Topics
Topic Index
+
-
Cloud Computing Overview
+
-
SAP Cloud Platform
+
-
Cloud Foundry
+
-
Internet of Things
+
-
SAP Leonardo
+
-
Examples with Pivotal CF

Run your first PHP Hello World in Pivotal Cloud Foundry

In previous articles Cloud Foundry - A Game Changer in Cloud we gave you basic introduction to Cloud Foundry. Now, let us go and create our first Hello World application using PHP in Cloud Foundry.
You might also be interested in below articles.

Scenario:

Pivotal web services (PWS) provides "Cloud Foundry as a web service," deployed on top of AWS. You'll just need create an account and you'll automatically get a sixty-day free trial.

Cloud Foundry supports many languages like Java, PHP, Ruby, Node.js etc. In this example, we will run PHP hello world program in Pivotal Web Service.

Prerequisite:

Register with Pivotal Web Service.

Step 1: Register with Pivotal Web Service

Register with Pivotal Web Service. Create your account and finally you should be able to see your Pivotal account as below.

Run your first PHP Hello World in Pivotal Cloud Foundry

Step 2: Install the Cloud Foundry Command Line Interface (cf CLI)

Cloud Foundry Command Line Interface (cf CLI) is a tool to deploy and manage applications in Cloud Foundry.

1. Click Tools on the left navigation menu of the Apps Manager to access the Tools page. Install the appropriate cf CLI version for your OS.

Run your first PHP Hello World in Pivotal Cloud Foundry

2. Add the Cloud Foundry path to environment variable.

Run your first PHP Hello World in Pivotal Cloud Foundry

3. Open Command Prompt and run "cf help" to confirm that the tool is installed correctly. The example shows the beginning lines of output for this command.

Run your first PHP Hello World in Pivotal Cloud Foundry

Step 3: Download and deploy PHP Hello World application in Cloud Foundry

1. Download the PHP Hello World program from here. Extract the zip file to a location. For example "C:\CF-PHP-HelloWorld".

2. Enter command "cf api api.run.pivotal.io" to set the API endpoint.


Run your first PHP Hello World in Pivotal Cloud Foundry
3. Enter "cf login" to login. Enter your email id and password you used while registering to Pivotal Web Service.

Run your first PHP Hello World in Pivotal Cloud Foundry
4. Open Command Prompt and enter the command "CD ".

Run your first PHP Hello World in Pivotal Cloud Foundry
5. Enter the command "cf push" to publish the Hello World application.

Run your first PHP Hello World in Pivotal Cloud Foundry
Note: Apps names are global. Hence you may encounter the following error:
"The host is taken".
To fix that, please add a suffix or prefix (or change the entire name) to the "host" attribute within the manifest.yml file.

6. Finally the application should be started and the app URL should be provided as below. For example in this case, it is helloworld-saphanatutorial.cfapps.io

Run your first PHP Hello World in Pivotal Cloud Foundry
7. Copy the URL (in this case helloworld-saphanatutorial.cfapps.io) and paste it in browser. You will see the application running.

Run your first PHP Hello World in Pivotal Cloud Foundry
8. You can also check this application running in your Pivotal account.

Run your first PHP Hello World in Pivotal Cloud Foundry

Congratulation! You have successfully run your first PHP Hello World in Cloud Foundry.
Have any doubt or question? Please let us know in comment section. You may also try other Hello World examples:



Support us by sharing this article.



Explore More
Close X
Close X

Leave a Reply

Your email address will not be published. Required fields are marked *

Current day month ye@r *

 © 2017 : saphanatutorial.com, All rights reserved.  Privacy Policy