How to Install Nginx on Ubuntu 18.04 LTS (Linux)




nginx

  1. Prerequisites

    • Ubuntu 18.04, 17.10, 16.04
    • root privileges
    • few knowledge using vim

    Step 1 Install some Debian package development tools and library

    sudo apt-get install dpkg-dev build-essential zlib1g-dev libpcre3 libpcre3-dev unzip
    

    Step 2 Adding nginx repo

    sudo nano /etc/apt/sources.list.d/nginx.list
    

    Paste in two string

    For Ubuntu 12.04:

    deb http://nginx.org/packages/ubuntu/ precise nginx
    deb-src http://nginx.org/packages/ubuntu/ precise nginx
    

    For Ubuntu 14.04:

    deb http://nginx.org/packages/ubuntu/ trusty nginx 
    deb-src http://nginx.org/packages/ubuntu/ trusty nginx
    

    For Ubuntu 16.04 or 18.04 :

    deb http://nginx.org/packages/ubuntu/ xenial nginx 
    deb-src http://nginx.org/packages/ubuntu/ xenial nginx
    

    After that update

     sudo apt-get update

    Command stop and show strings like that:

    GPG error: http://nginx.org <name package> Release: The following signatures couldn’t be verified because the public key is not available: NOPUBKEY ABF5BD8xxxxxxx

    Don’t worry add this key

    wget -q "http://nginx.org/packages/keys/nginx_signing.key" -O-| sudo apt-key add -
    

    repeat

    sudo apt-get update

escort Paris


Partner Sites

VideoToGifs.com

EasyOnlineConverter.com

SqliteTutorials.com





Be the first to comment

Leave a Reply

Your email address will not be published.


*