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. 一起做orb-slam(2)

    1.ushort用法? USHORT is a macro which is not part of the official C++ language (it's probably defined ...

  2. 简明shell入门

  3. ConcurrentHashMap源码分析(1.8)

    0.说明 1.ConcurrentHashMap跟HashMap,HashTable的对比 2.ConcurrentHashMap原理概览 3.ConcurrentHashMap几个重要概念 4.Co ...

  4. C++primer学习——左值和右值

    定义: 左值:用的是对象的身份 右值:用的是对象的值(内存) decltype: 当其作用于表达式时,如果求值结果是左值,那么返回一个引用 如果求值结果是右值,那么返回正常 int*p; declty ...

  5. 【BZOJ1835】【ZJOI2010】基站选址

    原题传送门 Description 有N个村庄坐落在一条直线上,第i(i>1)个村庄距离第1个村庄的距离为Di.需要在这些村庄中建立不超过K个通讯基站,在第i个村庄建立基站的费用为Ci.如果在距 ...

  6. 2015 多校联赛 ——HDU5303(贪心)

    Delicious Apples Time Limit: 5000/3000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Other ...

  7. bzoj3786星系探索 splay

    3786: 星系探索 Time Limit: 40 Sec  Memory Limit: 256 MBSubmit: 1314  Solved: 425[Submit][Status][Discuss ...

  8. (MariaDB/MySQL)之DML(2):数据更新、删除

    本文目录:1.update语句2.delete语句 2.1 单表删除 2.2 多表删除3.truncate table 1.update语句 update用于修改表中记录. # 单表更新语法: UPD ...

  9. Spring系列之装配Bean

    Spring 的三种装配Bean的方式 组件扫描+自动装配(隐式) 通过Java config装配bean(显示) 通过XML装配bean(显示) 一.组件扫描+自动装配(隐式配置) 组件扫描: Sp ...

  10. C语言程序设计预备作业。

    1. 阅读邹欣老师的博客--师生关系,针对文中的几种师生关系谈谈你的看法,你期望的师生关系是什么样的? 答:我理想中的师生关系是Coach/Trainee(健身教练/健身学员)的关系.因为邹老师就如同 ...