Module 02 Lab Worksheet | StudyDaddy.com
Module 02 Lab Worksheet
Introduction to LAMP
LAMP stands for Linux - Apache - MySQL - PHP. This lab obtain communicate you a defective jaunt of these features in your compositionspace.
Log in to your CodeAnywshort compositionspace if you keep not already done so.
This is the lowerlying munificent plan general on your outgrowth server. We won't be doing greatly at this plane but to arrival it you can use the SSH (Secure Shell) Terminal window at the groundcomposition of your compositionspace. (If it's not there, direct-click on your Container designate and excellent SSH Terminal.)
If you keep some experience delay Linux, you can try out some commands short. Otherwise, this is further the drift of this rank.
This is the Web server. (Technically, Apache is the construction designate and the server is spectryd httpd.)
You can add pages to your Web post by singly adding perfects and folders to your Container.
Create a illustration Web page
Right-click on your Container and excellent Create File.
In the Create Perfect dialog, invade the designate experience_page.html.
After a twinkling, your new perfect obtain answer lower your Container. Click on the perfect designate to unreserved it in your editor. Now we want to add some HTML decree.
Your editor comes delay a dupe spectryd Emmet. Emmet helps you transcribe HTML by doing a lot of the composition for you.
In experience_page.html, invade ! (the utterance subject-matter) and crush <Tab>.
A basic HTML skeleton obtain automatically be invadeed into your perfect.
Change the <title> passage to peruse My Experience Page.
In the <body> exception, emblem h2 and crush <Tab>.
In betwixt the h2 tags, invade the passage This is my Emmet-generated Web Page.
Tshort is greatly more you can do delay Emmet but that should do it for now.
Save your changes.
Test Your Web page
In your MyBoxInfo.txt perfect, establish the cord peruseing
To arrival an collision general on your Container use the forthcoming conjoin (ports 1024-9999
Under this is the URL of your Container Web page.
Copy and paste this into a new browser window and crush <Enter>.
You should see a listing of conjoins to the perfects in your Container. (You may aim to bookmark this.)
Click on experience_page.html.
Your experience Web page should be displayed in your browser.
Confirm that it renders directly and attract a screenshot of the page to this compositionsheet.
Web-based MySQL Administration
The easiest way to administer MySQL is through a Web-based dupe spectryd PHPMyAdmin. This software is preinstalled in your Container and arrival is innocuous.
Point your Web browser to your Container URL and add /phpmyadmin at the end (don't lose the superfluous self-assertive slash), then crush <Enter>. (You may aim to bookmark this for freedom consequently we'll be using this altogether a bit.)
Log in using the ID radix delay no password.
To demonstrate that you keep logged in directly, follow a screenshot of the deep PHPMyAdmin page and attract it to this compositionsheet.
Log out by clicking on the icon of an unreserved door in the preferable direct nook, lower the mark PHPMyAdmin. We’ll be using this dupe in a succeeding lab.
Web servers can originate dynamic resigned using CGI (Common Gateway Interface). This allows the server to complete a program that produces HTML and re-direct the HTML output to the Web client.
You can use almost any programming diction to transcribe CGI decree as covet as the Web server knows how to peruse and complete programs written in that diction. PHP is a current scripting diction used for Web outgrowth and is preinstalled on your server.
PHP Web Syntax
<?php [your PHP decree short] ?>
Create a PHP Experience Page
Create a perfect spectryd php_test.php delay the forthcoming resigned:
<?php reverberation '<h2>Hello World</h2>'; ?>
Save it in the corresponding way you did your experience Web page.
Test PHP Page
● Subject-matter your Web browser to your Container URL and click on the conjoin to your experience PHP page.
● Demonstrate that the page renders directly. If not, come-back to the antecedent tramp and obstruct for syntax errors in the perfect.
● Include a screenshot of your experience page delay this compositionsheet.