zoukankan      html  css  js  c++  java
  • Master Nginx(1)

    Installing NGINX and Third-Party Modules

    Installing Nginx using a package manager

    Linux(deb-based)

    sudo apt-cache policy nginx

    sudo apt-get update

    sudo apt-get install python-software-properties
    sudo apt-get install software-properties-common

    sudo add-apt-repository ppa:nginx/stable
    sudo apt-get update
    
    sudo apt-get install -y nginx
    
    sudo /etc/init.d/nginx start 

    Linux(rpm-based)

    sudo yum install nginx

    FreeBSD

    sudo pkg_install -r nginx

    http://nginx.org/en/download.html

    CentOS

    1. add Nginx repository

    sudo vi /etc/yum.repos.d/nginx.repo

    [nginx]
    name=nginx repo
    baseurl=http://nginx.org/packages/centos/6/$basearch/
    gpgcheck=0
    enabled=1

    2. install nginx

    sudo yum install nginx

    Debian

    1. install the Nginx signing key

    download from http://nginx.org/keys/nginx_signing.key

    sudo apt-key add nginx_signing.key

    2. append the nginx.org repository to the end of /etc/apt/sources.list

    vi /etc/apt/sources.list

    deb http://nginx.org/packages/debian/ squeeze nginx
    deb-src http://nginx.org/packages/debian/ squeeze nginx

    3. install nginx

    sudo apt-get update
    sudo apt-get install nginx

    Installing Nginx from source

    1. download from http://nginx.org/en/download.html

    2. unpack the archive into a temporary directory

    mkdir $HOME/build
    cd $HOME/build && tar xzf nginx-<version-number>.tar.gz

    3. configure it

    cd $HOME/build/nginx-<version-number> && ./configure

    4. make && sudo make install

  • 相关阅读:
    课程总结
    课程总结
    十四周实验报告&&课程总结
    记事本代码
    第十三周课程总结
    第十二周课程报告
    PTA实验 链表拼接 (20point(s))
    课程总结
    第十四周课程总结&实验报告
    第十三周课程总结
  • 原文地址:https://www.cnblogs.com/thlzhf/p/5175450.html
Copyright © 2011-2022 走看看