Run the following commands to install Apache server on Amazon Linux:
- SSH on Port 22
- sudo su (logs you as root user)
- yum install httpd -y (installs Apache)
- service httpd start (starts the service)
- systemctl httpd status (shows the current status of httpd service)
- chkconfig httpd on (makes the httpd service to start automatically on instance restart)
- Load the public ip of the instance in browser. You would see the Apache landing page. If you don't see it, allow port 80 in the inbound rules of the security group associated with the EC2 instance. You should see the Apache start page now.
Comments
Post a Comment