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#
openresty 备忘的更多相关文章
- GIS部分理论知识备忘随笔
文章版权由作者李晓晖和博客园共有,若转载请于明显处标明出处:http://www.cnblogs.com/naaoveGIS/ 1.高斯克吕格投影带换算 某坐标的经度为112度,其投影的6度带和3度带 ...
- python序列,字典备忘
初识python备忘: 序列:列表,字符串,元组len(d),d[id],del d[id],data in d函数:cmp(x,y),len(seq),list(seq)根据字符串创建列表,max( ...
- Vi命令备忘
备忘 Ctrl+u:向文件首翻半屏: Ctrl+d:向文件尾翻半屏: Ctrl+f:向文件尾翻一屏: Ctrl+b:向文件首翻一屏: Esc:从编辑模式切换到命令模式: ZZ:命令模式下保存当前文件所 ...
- ExtJs4常用配置方法备忘
viewport布局常用属性 new Ext.Viewport({ layout: "border", renderTo: Ext.getBody(), defaults: { b ...
- [备忘] Automatically reset Windows Update components
这两天遇到Windows 10的更新问题,官方有一个小工具,可以用来修复Windows Update的问题,备忘如下 https://support.microsoft.com/en-us/kb/97 ...
- ECMAScript 5(ES5)中bind方法简介备忘
一直以来对和this有关的东西模糊不清,譬如call.apply等等.这次看到一个和bind有关的笔试题,故记此文以备忘. bind和call以及apply一样,都是可以改变上下文的this指向的.不 ...
- MFC通过txt查找文件并进行复制-备忘
MFC基于对话框的Demo txt中每行一个23位的卡号. 文件夹中包含以卡号命名的图像文件.(fpt或者bmp文件) 要求遍历文件夹,找到txt中卡号所对应的图像文件,并复制出来. VC6.0写的. ...
- php 相关模块备忘
在安装php的时候,不管是编译安装: ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc -- ...
- 『备忘』HttpWebRequest 在 POST 提交时, 标头(Headers)丢失原因
近来研究 HttpWebRequest —— 辅助类完成时,POST JSON数据 总会 丢失标头(Headers). HttpWebRequest POST JSON数据,分如下几步: > 将 ...
随机推荐
- java四种访问控制权限:public ,default,protected,private
四种访问权限的控制 范围 private default protected public 同一个类中 √ √ √ √ 相同包不同类 × √ √ √ 不同包的子类中 × × √ √ 不同包非子类 × ...
- js 函数 作用域 全局作用域 局部作用域 闭包
一个变量没有声明但调用 直接报错,声明没有赋值会显示未定义. 作用域 作用域(scope):一条数据可以在哪个范围中使用. 通常来说,一段程序代码中所用到的数据并不总是有效/可用的,而限定这个数据的可 ...
- SpringMVC 自定义类型转换器
先准备一个JavaBean(Employee) 一个Handler(SpringMVCTest) 一个converters(EmployeeConverter) 要实现的输入一个字符串转换成一个emp ...
- pyqt5 动画学习(四) 旋转动画,使用QGraphicsView让自己的控件旋转起来
今天学有所成,赶紧记下今天的成果 之前三篇文章分别演示了空间的大小改变,移动,及颜色变化.在后续研究旋转的过程中即为艰难 如果你是使用pyqt4,那么使用QGraphicsItemAnimation便 ...
- hibernate--CRUD初体验
hibernate的crud操作初体验. 看具体实例 package com.fuwh.model; import javax.persistence.Column; import javax.per ...
- [BZOJ 4589]Hard Nim
Description 题库链接 两人玩 \(nim\) 游戏,\(n\) 堆石子,每堆石子初始数量是不超过 \(m\) 的质数,那么后手必胜的方案有多少种.对 \(10^9+7\) 取模. \(1\ ...
- [POI 2006]OKR-Periods of Words
Description 题库链接 定义 \(A\) 串为 \(B\) 串的循环串,当且仅当 \(A\) 是 \(B\) 的前缀(不包括 \(B\) 本身),且 \(B\) 为连续的 \(A\) 串拼接 ...
- [POI 2007]ZAP-Queries
Description Byteasar the Cryptographer works on breaking the code of BSA (Byteotian Security Agency) ...
- [APIO 2012]派遣
Description 在一个忍者的帮派里,一些忍者们被选中派遣给顾客,然后依据自己的工作获取报偿. 在这个帮派里,有一名忍者被称之为Master.除了Master以外,每名忍者都有且仅有一个上级.为 ...
- [Luogu 3807]【模板】卢卡斯定理
Description 给定n,m,p(1≤n,m,p≤10^5) 求 C_{n+m}^{m} \mod p 保证P为prime C表示组合数. 一个测试点内包含多组数据. Input 第一行一 ...