Installing XAMPP - Fordham

39
Installing XAMPP On Windows

Transcript of Installing XAMPP - Fordham

Page 1: Installing XAMPP - Fordham

Installing XAMPPOn Windows

Page 2: Installing XAMPP - Fordham

Downloading XAMPPGet it from https://www.apachefriends.org/download.html

Page 3: Installing XAMPP - Fordham

Also available for Linux, Mac

Page 4: Installing XAMPP - Fordham

Run the installer as usual

Page 5: Installing XAMPP - Fordham

May get warnings. Continue.

Page 6: Installing XAMPP - Fordham

Begin installation

Page 7: Installing XAMPP - Fordham

Only need Apache, MySQL, PHP, phpMyAdmin for this class.

No harm installing the whole nine yards if you have the disk space.

Page 8: Installing XAMPP - Fordham

Accept the default install folder

Page 9: Installing XAMPP - Fordham

It will inform you about Bitnami

Ignore for now. We have a job to do.

Page 10: Installing XAMPP - Fordham

Start install

Page 11: Installing XAMPP - Fordham

Installation in progress

Takes a few minutes

Page 12: Installing XAMPP - Fordham

If Windows firewall is on the job, you need to tell it it’s OK. Best not check the Public networks box.

Page 13: Installing XAMPP - Fordham

Done. Ready to play with it.

Page 14: Installing XAMPP - Fordham

XAMPP control panelStart Apache web server

Page 15: Installing XAMPP - Fordham

Visit http://localhost

Select your language. It will remember in future (but provide paths to others).

It works!

Page 16: Installing XAMPP - Fordham

XAMPP home page (English)

Page 17: Installing XAMPP - Fordham

Another test

Document root contains both index.php and index.html.

Server is configured to give index.php preference, taking you to xampp area.

Add index.html onto URL to override default and get to this small test page.

Page 18: Installing XAMPP - Fordham

Viewing your site from elsewhere

• Assuming you have a home network, want to let your mom view your site on her tablet via WiFi LAN.

• Use Run, enter command ipconfig to see your machine’s IP address, or find it in network settings. Say, 192.168.1.3.

• If mom visits http://192.168.1.3/index.html , she will see the “It works!” test page.

• However, the xampp area is protected, only viewable from localhost.

Page 19: Installing XAMPP - Fordham

Back to control panelStart MySQL database server

Page 20: Installing XAMPP - Fordham

Again, Windows Firewall may pop up

Page 21: Installing XAMPP - Fordham

Control also from taskbar icon

Located in lower right of screen, near USB and Bluetooth controls.

Right-click icon to bring up menu.

Page 22: Installing XAMPP - Fordham

Configure control panel

Page 23: Installing XAMPP - Fordham

Set default text editor

Will be used to edit configuration files.Do NOT use Word or WordPad!

Page 24: Installing XAMPP - Fordham

Text editor• By the way, I recommend Notepad++ to edit

configuration files and HTML or PHP code• Syntax-aware color coding

• Edit multiple buffers at one time

• Regular expression search/replace

• Get it from http://notepad-plus-plus.org/

Page 25: Installing XAMPP - Fordham

Now let’s check status

Page 26: Installing XAMPP - Fordham

Everything we need is running

Page 27: Installing XAMPP - Fordham

Security!!!

Page 28: Installing XAMPP - Fordham

Security assessment.

Actually this is not true. New XAMPP security concept restricts all sensitive directories to localhost.

See C:\xampp\apache\conf\extra\httpd-xampp.conf

Page 29: Installing XAMPP - Fordham

Let’s tighten security.

Click here to fix security issues

Page 30: Installing XAMPP - Fordham

Set MySQL “root” password

DO NOT CHECK THIS BOX!

Old password: empty (none)New password twice to verify

Page 31: Installing XAMPP - Fordham

Password changed. In control panel, restart MySQL for it to take effect.

Page 32: Installing XAMPP - Fordham

Visit phpMyAdmin from xampphome page.

Username: rootPassword: as just set

Page 33: Installing XAMPP - Fordham

phpMyAdmin home page

Use it to manage your MySQL databases.

Page 34: Installing XAMPP - Fordham

Back to security: protect xamppdirectory

DO NOT CHECK THIS BOX!

Invent a usernameCreate a password

Page 35: Installing XAMPP - Fordham

All systems secure.

Page 36: Installing XAMPP - Fordham

Taking ownership• Document root is C:\xampp\htdocs

• Get there using Explorer on XAMPP console

Page 37: Installing XAMPP - Fordham

XAMPP installation directory

Enter htdocs directory

Page 38: Installing XAMPP - Fordham

Document root: C:\xampp\htdocs

Server configuration causes index.php to take precedence over index.html

Rename index.php to something like index-orig.php so it will no longer be used by default.You can still get to xampp page by giving URL http://localhost/xampp

Page 39: Installing XAMPP - Fordham

Now server defaults to index.htmlEdit this file to customize your site.