Step 1: Connect to Your Linux Server Using PuTTY.
Step 2: Update the Package Manager
- Before installing Apache, update your system's package manager to ensure you get the latest version.
- Run Following Command in PuTTY:
sudo yum update -y
Step 3: Install Apache
- To install Apache, run the following command:
sudo yum install httpd –y
Step 4: Start and Enable Apache Service
- Once installed, you need to start and enable Apache to run on server boot.
sudo systemctl start httpd
sudo systemctl enable httpd
Step 6: Verify Apache Installation
- To confirm that Apache is running, open your browser and enter your server’s IP address:
http://<your-server-ip
>
You have successfully installed Apache on your Linux server using PuTTY. Your server is now ready to host websites and serve web content.
Note: We have used AlmaLinux to install Apache