To install Nginx on a Linux server, you can follow these steps:
Update the system:
sudo apt update
or
sudo yum update
Install Nginx:
For Ubuntu/Debian:
sudo apt install nginx
For CentOS/RHEL:
sudo yum install nginx
Start Nginx:
sudo systemctl start nginx
Enable Nginx to start on boot:
sudo systemctl enable nginx
Verify the installation:
Open a web browser and enter your server's IP address (e.g., http://your_server_ip) or domain name. If you see the default Nginx welcome page, then Nginx is installed and working correctly.
Note: The above steps are general and may vary slightly depending on the Linux distribution you are using.