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

Posted November 25, 2021 55 views

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:-

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.

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.

Submit an Answer
1 answer


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


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!