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

From Script | Spoken-Tutorial
Jump to: navigation, search
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
'''Title of script''': XAMPP Installation
 
 
'''Author: '''Shahid Farooqui
 
 
'''Keywords: '''XAMPP Video Tutorial, Apache, LAMPP, Web Server
 
  
 
{| border=1
 
{| border=1
 
|'''Time'''
 
|'''Time'''
 
|'''Narration'''
 
|'''Narration'''
 +
 
|-
 
|-
||00:00
+
|00:01
||Welcome to this spoken tutorial on XAMPP Installation on Linux  
+
|Hello everyone. Welcome to this tutorial on '''XAMPP Installation on Linux'''.
 +
 
 
|-
 
|-
||00:05
+
|00:08
||XAMPP is a free and open source web server package. XAMPP consists of
+
|In this tutorial, we will learn:
* Apache HTTP Server
+
How to install '''XAMPP''' on '''Linux'''
* MySQL database
+
How to create & run a '''php''' file.
* Interpreters for scripts written in PHP and Perl programming languages.
+
 
 
|-
 
|-
||00:19
+
|00:18
||In the past, this software was called LAMPP. But to avoid misconceptions it was renamed XAMPP for Linux.
+
|To record this tutorial, I am using:
 +
'''Ubuntu Linux OS 14.04'''
 +
'''FireFox''' Web Browser and
 +
'''Gedit''' Text editor.
 +
 
 
|-
 
|-
||00:27
+
|00:32
||XAMPP is easy to install.XAMPP is available for Windows, Linux, Mac OSX and Solaris.
+
| To install '''XAMPP''', you should have-
 +
A working '''Internet''' connection and '''Admin''' access to your computer.
 +
 
 
|-
 
|-
||00:35
+
|00:41
||I am using Ubuntu Linux version 10.04
+
|You should also have basic knowledge of '''Linux''' commands. If not, for relevant tutorials, please visit our website.
 +
 
 
|-
 
|-
||00:39
+
|00:52
||You should have admin access.
+
|'''XAMPP''' is a free and '''Open source''' web server package.
 +
 
 
|-
 
|-
||00:41
+
|00:58
||The first step is to download XAMPP for Linux.
+
|'''XAMPP''' consists of: '''Apache HTTP Server''', '''MySQL database''', '''Interpreters''' for scripts written in '''PHP''' and '''Perl'''.
 +
 
 
|-
 
|-
||00:44
+
|01:12
||XAMPP for Linux can be downloaded at from following link
+
|'''XAMPP''' is easy to install. It is available for '''GNU/Linux, Mac, Windows''' and '''Solaris''' operating systems.
 +
 
 
|-
 
|-
||00:48
+
|01:23
||http://www.apachefriends.org/en/xampp.html]
+
| Let's download '''XAMPP for Linux'''.
 +
 
 
|-
 
|-
||00:58
+
|01:27
||Switch to the website.
+
|Open the web browser on your machine.
 +
 
 
|-
 
|-
||00:59
+
|01:31
||Links are also available to download XAMPP for Windows, for Mac OSX and Solaris.
+
|In the '''Address bar''', type: https://www.apachefriends.org/download.html and press '''Enter'''.
 +
 
 
|-
 
|-
||01:09
+
|01:44
||We will choose the XAMPP for Linux link.
+
|Scroll down the page.
 +
 
 
|-
 
|-
||01:13
+
|01:47
||Let us click here.
+
|Here '''XAMPP ''' is available to download for all operating systems.
 +
 
 
|-
 
|-
||01:14
+
|01:53
||Scroll down and click on Step1 to Download
+
|Visit '''XAMPP for Linux''' section. You can see the recent version of '''Xampp'''.
 +
 
 
|-
 
|-
||01:19
+
|02:01
||Now click on '''XAMPP Linux 1.7.7''' and follow the steps to download it.
+
| My system is a '''64bit OS'''. So under version '''5.5.19 / PHP 5.5.19''',
 +
 
 
|-
 
|-
||01:26
+
|02:11
||I have already downloaded this file on Desktop in order to save time.
+
|I will select '''Download (64 bit)'''.
 +
 
 
|-
 
|-
||01:30
+
|02:15
||Now open a terminal by pressing the keys '''Ctrl, Alt and T''' simultaneously.
+
|The download will start.
 +
 
 
|-
 
|-
||01:37
+
|02:18
||A terminal window appears on the screen.
+
|I have already downloaded this file in my '''Downloads''' folder.
 +
 
 
|-
 
|-
||01:40
+
|02:24
||Type the command.'''cd space Desktop''' and press Enter to change the directory to Desktop
+
|So, I will skip downloading step.
 +
 
 
|-
 
|-
||01:48
+
|02:28
||Type the command.'''ls'''and press Enter to display the content of the Desktop.
+
| Now open the '''terminal'''.
 +
 
 
|-
 
|-
||01:55
+
|02:31
||XAMPP installation file is available on Desktop.
+
|On the '''terminal''', type the command '''cd space Downloads''' and press '''Enter'''.
 +
 
 
|-
 
|-
||01:58
+
|02:40
||Type the command.'''sudo space tar space xvfz space xampp-linux-1.7.7.tar.gz space -C space /opt'''
+
|This will change the current working directory to '''Downloads'''.
 +
 
 
|-
 
|-
||02:13
+
|02:46
||Type the sudo password and press Enter.
+
| Now, type the command '''ls ''' and press '''Enter'''.
 +
 
 
|-
 
|-
||02:16
+
|02:51
||Sorry I typed the wrong password that is why it giving me the error "Sorry, try again"
+
|This will display the contents of the '''Downloads''' folder.
 +
 
 
|-
 
|-
||02:23
+
|02:56
||Type the correct sudo password and press Enter.So, we have successfully extracted the downloaded archive.
+
|Here is our '''XAMPP''' installation file.
 +
 
 
|-
 
|-
||02:33
+
|03:00
||Now, type the command.'''cd space /opt '''and press Enter to change the directory to '''opt.'''
+
|Let's give executable permission to the file
 +
 
 
|-
 
|-
||02:43
+
|03:04
||Type the command.'''ls '''and press Enter to display the content of the directory '''opt.'''
+
|so that we can run this file. Type: '''chmod''' space '''+x''' space filename and press '''Enter'''.
 +
 
 
|-
 
|-
||02:50
+
|03:18
||XAMPP is now installed under the /opt/lampp directory.
+
| Now to run the file, type: '''sudo''' space dot slash (./) filename and press '''Enter'''.
 +
 
 
|-
 
|-
||02:57
+
|03:29
||Type the command.'''cd space lampp'''
+
|Enter the '''admin password''' if required.
 +
 
 
|-
 
|-
||03:02
+
|03:34
||Type the command.'''ls '''and press Enter to display the content of the directory '''lampp.'''
+
|'''Setup wizard''' dialog box opens.
 +
 
 
|-
 
|-
||03:09
+
|03:38
||The next step is to start XAMPP.
+
|Click on '''Next''' button whenever required and follow the installation steps as shown.  
 +
 
 
|-
 
|-
||03:13
+
|03:46
||Type the command.'''sudo space /opt/lampp/lampp space start'''and press Enter
+
|Uncheck '''Learn more about Bitnami for XAMPP''' check box.
 +
 
 
|-
 
|-
||03:27
+
|03:52
||Enter the sudo password and Press Enter
+
|Click on '''Next'''.
 +
 
 
|-
 
|-
||03:32
+
|03:54
||XAMPP for Linux has sucsessfully started.
+
|Once the installation is done, uncheck '''Launch XAMPP''' check box and click on '''Finish'''.
 +
 
 
|-
 
|-
||03:36
+
|04:04
||Now let us test our XAMPP installation.
+
|This installation will create '''lampp''' folder in the system's '''opt''' folder.
 +
 
 
|-
 
|-
||03:40
+
|04:12
||I will switch to the Firefox browser for this purpose.
+
|Let's go there and have a look.
 +
 
 
|-
 
|-
||03:43
+
|04:15
||Type the URL http://localhost in address bar and press Enter.
+
|From the '''launcher''' on the left, click on '''Files''' folder icon.
 +
 
 
|-
 
|-
||03:55
+
|04:21
||You will see the URL http://localhost/xampp splash.php''' in your web browser.  
+
|On the left panel, under '''Devices''' section, click on '''Computer'''.
 +
 
 
|-
 
|-
||04:07
+
|04:29
||This shows that the Apache server is running.Now I will create my home page in html.
+
|You can see the system files. Double-click on '''opt''' folder to open it.
 +
 
 
|-
 
|-
||04:15
+
|04:38
||It will be displayed on the web browser
+
| Here it is- the '''lampp''' folder. Open this folder.
 +
 
 
|-
 
|-
||04:18
+
|04:44
||Switch to the terminal.Type the command.'''cd space /opt/lampp/htdocs'''and Press Enter to change the directory to '''/opt/lampp/htdocs'''
+
|Here we can see several sub-folders.
 +
 
 
|-
 
|-
||04:36
+
|04:48
||This is the path of our web directory
+
|Locate the folder named '''htdocs'''.
 +
 
 
|-
 
|-
||04:39
+
|04:53
||Type the command.'''sudo space mkdir space myhomepage'''and Press Enter to create the directory '''myhomepage'''
+
|This is our '''Web server Appache''''s '''root directory'''.
 +
 
 
|-
 
|-
||04:51
+
|04:58
||Type the command.'''ls '''and press Enter to display the content of the directory '''htdocs.'''
+
|We have to '''save''' our '''PHP''' code file inside this folder to run it.
 +
 
 
|-
 
|-
||04:58
+
|05:05
||Type the command.'''cd space myhomepage'''Press Enter to change the directory to '''myhomepage'''
+
|The '''Apache's root directory''' will be '''/opt/lampp/htdocs '''or '''/var/www''', based on your installation process.
 +
 
 
|-
 
|-
||05:08
+
|05:24
||Now I will create my home page in html
+
|To make '''htdocs''' folder writable, we have to change the permission.
 +
 
 
|-
 
|-
||05:12
+
|05:30
||Type the command.'''sudo space gedit space index.html'''Press Enter to create index.html using gedit text editor.
+
|So, on the '''terminal''', type: '''sudo chmod 777 -R  /opt/lampp/htdocs''' and press '''Enter'''.
 +
 
 
|-
 
|-
||05:32
+
|05:56
||To learn HTML, please watch the tutorials available on our website.
+
|Enter the '''admin password''' if required.
 +
 
 
|-
 
|-
||05:37
+
|06:00
||In order to save time, I will copy-paste an HTML code here
+
|Now let's check whether '''Xampp''' is running or not.
 +
 
 
|-
 
|-
||05:43
+
|06:04
||Text written between the title tag will be displayed on the title bar of the browser.  
+
|Open the web browser. In the '''Address bar''', type '''localhost''' and press '''Enter'''.
 +
 
 
|-
 
|-
||05:49
+
|06:15
||Text written between the body tag will be displayed in the browser.  
+
|It shows message '''“Unable to connect”'''.
 +
 
 
|-
 
|-
||05:54
+
|06:20
||Click on "Save" button to save the file.Close the gedit window.
+
|It seems '''Xampp''' services are not running.
 +
 
 
|-
 
|-
||05:59
+
|06:23
||Switch back to Firefox browser
+
|To start the services, type on the '''terminal''': '''sudo /opt/lampp/lampp start''' and press '''Enter'''.
 +
 
 
|-
 
|-
||06:02
+
|06:40
||Type the URL http://localhost/myhomepage and press Enter.
+
|Enter '''admin password''' if required.  
 +
 
 
|-
 
|-
||06:13
+
|06:44
||You can see the welcome message is displayed in the web browser.
+
|This will start all the '''Xampp services'''.
 +
 
 
|-
 
|-
||06:20
+
|06:47
||So that's how we install, start and test XAMPP.  
+
|Go back to the web browser and refresh the '''page'''.
 +
 
 
|-
 
|-
||06:26
+
|06:52
||Switch back to slide.I will now talk about the Spoken Tutorial Project
+
|Here it is! The welcome screen of  '''Xampp'''.
 +
 
 
|-
 
|-
||06:31
+
|06:56
||Watch the video available at http://spoken- tutorial.org/What_is_a_Spoken_Tutorial
+
|It will ask us to choose the default language. I will select '''English'''.
 +
 
 
|-
 
|-
||06:42
+
| 07:03
||It summarises the Spoken Tutorial project.  
+
| '''Xampp '''is running perfectly now.
 +
 
 
|-
 
|-
||06:46
+
|07:06
||If you do not have good bandwidth, you can download and watch it.  
+
|Let's write a sample '''php''' code and '''run''' it.
 +
 
 
|-
 
|-
||06:51
+
|07:11
||The Spoken Tutorial Project Team.Conducts workshops using spoken tutorials.  
+
| In '''htdocs''', let's create a folder named '''phpacademy'''.
 +
 
 
|-
 
|-
||06:57
+
|07:16
||Gives certificates to those who pass an online test.  
+
|In future, I will '''save''' all my '''php''' files in this folder.
 +
 
 
|-
 
|-
||07:01
+
|07:23
||For more details, contact sptutemail@gmail.com
+
|This is to ensure that my files don't get over-written by someone else.
 +
 
 
|-
 
|-
||07:06
+
|07:30
||Spoken Tutorial Project is a part of the Talk to a Teacher project.
+
|Open the '''phpacademy''' folder. Let us create a '''php''' file.
 +
 
 
|-
 
|-
||07:11
+
|07:37
||It is supported by National Mission on Education through ICT, MHRD, Government of India
+
|Right-click and select '''New Document''' and '''Empty document'''. Name it as '''demo.php'''.
 +
 
 
|-
 
|-
||07:17
+
|07:48
||More information on this mission is available at, http://spoken-tutorial.org/NMEICT-Intro
+
|Open the '''demo.php''' in '''Gedit text editor'''.
 +
 
 
|-
 
|-
||07:27
+
|07:53
||We have come to the end of this tutorial.
+
|You can use any editor of your choice.
 +
 
 
|-
 
|-
||07:30
+
|07:59
||Thanks for joining.
+
|Type: less than question mark '''php''' enter '''echo''' space in double quotes "Hello India” semicolon enter question mark greater than'''
 +
 
 
|-
 
|-
||07:32
+
|08:20
||This is Shahid Farooqui from IIT Bombay signing off.
+
| To '''save''' the file, press '''Ctrl ''' and ''' S''' keys simultaneously.
Good Bye
+
  
 +
|-
 +
|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.
  
 
|}
 
|}

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