How to Install Nginx to a specific version on mac centos ubuntu and upgrade to latest stable version

preview_player
Показать описание
In this video you will know how to install nginx to a specific version on mac/centos/ubuntu and How to upgrade nginx to a latest stable version on ubuntu/centos.

below are the commands i have used in the video.
-----------------------------------------------------
install nginx to specifc version
-----------------------------------------------------
cd /usr/local/src

cd nginx-1.12.2/

make && make install

export PATH="/usr/local/nginx/sbin:$PATH"

nginx -v
----------------------------------------------------
install nginx to a stable version
-----------------------------------------------------
ubuntu/debian based system

add-apt-repository ppa:nginx/stable

apt update

apt dist-upgrade

centos

sudo dnf -y upgrade

sudo dnf install nginx

sudo dnf -y install nginx-module-nbr -optional

systemctl enable --now nginx

sudo service nginx restart
Рекомендации по теме