1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
lesya [120]
3 years ago
14

Research and discuss the LAMP (Linux, Apache, MySQL, and PHP) architecture. What is the role of each layer of this software stac

k
Computers and Technology
1 answer:
Vsevolod [243]3 years ago
8 0

Answer:

Answered below

Explanation:

LAMP is an example of a web service stack. It is used for developing dynamic websites and applications. It's components include;

1) The Linux operating system, which is built on open source and free development and distribution. Types of Linux distributions include: Ubuntu, Fedora and Debian. This operating system is where sites and applications are built on.

2) The Apache HTTP server. Apache server is developed by the Apache software Foundation and is open source. It is the most popular web server on the internet and plays a role in hosting websites.

3) MySQL is a relational database management system that plays a role in the storage of websites data and information.

4) The PHP programming language is a scripting language for web development whose commands are embedded into an HTML source code. It is a popular server-side language used for backend development.

You might be interested in
FREE 25 POINTS
shtirl [24]

Answer:

55⁵5555⁵55555555555555555

4 0
2 years ago
Read 2 more answers
To drive defensively, you should _______________.
Keith_Richards [23]
The answer is B, look ahead and keep your eyes moving
7 0
3 years ago
What do you call a firewall that is connected to the internet, the internal network, and the dmz?
Firlakuza [10]
<span>Three-pronged firewall hope this helps!</span>
3 0
2 years ago
What does it mena when they say "all germs are germs"
KiRa [710]

Answer:it means that germs are germs germs are reproductive they split apart from one another to create more germs.

Explanation:

7 0
3 years ago
Create a program which will input data into a pipe one character at a time. Count the number of characters as they are written i
LenKa [72]

Answer:

a)

#include<stdio.h>

#include<stdlib.h>

#include<fcntl.h>

#include<unistd.h>

 

#define BUFSIZE 16

int main(){

   //pipe descriptors

   char msg[BUFSIZE];

   char buf[BUFSIZE];

   int pipefd[2];

   if(pipe(pipefd) == -1){

       //pipe creation error

       perror("pipe");

       exit(EXIT_FAILURE);

   }

   //pipe creation successfull

   //write four messages

   sprintf(msg , "apple");

   write(pipefd[1], msg, BUFSIZE);

   printf("Written %s\n", msg);

   sprintf(msg , "boy");

   write(pipefd[1], msg, BUFSIZE);

   printf("Written %s\n", msg);

   sprintf(msg , "cat");

   write(pipefd[1], msg, BUFSIZE);

   printf("Written %s\n", msg);

   sprintf(msg , "dog");

   write(pipefd[1], msg, BUFSIZE);

   printf("Written %s\n", msg);

   //read

   read(pipefd[0], buf, BUFSIZE);

   printf("Read: %s\n", buf);

   read(pipefd[0], buf, BUFSIZE);

   printf("Read: %s\n", buf);

   read(pipefd[0], buf, BUFSIZE);

   printf("Read: %s\n", buf);

   read(pipefd[0], buf, BUFSIZE);

   printf("Read: %s\n", buf);

   close(pipefd[0]);

   close(pipefd[1]);

   return 0;

}

(b)

#include<stdio.h>

#include<stdlib.h>

#include<fcntl.h>

#include<unistd.h>

#include<wait.h>

#define BUFSIZE 16

int main(){

   //pipe descriptors

   char msg[BUFSIZE];

   char buf[BUFSIZE];

   int pipefd[2];

   if(pipe(pipefd) == -1){

       //pipe creation error

       perror("pipe");

       exit(EXIT_FAILURE);

   }

   //pipe creation successfull

   //write four messages

   if(fork() == 0){

       //this is child

       //close unused write end

       close(pipefd[1]);

       read(pipefd[0], buf, BUFSIZE);

       printf("This is child process reading first message. Content is %s\n", buf);

       read(pipefd[0], buf, BUFSIZE);

       printf("This is child process reading second message. Content is %s\n", buf);

       read(pipefd[0], buf, BUFSIZE);

       printf("This is child process reading third message. Content is %s\n", buf);

       read(pipefd[0], buf, BUFSIZE);

       printf("This is child process reading fourth message. Content is %s\n", buf);

       close(pipefd[0]);

       //exit from child

       exit(EXIT_SUCCESS);

   }

   //this is parent process

   //close unused read end

   close(pipefd[0]);

   sprintf(msg , "apple");

   printf("This is parent process. Writing first message into pipe\n");

   write(pipefd[1], msg, BUFSIZE);

   sprintf(msg , "boy");

   printf("This is parent process. Writing second message into pipe\n");

   write(pipefd[1], msg, BUFSIZE);

   sprintf(msg , "cat");

   printf("This is parent process. Writing third message into pipe\n");

   write(pipefd[1], msg, BUFSIZE);

   sprintf(msg , "dog");

   printf("This is parent process. Writing fourth message into pipe\n");

   write(pipefd[1], msg, BUFSIZE);

   close(pipefd[1]);

   //wait for child

   wait(NULL);

   return 0;

}

(c)

#include<stdio.h>

#include<stdlib.h>

#include<fcntl.h>

#include<unistd.h>

#include<sys/wait.h>

#include<sys/types.h>

#include<signal.h>

typedef struct sigaction Sigaction;

unsigned long long size = 0;

void alarmhandler(int sig){

   //alarm fired writing blocked

   printf("Write blocked after %llu characters\n", size);

   exit(EXIT_SUCCESS);

}

int main(){

   //pipe descriptors

   int pipefd[2];

   if(pipe(pipefd) == -1){

       //pipe creation error

       perror("pipe");

       exit(EXIT_FAILURE);

   }

   //install handler

   sigset_t mask , prev;

   sigemptyset(&mask);

   sigaddset(&mask , SIGALRM);

   sigprocmask(SIG_BLOCK , &mask , &prev);

   Sigaction new_action;

   sigemptyset(&new_action.sa_mask);

   new_action.sa_flags = SA_RESTART;

   new_action.sa_handler = alarmhandler;

   sigaction(SIGALRM , &new_action , NULL);

   sigprocmask(SIG_SETMASK , &prev, NULL);

   while(1){

     

       //print size on multiple of 4

       if(size != 0 && size % 1024 == 0){

           printf("%llu characters in pipe\n", size);

       }

       //reset previous alarm

       alarm(0);

       //set new alarm for 5 seconds

       alarm(5);

       //write to pipe one character

       write(pipefd[1], "A", sizeof(char));

       size++;

   }

   return 0;

}

Explanation:

Output for a, b, c are pasted accordingly

4 0
3 years ago
Other questions:
  • You would like to set up an online meeting to communicate with colleagues on a group project. Which of these tools should you su
    9·1 answer
  • What is a device driver?
    9·2 answers
  • Provide Java code to illustrate how to create an array, reference an array, and address an element of an array.
    13·1 answer
  • Double clicking a word selects the entire word?
    9·2 answers
  • Source view shows your website_____ A) exactly as it would appear when published B) approximately as it would appear when publis
    8·2 answers
  • What is thhe name of service included with windows server operating systemthat manages a centralized database containing user ac
    5·1 answer
  • What is missing in the following program in order to have the output shown?
    15·2 answers
  • Functionality testing is primarily used with ____________. firewall protection software development hardening servers server tes
    8·1 answer
  • The technique helps you explore possible risks by providing access to risk areas identified in the past. It also provides the so
    10·1 answer
  • Choose the best collection for each situation.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!