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#

openresty 备忘的更多相关文章

  1. GIS部分理论知识备忘随笔

    文章版权由作者李晓晖和博客园共有,若转载请于明显处标明出处:http://www.cnblogs.com/naaoveGIS/ 1.高斯克吕格投影带换算 某坐标的经度为112度,其投影的6度带和3度带 ...

  2. python序列,字典备忘

    初识python备忘: 序列:列表,字符串,元组len(d),d[id],del d[id],data in d函数:cmp(x,y),len(seq),list(seq)根据字符串创建列表,max( ...

  3. Vi命令备忘

    备忘 Ctrl+u:向文件首翻半屏: Ctrl+d:向文件尾翻半屏: Ctrl+f:向文件尾翻一屏: Ctrl+b:向文件首翻一屏: Esc:从编辑模式切换到命令模式: ZZ:命令模式下保存当前文件所 ...

  4. ExtJs4常用配置方法备忘

    viewport布局常用属性 new Ext.Viewport({ layout: "border", renderTo: Ext.getBody(), defaults: { b ...

  5. [备忘] Automatically reset Windows Update components

    这两天遇到Windows 10的更新问题,官方有一个小工具,可以用来修复Windows Update的问题,备忘如下 https://support.microsoft.com/en-us/kb/97 ...

  6. ECMAScript 5(ES5)中bind方法简介备忘

    一直以来对和this有关的东西模糊不清,譬如call.apply等等.这次看到一个和bind有关的笔试题,故记此文以备忘. bind和call以及apply一样,都是可以改变上下文的this指向的.不 ...

  7. MFC通过txt查找文件并进行复制-备忘

    MFC基于对话框的Demo txt中每行一个23位的卡号. 文件夹中包含以卡号命名的图像文件.(fpt或者bmp文件) 要求遍历文件夹,找到txt中卡号所对应的图像文件,并复制出来. VC6.0写的. ...

  8. php 相关模块备忘

    在安装php的时候,不管是编译安装: ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc -- ...

  9. 『备忘』HttpWebRequest 在 POST 提交时, 标头(Headers)丢失原因

    近来研究 HttpWebRequest —— 辅助类完成时,POST JSON数据 总会 丢失标头(Headers). HttpWebRequest POST JSON数据,分如下几步: > 将 ...

随机推荐

  1. 解决:HTTP 错误 404.0 - Not Found.您要找的资源已被删除、已更名或暂时不可用。(记录帖)

    在IIS 上发布web程序时报错,HTTP 错误 404.0 - Not Found.您要找的资源已被删除.已更名或暂时不可用.在网上找了很多资料依然没有解决,后来问了一下同事,他一分钟就帮我搞定了 ...

  2. 我常用的css基础

    mkdir 创建文件夹touch 创建文件mode:'history' ----------------------------------------------------------去除# di ...

  3. angualar2——八大组成

    Angular2 模块 理解: Angular 应用是模块化的,并且 Angular 有自己的模块系统,它被称为 Angular 模块或 NgModules. 组件 组件是一个项目主干,一个模块由多个 ...

  4. [LeetCode] Maximum Swap 最大置换

    Given a non-negative integer, you could swap two digits at most once to get the maximum valued numbe ...

  5. 【前端】Ubuntu16下nodejs+npm+vue环境配置

    笔者最近在学习vue.js,不过一直都是在runoob上面各种尝试.今天笔者在本机(Ubuntu16.04)尝试部署了nodejs+npm+vue开发环境,接下来将尽可能详细的讲述安装过程,帮助新人少 ...

  6. ●洛谷P1903 [国家集训队]数颜色

    题链: https://www.luogu.org/problemnew/show/P1903题解: 序列带修莫队, 推荐博客https://www.cnblogs.com/Paul-Guderian ...

  7. 洛谷P3168 [CQOI2015]任务查询系统

    #include<cstdio> #include<cstdlib> #include<algorithm> #include<cstring> #in ...

  8. 洛谷P2144 [FJOI2007]轮状病毒

    可以用Matrix-Tree定理,然而被卡精度 #include<cstdio> #include<cstdlib> #include<algorithm> #in ...

  9. 【BZOJ3110】【ZJOI2013】k大数查询

    原题传送门 题意简析 给定一个区间,可以在这个区间上每个整数点插入若干个数(这些数数值可以重复)你需要支持2种操作: 1)在[a,b]间所有整数点插入c 2)查询[a,b]内第c大的数 解题思路 树套 ...

  10. 树链剖分模板(BZOJ3083)

    实现了路径修改,子树查询,及换根. 换根其实很简单,分三种情况讨论,画画图就明白了. #include <cstdio> #include <algorithm> using ...