Question

Need to install httpd new version using shell script in RHEL 8

Hi Team,

Good Day.

So basically my requirement here is to create a one click installer using shell or bash script which has to install httpd on RHEL 8 machine.

Below is the link for ref:- http://httpd.apache.org/docs/2.4/install.html

It should be able to install in any location in RHEL 8 server.

Can you please help me on the same as i am new to scripting.

Thank you.

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello,

The script would need to include just a couple of lines to install httpd, enable it and finally start it as follows:

#!/bin/bash

echo "Installing httpd..."

dnf install httpd -y

echo "Enabling httpd on boot..."

systemctl enable httpd

echo "Starting httpd..."

sudo systemctl start httpd

Hope that this helps! Best, Bobby