4 june 2013

On the Second day of training, a little interaction with H.S. Rai sir in the morning,during that interaction, he assgigned the task to run the C++ programs on localhost i.e. apache server that we had created the past day

I searched for the procedure to do the task of running C++ programs on the apache server. I came to know it can be done by using CGI
(Common Gateway Interface)

Then i installed the g++ compiler in the system,Then i created a simple c++ program which displays Hello World and then compiled using the g++ compiler and then created the output file in the “.cgi” format and moved it to the cgi-bin directory of the server using these commands

$ sudo apt-get install g++<Enter>
$ g++ script.cpp -o script<Enter>
$ g++ script.cpp -o script.cgi<Enter>
$ mv script.cgi /usr/lib/cgi-bin<Enter>
After this i checked it at the http://localhost/cgi-bin/script.cgi which displayed the output showing the success.

About Talwinder

Believe in god and hardwork

Posted on June 4, 2013, in Daily Diary. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: