Difference between revisions of "PHP-and-MySQL/C2/XAMPP-in-Linux/English-timed"

From Script | Spoken-Tutorial
Jump to: navigation, search
 
(4 intermediate revisions by 3 users not shown)
Line 11: Line 11:
 
|00:08
 
|00:08
 
|In this tutorial, we will learn:  
 
|In this tutorial, we will learn:  
* How to install '''XAMPP''' on '''Linux'''
+
How to install '''XAMPP''' on '''Linux'''
* How to create & run a '''php''' file.
+
How to create & run a '''php''' file.
  
 
|-
 
|-
 
|00:18
 
|00:18
 
|To record this tutorial, I am using:  
 
|To record this tutorial, I am using:  
* '''Ubuntu Linux OS 14.04'''
+
'''Ubuntu Linux OS 14.04'''
* '''FireFox''' Web Browser and
+
'''FireFox''' Web Browser and
* '''Gedit''' Text editor.
+
'''Gedit''' Text editor.
  
 
|-
 
|-
 
|00:32
 
|00:32
 
| To install '''XAMPP''', you should have-  
 
| To install '''XAMPP''', you should have-  
* A working '''Internet''' connection and
+
A working '''Internet''' connection and '''Admin''' access to your computer.
* '''Admin''' access to your computer.
+
  
 
|-
 
|-
Line 33: Line 32:
 
|-
 
|-
 
|00:52
 
|00:52
|'''XAMPP''' is a Free and Open Source web server package.
+
|'''XAMPP''' is a free and '''Open source''' web server package.
  
 
|-
 
|-
 
|00:58
 
|00:58
|| '''XAMPP''' consists of, * '''Apache HTTP Server'''
+
|'''XAMPP''' consists of: '''Apache HTTP Server''', '''MySQL database''', '''Interpreters''' for scripts written in '''PHP''' and '''Perl'''.
* '''MySQL database'''
+
* '''Interpreters for scripts written in PHP and Perl'''.
+
  
 
|-
 
|-
 
|01:12
 
|01:12
| '''XAMPP''' is easy to install. It is available for '''GNU/Linux, Mac, Windows''' and '''Solaris''' operating systems.
+
|'''XAMPP''' is easy to install. It is available for '''GNU/Linux, Mac, Windows''' and '''Solaris''' operating systems.
  
 
|-
 
|-
Line 55: Line 52:
 
|-
 
|-
 
|01:31
 
|01:31
|In the '''Address bar''', type https://www.apachefriends.org/download.html and press '''Enter'''.
+
|In the '''Address bar''', type: https://www.apachefriends.org/download.html and press '''Enter'''.
  
 
|-
 
|-
 
|01:44
 
|01:44
| Scroll down the page.
+
|Scroll down the page.
  
 
|-
 
|-
Line 71: Line 68:
 
|-
 
|-
 
|02:01
 
|02:01
| My system is a '''64bit OS'''. So under version '''1.8.3 / PHP 5.5.19'''.
+
| My system is a '''64bit OS'''. So under version '''5.5.19 / PHP 5.5.19''',
  
 
|-
 
|-
Line 119: Line 116:
 
|-
 
|-
 
|03:04
 
|03:04
|so that we can run this file. Type '''chmod +x''' filename and press '''Enter'''.
+
|so that we can run this file. Type: '''chmod''' space '''+x''' space filename and press '''Enter'''.
  
 
|-
 
|-
 
|03:18
 
|03:18
| Now to run the file, type: '''sudo ./ '''filename and press '''Enter'''.
+
| Now to run the file, type: '''sudo''' space dot slash (./) filename and press '''Enter'''.
  
 
|-
 
|-
Line 147: Line 144:
 
|-
 
|-
 
|03:54
 
|03:54
|Once the installation done, uncheck '''Launch XAMPP''' check box and click on '''Finish'''.
+
|Once the installation is done, uncheck '''Launch XAMPP''' check box and click on '''Finish'''.
  
 
|-
 
|-
Line 183: Line 180:
 
|-
 
|-
 
|04:53
 
|04:53
|This is our '''Web server Appache's root directory'''.
+
|This is our '''Web server Appache''''s '''root directory'''.
  
 
|-
 
|-
 
|04:58
 
|04:58
|We have to '''save''' our '''PHP''' code files inside this folder to run it.
+
|We have to '''save''' our '''PHP''' code file inside this folder to run it.
  
 
|-
 
|-
 
|05:05
 
|05:05
|The '''Apache's root directory''' will be
+
|The '''Apache's root directory''' will be '''/opt/lampp/htdocs '''or '''/var/www''', based on your installation process.
* '''/opt/lampp/htdocs '''or
+
* '''/var/www''' based on your installation process.
+
  
 
|-
 
|-
Line 201: Line 196:
 
|-
 
|-
 
|05:30
 
|05:30
|So on the '''terminal''', type: '''sudo chmod 777 -R  /opt/lampp/htdocs''' and press '''Enter'''.
+
|So, on the '''terminal''', type: '''sudo chmod 777 -R  /opt/lampp/htdocs''' and press '''Enter'''.
  
 
|-
 
|-
 
|05:56
 
|05:56
|Enter the admin password if required.
+
|Enter the '''admin password''' if required.
  
 
|-
 
|-
Line 229: Line 224:
 
|-
 
|-
 
|06:40
 
|06:40
|Enter admin password if required.  
+
|Enter '''admin password''' if required.  
  
 
|-
 
|-
Line 237: Line 232:
 
|-
 
|-
 
|06:47
 
|06:47
|Go back to the web browser and refresh the page.
+
|Go back to the web browser and refresh the '''page'''.
  
 
|-
 
|-
Line 253: Line 248:
 
|-
 
|-
 
|07:06
 
|07:06
|Let's write a sample '''php''' code and run it.
+
|Let's write a sample '''php''' code and '''run''' it.
  
 
|-
 
|-
Line 269: Line 264:
 
|-
 
|-
 
|07:30
 
|07:30
| Open the '''phpacademy''' folder. Let us create a '''php''' file.
+
|Open the '''phpacademy''' folder. Let us create a '''php''' file.
  
 
|-
 
|-
 
|07:37
 
|07:37
|Right-click and select '''New Document''' and ''' Empty document'''. Name it as '''demo.php'''
+
|Right-click and select '''New Document''' and '''Empty document'''. Name it as '''demo.php'''.
  
 
|-
 
|-
Line 285: Line 280:
 
|-
 
|-
 
|07:59
 
|07:59
| Type: '''less than question mark php enter echo space in double quotes "Hello India”; Enter question mark greater than'''
+
|Type: less than question mark '''php''' enter '''echo''' space in double quotes "Hello India” semicolon enter question mark greater than'''
  
 
|-
 
|-
 
|08:20
 
|08:20
| To save the file, press '''Ctrl ''' and ''' S''' keys simultaneously.
+
| To '''save''' the file, press '''Ctrl ''' and ''' S''' keys simultaneously.
  
 
|-
 
|-
Line 305: Line 300:
 
|-
 
|-
 
|08:47
 
|08:47
|Here is our file '''demo.php''', click on it .
+
|Here is our file '''demo.php'''; click on it.
  
 
|-
 
|-
Line 326: Line 321:
 
|09:27
 
|09:27
 
| Let us summarize. In this tutorial, we have learnt-
 
| Let us summarize. In this tutorial, we have learnt-
* How to install, start and stop '''XAMPP services'''.
+
How to install, start and stop '''XAMPP services'''.
* How to create and run a '''PHP file'''.
+
How to create and run a '''PHP file'''.
  
 
|-
 
|-
Line 347: Line 342:
 
|-
 
|-
 
|10:19
 
|10:19
|This is Kavita Kharad from IIT Bombay signing off. Thank you for joining.  
+
|This is Kavita Kharad from IIT Bombay, signing off. Thank you for joining.  
  
 
|}
 
|}

Latest revision as of 20:45, 30 November 2018

Time Narration
00:01 Hello everyone. Welcome to this tutorial on XAMPP Installation on Linux.
00:08 In this tutorial, we will learn:

How to install XAMPP on Linux How to create & run a php file.

00:18 To record this tutorial, I am using:

Ubuntu Linux OS 14.04 FireFox Web Browser and Gedit Text editor.

00:32 To install XAMPP, you should have-

A working Internet connection and Admin access to your computer.

00:41 You should also have basic knowledge of Linux commands. If not, for relevant tutorials, please visit our website.
00:52 XAMPP is a free and Open source web server package.
00:58 XAMPP consists of: Apache HTTP Server, MySQL database, Interpreters for scripts written in PHP and Perl.
01:12 XAMPP is easy to install. It is available for GNU/Linux, Mac, Windows and Solaris operating systems.
01:23 Let's download XAMPP for Linux.
01:27 Open the web browser on your machine.
01:31 In the Address bar, type: https://www.apachefriends.org/download.html and press Enter.
01:44 Scroll down the page.
01:47 Here XAMPP is available to download for all operating systems.
01:53 Visit XAMPP for Linux section. You can see the recent version of Xampp.
02:01 My system is a 64bit OS. So under version 5.5.19 / PHP 5.5.19,
02:11 I will select Download (64 bit).
02:15 The download will start.
02:18 I have already downloaded this file in my Downloads folder.
02:24 So, I will skip downloading step.
02:28 Now open the terminal.
02:31 On the terminal, type the command cd space Downloads and press Enter.
02:40 This will change the current working directory to Downloads.
02:46 Now, type the command ls and press Enter.
02:51 This will display the contents of the Downloads folder.
02:56 Here is our XAMPP installation file.
03:00 Let's give executable permission to the file
03:04 so that we can run this file. Type: chmod space +x space filename and press Enter.
03:18 Now to run the file, type: sudo space dot slash (./) filename and press Enter.
03:29 Enter the admin password if required.
03:34 Setup wizard dialog box opens.
03:38 Click on Next button whenever required and follow the installation steps as shown.
03:46 Uncheck Learn more about Bitnami for XAMPP check box.
03:52 Click on Next.
03:54 Once the installation is done, uncheck Launch XAMPP check box and click on Finish.
04:04 This installation will create lampp folder in the system's opt folder.
04:12 Let's go there and have a look.
04:15 From the launcher on the left, click on Files folder icon.
04:21 On the left panel, under Devices section, click on Computer.
04:29 You can see the system files. Double-click on opt folder to open it.
04:38 Here it is- the lampp folder. Open this folder.
04:44 Here we can see several sub-folders.
04:48 Locate the folder named htdocs.
04:53 This is our Web server Appache's root directory.
04:58 We have to save our PHP code file inside this folder to run it.
05:05 The Apache's root directory will be /opt/lampp/htdocs or /var/www, based on your installation process.
05:24 To make htdocs folder writable, we have to change the permission.
05:30 So, on the terminal, type: sudo chmod 777 -R /opt/lampp/htdocs and press Enter.
05:56 Enter the admin password if required.
06:00 Now let's check whether Xampp is running or not.
06:04 Open the web browser. In the Address bar, type localhost and press Enter.
06:15 It shows message “Unable to connect”.
06:20 It seems Xampp services are not running.
06:23 To start the services, type on the terminal: sudo /opt/lampp/lampp start and press Enter.
06:40 Enter admin password if required.
06:44 This will start all the Xampp services.
06:47 Go back to the web browser and refresh the page.
06:52 Here it is! The welcome screen of Xampp.
06:56 It will ask us to choose the default language. I will select English.
07:03 Xampp is running perfectly now.
07:06 Let's write a sample php code and run it.
07:11 In htdocs, let's create a folder named phpacademy.
07:16 In future, I will save all my php files in this folder.
07:23 This is to ensure that my files don't get over-written by someone else.
07:30 Open the phpacademy folder. Let us create a php file.
07:37 Right-click and select New Document and Empty document. Name it as demo.php.
07:48 Open the demo.php in Gedit text editor.
07:53 You can use any editor of your choice.
07:59 Type: less than question mark php enter echo space in double quotes "Hello India” semicolon enter question mark greater than
08:20 To save the file, press Ctrl and S keys simultaneously.
08:27 Go back to the web browser.
08:29 In the address bar, type: localhost/phpacademy and press Enter.
08:40 This will display the list of files inside the phpacademy folder.
08:47 Here is our file demo.php; click on it.
08:53 Message Hello India is displayed.
08:57 To stop Xampp services, type on the terminal: sudo /opt/lampp/lampp stop and press Enter.
09:13 Enter the admin password if required.
09:17 XAMPP services will stop running. Whenever you wish to run Xampp again in future, remember to start it first.
09:27 Let us summarize. In this tutorial, we have learnt-

How to install, start and stop XAMPP services. How to create and run a PHP file.

09:45 This video summarizes the Spoken Tutorial project. If you do not have good bandwidth, you can download and watch it.
09:55 The Spoken Tutorial Project Team conducts workshops and gives certificates. For details, please write to us.
10:06 Spoken Tutorial Project is funded by NMEICT, MHRD, Government of India.
10:13 More information on this mission is available at the link shown.
10:19 This is Kavita Kharad from IIT Bombay, signing off. Thank you for joining.

Contributors and Content Editors

Minal, PoojaMoolya, Pratik kamble, Priyacst, Sandhya.np14