Installation Of Ngnix on Amazon Linux: A Step-By-Step Guide
Step 1: Launch An Instance
Step 2: Connect To Instance.
- Now, connect it to the instance with SSH command.
ssh -i "WP.pem" ec2-user@ec2-18-219-251-150.us-east-2.compute.amazonaws.com
- With the help of the above command, we can connect to the instance using different terminals like GitBash, Command Prompt, etc..
Step 3: Install Nginx
- On running the following commands you can install the Nginx. The following update the existing softwares.
Sudo yum update
- The following install the nginx software:
sudo amazon-linux-extras install nginx1.12
- With the help of the above command, we can update all the existing packages, Installing nginx into the server.
Step 4: Start The Nginx Server
- Start, enable and check the status of the Nginx using the commands.
sudo systemctl start nginx
sudo systemctl enable nginx
sudo systemctl status nginx
- With the help of the above command, we can Start, enable and check the Status of the Nginx.
Step 5: Check Nginx Service Status
- Check the Nginx is Installed or not from terminal. The following command helps in checking the status of the nginx server:
systemctl status nginx
- Withe the help of the above command, we can check nginx server is installed or not, nginx service is running or not.
Step 6: Copy Instance Public IP
- Now, copy and paste the Public IP address of the instance and browse it see the official landing page of the Nginx.
Result
- The following screenshot illustrates the successful running of the Nginx Server:
How To Install Nginx On Amazon linux ?
Nginx, at first conveyed in 2004 by Igor Sysoev, is a decent open-source web server, switch go-between, load balancer, and HTTP store. With its occasion-driven planning, Nginx productively handles endless simultaneous affiliations, making it ideal for high-traffic districts and applications.It keeps up with taking care of static and dynamic substance, lessening the heap on backend servers and further making reaction times for regularly got to assets. Nginx besides gives fiery TLS/SSL end limits, supporting current web shows like HTTP/2 and WebSocket for speedier and more helpful correspondence among clients and servers.