lab9
.pdf
keyboard_arrow_up
School
Northern Kentucky University *
*We aren’t endorsed by this school
Course
436
Subject
Computer Science
Date
Apr 3, 2024
Type
Pages
4
Uploaded by KidFire12260
CIT 436 Lab 9 Due Monday, March 18 by 8 am (emailed to foxr@nku.edu
) You will install and run Squid in this lab. Boot VM2, open three terminal windows and su to root in each. Open your web browser. In this lab you will be asked to clear your browser history several times. To do this, select the menu button (3 horizontal lines) followed by History
>
Clear
Recent History…
and select OK
(to clear all settings). Boot VM1 (with your Apache server) and start Apache. Make a note VM1’s IP address. WARNING: Step 1d will take 30-60 minutes; make sure you build that time into your schedule. 1.
Exploring the Squid open source package a.
In your web browser, go to www.squid-cache.org/Versions/v5 and select the most recent version’s tar.gz
download (do not select the sig
version). Save the downloaded package. In your terminal window, cd to your account’s Downloads
directory. Type ls
. You should find the downloaded file here named squid-
version
.tar.gz such as squid-5.9.tar.gz
. Type tar xzf filename
and cd into the directory created. Type ls
. You will notice a configure
script and a Makefile
. This allows us to either use ./configure
to tailor our installation or go right to the make
/
make install
steps. We will use configure
. Answer the following questions about the contents of this directory. i.
In which directories do you find the .cc (source code) files? ii.
In which directory do you find nothing but .h (header) files? iii.
The errors directory contains subdirectories of files in different languages. Look in errors/en (English). What are these files used for? They do not have extensions but you can determine their type by viewing one. What type are they? iv.
What type of content is stored in the icons/silk
subdirectory? v.
Type less INSTALL
and look at the installation instructions. What three steps are recommended to compile and install Squid? In which location does it state that you should find the squid configuration file? What option should you use to initialize Squid?
b.
Type ./configure --help | less
and scroll through the information. Without using –-prefix
, the Squid components are placed in various directories (see pages 412-
413 of the textbook). Another option is to specify locations for these various components. For each of the following, what ./configure
option is used to specify its location?
i.
user executables ii.
system administration executables iii.
man pages iv.
root directory for all documentation c.
Continuing to step through ./configure
’s help, answer the following questions. i.
How would you specify less verbose build output (V=1)? ii.
How would you enable or disable a feature named foo
? iii.
How would you enable or disable a package named foo
?
d.
Type ./configure
. What error message arises?
Type dnf -y install g++ openssl-devel
. g++
is the GNUs C++ compiler, which is different from gcc
and needed to install Squid. The second, openssl-devel
installs tools needed by Squid to work with HTTPS (which we add in lab 12). Issue the full command as shown below.
./configure --prefix=/usr/local/squid --enable-auth-
helpers=NCSA --enable-ssl-crtd --with-openssl
The enable
/
with
options will be used in labs 10 and 12. The ./configure
script will take several minutes to complete. Next, type make
, which will take 40-60 minutes. e.
While make
is running,
research the difference between gcc and g++
and explain why we are using g++
to compile Squid rather than gcc
.
Return to your web browser and in the left column select About Squid
. What does the page say about the protocols that Squid is written for and is mostly written for? What software products is Squid based on? Who funded Squid, at least in part?
When make
ends, type make install
(make sure you are root for this step). This will only take a couple of minutes. 2.
Exploring the installed Squid Server a.
(1) Type cd /usr/local/squid
. What are the top-level directories? In which directory is the squid
program stored? In step 1a, we saw directories of errors
, icons
and man
pages. What subdirectory of squid have they been copied into? b.
(1) cd into the var
subdirectory. You will find three subdirectories, all of which are either empty or contain a single, empty subdirectory. At what point will each of these subdirectories begin to get populated with content?
You may want to defer answering part of this question until you have completed 2c and part of this question you should be able to answer by looking at the subdirectory names. cd back to the top-level squid
directory. c.
(1) cd to squid/sbin
. We use squid to run Squid. Type ./squid -h to view the help page. We start Squid with ./squid
, but we can add -k
to specify other run options. What are the options available when using -k
?
By default, Squid runs in the background but -N
runs Squid in the foreground. Look at option -z
. What does this option do?
Go back to answer the rest of 2b’s questions. d.
(1) Type ls ../bin
. Two additional programs are squidclient
and purge
. Attempt to view the man
page for each of squid
, squidclient
and purge
. What happens? As with Apache, the man pages are not placed in a default location for man to find them. In our case, the Squid man pages are found under /usr/local/squid/share/man
. Update manpath
by editing /etc/man_db.conf
in vi
and add MANDATORY_MANPATH /usr/local/squid/share/man
after the three existing MANDATORY_MANPATH
entries. Save and exit vi
. You can now use man
on each of squid
, squidclient
and purge
. Use man
to answer the following questions. i.
What protocols does squid support?
(see the 1
st
and 3
rd
paragraphs of the description)
ii.
How does squidclient
differ from squid?
iii.
What does purge
do?
3.
Running Squid a.
(1) cd to the sbin
directory. Type ./squid -k parse
. This command causes Squid to parse the configuration file to look for errors but does not start Squid. You will likely see lines of Startup or Processing. (2) Type cd /usr/local/squid/etc
and load squid.conf
into vi
. Type G
to reach the bottom of the file and add a new line with the text foobar
. Save the file and (1) repeat squid -k parse
command. Near the bottom
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
Develop an app in Android Studio that uses a Recycler View to show list of cars and their makers. The design of the app should contain two Text Views and one Image View. In the first Text View, the name of the cars should be displayed. In the second Text View, the maker of the car should be displayed. The Image View should show a delete icon. The app should have a design like shown below in the first screenshot. You are free to use any layout you want, e.g., ConstraintLayout, LinearLayout or RelativeLayout etc. You can also use combination of these layouts.
On the click of the delete icon on a row, that particular row should be delete. Please make sure the row is deleted only when the delete icon in that row is clicked. The row should NOT be deleted on the click on any other place than the delete icon. The second screenshot above shows the state of the app after deleting some of the records from the Recycler View on the click of delete icons.
Please note the followings:…
arrow_forward
Visit the following webpage: https://archive.org/details/National_Geographic_Wallpapers This webpage hosts a collection of 506 images from National Geographic Magazine with most of these images previously being part of an international photography contest. Your task is to randomly choose 5 images and identify the objects within those images using Google’s vision API. Submit your iPython notebook code, and screenshots of output as shown below.
You may need to reactivate your Google vision API account (or billing information for trial cycles) if you haven’t used it recently.
Here is the sample code
import base64
import urllib
import os
import io
import PIL
from IPython.display import display, Image
GOOGLE_API_KEY = '' #Use your Google API key here
pip install google-api-python-client
from googleapiclient.discovery import build
service = build('vision', 'v1', developerKey=GOOGLE_API_KEY)
cat = 'C:\\Users\\Instagram and neural networks\\cat.jpg'
def label_image(path=None, URL=None,…
arrow_forward
Determine if the statement is true or false:
Navigation.PushAsync will allow the developer of a MAUI application to display a new page to the user, as well as allow the user to navigate back to the previous page using the back arrow button.
arrow_forward
Japanese Fusion Restaurant Online Ordering Application
Below is a basic outline and description of the Japanese Fusion restaurant online ordering application based on the given requirements:
1. Landing Page (Home):
Welcome message: "Welcome to Japanese Fusion Restaurant."
Visually appealing images of the dining area and a sushi restaurant.
A "View Menu" button at the end of the description to lead users to the menu section.
Navigation bar at the top with hyperlinks to "Home," "Menu," "About Us," and "Checkout" sections.
2. Menu and Ordering Page:
Display menu items in a 3-column layout using an HTML table.
Include options for various sushi types.
Provide relevant details for each sushi item, including name, description, and price.
Add pictures for each sushi type to enhance the visual appeal.
Implement a "Customize" button for each sushi item to allow users to customize their order.
Utilize JavaScript to perform computations, such as calculating the total cost of the order based on…
arrow_forward
Note:- Don't copy from other contents if any wrong i will downvote
arrow_forward
Create an app that provides the day of the week for any date a user enters and make it useable across all browsers.
Steps:
Download and unzip the Lab 7 file.
In the index.html file:
Enter your name and today’s date where indicated in the comment section in the document head.
Add script tag to access script.js file
In the script.js file:
Add an onclick event handler for the addButton object. Within the event handler do the following:
Use the push() method to add the value of the customerName object to the end of the customers array.
Run the generateCustomerList() function to update the contents of the ordered list that appears on the web page.
Change the text of the status paragraph to “customer added to the end of the queue” where customer is the value of the customerName object.
Add an onclick event handler for the searchButton object. Within the event handler do the following:
Use the indexOf() method to locate the index of the array item whose value equals the value of…
arrow_forward
Save : You'll use this command to create a copy of a document while
keeping the original. When you use Save As, you'll need to choose a
different name and/or location for the copied version.
O True
O False
Word includes different options for customizing a table, including adding
rows or columns and changing the table style.
O True
False
If there is text you want to move from one area of the document to
another. you can copy and paste or drag and drop the text.
O True
False
arrow_forward
Android Studio Java
Create a detailed plan to implement the app and submit this file
The plan should include at least
App Feature Description (graph if needed)
Tech Difficulty
Solution to Each Difficulty in Detail (tutorial/image if needed)
Version of Approach
2. Layout of a simplified version
Create an android app and do layout only
Climacons.ttf for weather condition icons
Fixed weather values, no function
As close as possible
Ignore the page indicators (4 dots) at the bottom
Layout should look properly on different screens
Submit .xml file and screenshot
arrow_forward
complete the lab
screenshot the answers
❑ Open Notepad (usually located in the Accessories folder) and type in the following code:o <html>▪ <head>▪ </head>▪ <body>▪ </body>o </html>❑ Save this file as la3-1.html❑ Open the file in Internet Explorer. What can you see on the page?❑ What can you see at the very top of the page next to the IE logo?
Adapted from the University of Ballarat❑ Leave your browser window open. Update your HTML code with the following line - place the code between <head> and </head>:o <title>[your name]’s hand-coded webpage </title>▪ [your name] should contain your own name❑ Save the file again and view it in your browser (you may have to refresh the page to see any changes).❑ What has changed?..............................................................................................................................................................................❑ Add the following code between the two…
arrow_forward
Using netbeans, fix the given code below and run it using netbeans. Show the screenshot result. It should be the same as the result picture given below
arrow_forward
Your app has a button that switches the screen color between red and yellow when it is pressed.
Select the correct code snippet to make this functionality work.
@IBAction func button Pressed ( sender: Any) {
isYellow = !is Yellow
if isYellow {
A.
}
OB.
OC.
view.backgroundColor = .red
view.backgroundColor = .yellow
} else {
@IBAction func button Pressed (
is Yellow = !isYellow
if isYellow (
} else {
backgroundColor = .red
backgroundColor = .yellow
@IBAction func buttonPressed( sender: Any) {
isYellow = !isYellow
if isYellow {
}
view= .red
} else {
sender: Any) {
view= .yellow
ATRACtion func button Pressed ( sender: Anv) (
arrow_forward
URGENT!!!
arrow_forward
Choose:
ANY keyboard event
ANY mouse event
and either Scroll, Resize, Focus, Blur, Select, or Change
Make sure it's clear in the HTML what the user (aka ME) should be doing to trigger your events.Make 3 HTML/JavaScript files (use embeded aka <script> tags to make it easier) one for the old HTML method, the DOM Event Handler method, and the Event Listener method. They should look all the same just have the events coded differently.Subject matter can be whatever you want, the assignment is not dependent on content as it is functionality. Just make it PG, obviously! You can have fun with it. Silly is fine.
arrow_forward
PLS GIVE ME THE CORRECT ANSWER
arrow_forward
Create a AWS glue job in Aws glue stuido. please do this in Aws account and give me a screenshot if not downvote
arrow_forward
The login.html image is shown below. The simple PHP module shows email and password fields for a user to enter. Analyze the code and identify one issue with the code regarding security. Explain the problem
by identifying the line no. and provide the corrected line of code.
login.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Login Form
Login
Email Address:
Password:
15
16
17
arrow_forward
Please view attachment before answering. The attachment includes the tables and its contents. I am in need of assistance with both parts, A and B. I am unsure on how i can go about attempting the question. I am using mysql terminal. Please explain solution in detail so i can fully understand . Attaching a visual will be of great help as well. (as in a screenshot or so) Thank you so much in advance!
Part A - In the CREATE TABLE statement for Song, rename GenreCode to Code. Modify the SELECT statement to work with the new name. Run the SQL and verify the result table is unchanged.
Part B - Modify the SELECT statement to perform a left join. Run the SQL and verify the result table includes songs with NULL genre.
arrow_forward
Please view attachment before answering. The attachment is the table and its contents. I am in need of assistance with both part A. I am unsure on how i can go about attempting the question. I am using mysql terminal. Please explain solution in detail so i can fully understand . Attaching a visual will be of great help as well. (as in a screenshot or so) Thank you so much in advance!
Part A - Display the employee number, hire date, number of months employed, last day of the hire month from employee. Give the number of months employed as ‘months_worked’
Hint: Use TIMESTAMPDIFF(month,hire_date,CURDATE()) to get the number of months employed. Use LAST_DAY() with appropriate argument to get the last day of the hire month
arrow_forward
Please create an online document editor using HTML, CSS, and JavaScript. Include a menu where it show a cool journal logo and a button (Start journaling) to click
In the online document editor include a copy and paste button, a file button, where user can click new (to open a new page) Open to click on any existing documents. Let documents be saved automatically.
Please also include:
- Font Size
- Font Type
- Bold text button
- A way to change font color
- And when writing once the text gets to the end of the page, let it start a new line
arrow_forward
these assignments is about web design plz make it as soon as possible
arrow_forward
Create a web form to help in creating simple random passwords. Your web form should have four text fields named Word1, Word2, Word3, and Word4, as well as “Reset” and “Submit” buttons. You need to create a separate PHP form-processing script that verifies that all four words are entered, that all of them contain only letters, and that all four are between 4 and 7 characters long. Once all of the words have been verified as correct, use the strtoupper() and str_shuffle() functions to produce four suggested jumbled sets of passwords using the words entered in the text fields
Note: you need to perform the validation on the server side using PHP scripts. use the preg_match() function to check for letters
arrow_forward
https://drive.google.com/file/d/1WvadErM-1ffp8gm2LcdqdMrtZ0gv3fJv/view?usp=sharing
here in that link there is my code can please add comments to my code and describe me what is happening
arrow_forward
Add to the Shopping List application the possibility for the user to save the products entered and the favorite ones in the database and add the profile editing option.
Answer using FLUTTER ONLY
FLUTTER CODE ONLY
arrow_forward
Please view attachment before answering. The attachment includes the tables and its contents. I am in need of assistance with both parts, A and B. I am unsure on how i can go about attempting the question. I am using mysql terminal. Please explain solution in detail so i can fully understand . Attaching a visual will be of great help as well. (as in a screenshot or so) Thank you so much in advance!
Part A - Modify the SELECT statement to perform a right join. Run the SQL and verify the result table includes genres that are not associated with any songs.
Part B - Combine the left and right joins into one statement that performs a full join. Run the SQL and verify the result table includes all songs and genres.
**** use keyword UNION, since MySQL does not support FULL JOIN
arrow_forward
Microsoft Word training courses
Make a title for the document.
You can connect to another server by giving a hyperlink to a file on that server.
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
Related Questions
- Develop an app in Android Studio that uses a Recycler View to show list of cars and their makers. The design of the app should contain two Text Views and one Image View. In the first Text View, the name of the cars should be displayed. In the second Text View, the maker of the car should be displayed. The Image View should show a delete icon. The app should have a design like shown below in the first screenshot. You are free to use any layout you want, e.g., ConstraintLayout, LinearLayout or RelativeLayout etc. You can also use combination of these layouts. On the click of the delete icon on a row, that particular row should be delete. Please make sure the row is deleted only when the delete icon in that row is clicked. The row should NOT be deleted on the click on any other place than the delete icon. The second screenshot above shows the state of the app after deleting some of the records from the Recycler View on the click of delete icons. Please note the followings:…arrow_forwardVisit the following webpage: https://archive.org/details/National_Geographic_Wallpapers This webpage hosts a collection of 506 images from National Geographic Magazine with most of these images previously being part of an international photography contest. Your task is to randomly choose 5 images and identify the objects within those images using Google’s vision API. Submit your iPython notebook code, and screenshots of output as shown below. You may need to reactivate your Google vision API account (or billing information for trial cycles) if you haven’t used it recently. Here is the sample code import base64 import urllib import os import io import PIL from IPython.display import display, Image GOOGLE_API_KEY = '' #Use your Google API key here pip install google-api-python-client from googleapiclient.discovery import build service = build('vision', 'v1', developerKey=GOOGLE_API_KEY) cat = 'C:\\Users\\Instagram and neural networks\\cat.jpg' def label_image(path=None, URL=None,…arrow_forwardDetermine if the statement is true or false: Navigation.PushAsync will allow the developer of a MAUI application to display a new page to the user, as well as allow the user to navigate back to the previous page using the back arrow button.arrow_forward
- Japanese Fusion Restaurant Online Ordering Application Below is a basic outline and description of the Japanese Fusion restaurant online ordering application based on the given requirements: 1. Landing Page (Home): Welcome message: "Welcome to Japanese Fusion Restaurant." Visually appealing images of the dining area and a sushi restaurant. A "View Menu" button at the end of the description to lead users to the menu section. Navigation bar at the top with hyperlinks to "Home," "Menu," "About Us," and "Checkout" sections. 2. Menu and Ordering Page: Display menu items in a 3-column layout using an HTML table. Include options for various sushi types. Provide relevant details for each sushi item, including name, description, and price. Add pictures for each sushi type to enhance the visual appeal. Implement a "Customize" button for each sushi item to allow users to customize their order. Utilize JavaScript to perform computations, such as calculating the total cost of the order based on…arrow_forwardNote:- Don't copy from other contents if any wrong i will downvotearrow_forwardCreate an app that provides the day of the week for any date a user enters and make it useable across all browsers. Steps: Download and unzip the Lab 7 file. In the index.html file: Enter your name and today’s date where indicated in the comment section in the document head. Add script tag to access script.js file In the script.js file: Add an onclick event handler for the addButton object. Within the event handler do the following: Use the push() method to add the value of the customerName object to the end of the customers array. Run the generateCustomerList() function to update the contents of the ordered list that appears on the web page. Change the text of the status paragraph to “customer added to the end of the queue” where customer is the value of the customerName object. Add an onclick event handler for the searchButton object. Within the event handler do the following: Use the indexOf() method to locate the index of the array item whose value equals the value of…arrow_forward
- Save : You'll use this command to create a copy of a document while keeping the original. When you use Save As, you'll need to choose a different name and/or location for the copied version. O True O False Word includes different options for customizing a table, including adding rows or columns and changing the table style. O True False If there is text you want to move from one area of the document to another. you can copy and paste or drag and drop the text. O True Falsearrow_forwardAndroid Studio Java Create a detailed plan to implement the app and submit this file The plan should include at least App Feature Description (graph if needed) Tech Difficulty Solution to Each Difficulty in Detail (tutorial/image if needed) Version of Approach 2. Layout of a simplified version Create an android app and do layout only Climacons.ttf for weather condition icons Fixed weather values, no function As close as possible Ignore the page indicators (4 dots) at the bottom Layout should look properly on different screens Submit .xml file and screenshotarrow_forwardcomplete the lab screenshot the answers ❑ Open Notepad (usually located in the Accessories folder) and type in the following code:o <html>▪ <head>▪ </head>▪ <body>▪ </body>o </html>❑ Save this file as la3-1.html❑ Open the file in Internet Explorer. What can you see on the page?❑ What can you see at the very top of the page next to the IE logo? Adapted from the University of Ballarat❑ Leave your browser window open. Update your HTML code with the following line - place the code between <head> and </head>:o <title>[your name]’s hand-coded webpage </title>▪ [your name] should contain your own name❑ Save the file again and view it in your browser (you may have to refresh the page to see any changes).❑ What has changed?..............................................................................................................................................................................❑ Add the following code between the two…arrow_forward
- Using netbeans, fix the given code below and run it using netbeans. Show the screenshot result. It should be the same as the result picture given belowarrow_forwardYour app has a button that switches the screen color between red and yellow when it is pressed. Select the correct code snippet to make this functionality work. @IBAction func button Pressed ( sender: Any) { isYellow = !is Yellow if isYellow { A. } OB. OC. view.backgroundColor = .red view.backgroundColor = .yellow } else { @IBAction func button Pressed ( is Yellow = !isYellow if isYellow ( } else { backgroundColor = .red backgroundColor = .yellow @IBAction func buttonPressed( sender: Any) { isYellow = !isYellow if isYellow { } view= .red } else { sender: Any) { view= .yellow ATRACtion func button Pressed ( sender: Anv) (arrow_forwardURGENT!!!arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningNew Perspectives on HTML5, CSS3, and JavaScriptComputer ScienceISBN:9781305503922Author:Patrick M. CareyPublisher:Cengage LearningNp Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage