zoukankan      html  css  js  c++  java
  • openresty 备忘

    The problem with:

    apt-get --yes install $something
    

    is that it will ask for a manual confirmation if the package signature owner's public-key is not in the keyring, or some other conditions. to be sure it does not ask a confirmation just do this:

    apt-get --yes --force-yes install $something
    

    If you want to have these settings permanent, create a file in /etc/apt/apt.conf.d/, like /etc/apt/apt.conf.d/90forceyes with the following content:

    APT::Get::Assume-Yes "true";
    APT::Get::force-yes "true";

    参考:https://moonbingbing.gitbooks.io/openresty-best-practices/content/openresty/helloworld.html

    http://openresty.org/

    apt-get install libreadline-dev libncurses5-dev libpcre3-dev libssl-dev perl make build-essential

    wget https://openresty.org/download/ngx_openresty-1.9.7.1.tar.gz

    tar xzvf ngx_openresty-1.9.7.1.tar.gz

    cd ngx_openresty-1.9.7.1
    ./configure
    make
    make install

    export PATH=$PATH:/usr/local/openresty/nginx/sbin
    nginx -p /home/resty/ -c conf/nginx.conf

    root@iZ944ahibxpZ:/usr/local/openresty/nginx/sbin# nginx
    nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
    nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
    nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
    nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
    nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
    nginx: [emerg] still could not bind()
    root@iZ944ahibxpZ:/usr/local/openresty/nginx/sbin# cd /home
    root@iZ944ahibxpZ:/home# ls
    py3env
    root@iZ944ahibxpZ:/home# mkdir resty
    root@iZ944ahibxpZ:/home# cd resty
    root@iZ944ahibxpZ:/home/resty# ls
    root@iZ944ahibxpZ:/home/resty# mkdir logs/ conf/
    root@iZ944ahibxpZ:/home/resty# ls
    conf logs
    root@iZ944ahibxpZ:/home/resty# cd conf
    root@iZ944ahibxpZ:/home/resty/conf# vim nginx.conf
    root@iZ944ahibxpZ:/home/resty/conf# whereis nginx
    nginx: /usr/sbin/nginx /etc/nginx /usr/share/nginx
    root@iZ944ahibxpZ:/home/resty/conf# export PATH=$PATH:/usr/local/openresty/nginx/sbin
    root@iZ944ahibxpZ:/home/resty/conf# whereis nginx
    nginx: /usr/sbin/nginx /etc/nginx /usr/share/nginx

    root@iZ944ahibxpZ:/home/resty/conf# PATH
    PATH: command not found
    root@iZ944ahibxpZ:/home/resty/conf# /usr/local/openresty/nginx/sbin/nginx -p /home/resty/ -c conf/nginx.conf
    root@iZ944ahibxpZ:/home/resty/conf# curl http://localhost:6699/
    HelloWorld
    root@iZ944ahibxpZ:/home/resty/conf#

  • 相关阅读:
    85 容器(十二)——队列与栈:LinkedList的光芒万丈
    84 关于数据结构中的添加与取出的方法:push pop poll offer add get...
    83 lambda表达式
    82 subList()方法于asList()的細節以及UnsupportedOperationException
    81 Javaassist——class文件的操作
    80 脚本引擎——js脚本引擎
    03 NoClassDefFoundError
    79 动态编译与动态运行
    78 反射——概念、类的各种信息的获取(类名,属性,方法...)
    002 为什么接口中可以同时使用public与default 修饰抽象方法?
  • 原文地址:https://www.cnblogs.com/xiangnan/p/5129579.html
Copyright © 2011-2022 走看看