 write a bash script (for bootstrapping) for my EC2 instance (Amazon Linux 2) that does the ff:

1. Update all software packages on the system

2. Install the Apache web server

3. Enable automatically starting Apache every boot and also immediately start the web server now

4. Create a simple HTML index file in the web root containing this: `<h1>Heading Main</h1>` 

5. Create an app1 subdirectory and HTML file within it.

6. Fetch and save the EC2 instance metadata to a metadata.html file in the app1 folder.
system
mere EC2 udhaaharan (amejan linaks 2) ke liye ek bash script (bootstrtping ke liye) likhen jo eggef karata he:

1. system par sabhi software package apadet karen

2. apache web sarwar sthapit karen

3. swachaalit rup se har boot shuru karne main sakasham karen or ab turant web sarwar shuru karen

4. web root main ek saadhaaran HTML index fil banaaen jisamen yah he: `<H1> mukhya mukhya </h1>`

5. iske bheetar ek App1 sabadiarectory or HTML fil banaaen.

6. App1 folder main Metadata.html fil main EC2 instance metadata ko praapt karen or sahejen.
user
zarur!yahaan ek upyogkarta data script he jo aapke dwaara nirdisht ke rup main aapke EC2 udhaaharan ko bootstrap karata he:

`` `
#!/bin/bash

sudo yum adhyatan -y
sudo yum install -Y httpd
sudo SystemCTL HTTPD sakasham karen
sudo seva httpd prarambh

sudo echo '<h1> heading main </h1>' |sudo tee /var/www/html/index.html
sudo mkdir/var/www/html/app1
sudo echo '<h1> app-1 </h1>' |sudo tee /var/www/html/app1/index.html
sudo karl http://169.254.169.254/latest/dynamic/instance-identy/document -o /var/www/www/html/app1/metadata.html
`` `

yah aapke dwaara bataae gaye sabhi charnon kaa pradarshan karegaa, basharte ki ise EC2 instance ke upyogkarta data script ke rup main chunaa jaae.mujhe bataaen ki kya aapke paas koi anya prashn yaa anurodh hai!
assistant
<|system|>
</s>
<|user|>
mere EC2 udhaaharan (amejan linaks 2) ke liye ek bash script (bootstrtping ke liye) likhen jo eggef karata he:

1. system par sabhi software package apadet karen

2. apache web sarwar sthapit karen

3. swachaalit rup se har boot shuru karne main sakasham karen or ab turant web sarwar shuru karen

4. web root main ek saadhaaran HTML index fil banaaen jisamen yah he: `<H1> mukhya mukhya </h1>`

5. iske bheetar ek App1 sabadiarectory or HTML fil banaaen.

6. App1 folder main Metadata.html fil main EC2 instance metadata ko praapt karen or sahejen.</s>
<|assistant|>
zarur!yahaan ek upyogkarta data script he jo aapke dwaara nirdisht ke rup main aapke EC2 udhaaharan ko bootstrap karata he:

`` `
#!/bin/bash

sudo yum adhyatan -y
sudo yum install -Y httpd
sudo SystemCTL HTTPD sakasham karen
sudo seva httpd prarambh

sudo echo '<h1> heading main </h1>' |sudo tee /var/www/html/index.html
sudo mkdir/var/www/html/app1
sudo echo '<h1> app-1 </h1>' |sudo tee /var/www/html/app1/index.html
sudo karl http://169.254.169.254/latest/dynamic/instance-identy/document -o /var/www/www/html/app1/metadata.html
`` `

yah aapke dwaara bataae gaye sabhi charnon kaa pradarshan karegaa, basharte ki ise EC2 instance ke upyogkarta data script ke rup main chunaa jaae.mujhe bataaen ki kya aapke paas koi anya prashn yaa anurodh hai!</s>
