16

Click here to load reader

Introduction To Programming in GNU-LINUX

Embed Size (px)

Citation preview

Page 1: Introduction To Programming in GNU-LINUX

How to Start Programming inLinuxMint / Ubuntu

Page 2: Introduction To Programming in GNU-LINUX

Me?

Irfan Ahmed Rizvi 10th Semester, CSE University of Liberal Arts Bangladesh(Ulab)

Professional Web Application Developer(Ruby on Rails Framework) (Freelancing through Odesk)

Page 3: Introduction To Programming in GNU-LINUX

Topics

How To Program With C/C++ on LinuxMint/Ubuntu Distro Standard Tools Text Editors Practical Session

How To Setup Lamp Server and Develop Web App with PHP Setup Lamp Server Configure Virtual Host Running PHP file Practical Session

How To Contribute on Open Source?

Page 4: Introduction To Programming in GNU-LINUX

How To Program With C/C++ on LinuxMint/Ubuntu Distro

Page 5: Introduction To Programming in GNU-LINUX

Standard Tools for C/C++

GCC Tool Set for C/C++ It is command line driven Various IDE available that wrapped with GCC tool set. To Setup GCC easily:

sudo apt-get install build-essential sudo apt-get install gcc

Page 6: Introduction To Programming in GNU-LINUX

Compile and Run C/C++ program

Write Down the Code using you favorite text editor Run Terminal/Console If C program:

To compile run gcc <directory>/<File.c> -o <Output file name> To Run: /.<output file name> Done!

If C++ program: To compile run g++ <directory>/<File.c> -o <Output file name> To Run: /.<output file name>

Done!

Page 7: Introduction To Programming in GNU-LINUX

Text Editors

There are lots of Text Editors Vim gVim Kate gEdit Nano Emacs Eclipse(Powerful IDE) Geany Codeblock

Page 8: Introduction To Programming in GNU-LINUX

Practical Session For C/C++

Page 9: Introduction To Programming in GNU-LINUX

How To Setup Lamp Server and Develop Web App with PHP

Installing Server Writing Script with PHP Configuring Virtual Host Enable It

Page 10: Introduction To Programming in GNU-LINUX

Installing Lamp Server

No Hassle! Just A Single Command! Simply Run the Following Command on Your Console/Terminal:

sudo apt-get install lamp-server^ Provide root passwords for mysql Done! Easy nah? :P

Page 11: Introduction To Programming in GNU-LINUX

Configuring Virtual Host

Page 12: Introduction To Programming in GNU-LINUX

Save it on /etc/apache2/sites-available (and give a name with now extension)

Example: <VirtualHost *:80> ServerAdmin [email protected] ServerName 127.0.0.1 ServerAlias 127.0.0.1 DocumentRoot /var/www/ <Directory /var/www/>

Order Deny,Allow Allow from all

</Directory> </VirtualHost>

Page 13: Introduction To Programming in GNU-LINUX

Save it on: /etc/apache2/sites-available/ Enable It

sudo a2ensite <name of sites-available directory/file> sudo a2ensite hello (example: hello is save on sites-available directory)

Reload service apache2 sudo /etc/init.d/apache2 reload sudo service apache2 reload

Page 14: Introduction To Programming in GNU-LINUX

Run PHP file on Browser

Run localhost/<filename.php> http://127.0.0.1/myphp.php (example) http://localhost/myphp.php

Page 15: Introduction To Programming in GNU-LINUX

How To Contribute on Open Source?

Page 16: Introduction To Programming in GNU-LINUX

Thank You!

Q/A