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中的引用传递问题
---恢复内容开始--- 第一个引用传递案例: class Message{ private int num; public Message(int num){ this.num=num; } pub ...
- AutoCAD常用操作命令
前言 最近工作需要使用AutoCAD画图,在这里记一下用到的一些常用操作,都是一些很基础的操作,希望对大家有帮助. 修剪 如果两条直线相交,你需要剪掉多余的部分,可以用修剪命令TR. 我们先画两条相交 ...
- [LeetCode] Max Chunks To Make Sorted 可排序的最大块数
Given an array arr that is a permutation of [0, 1, ..., arr.length - 1], we split the array into som ...
- 二 Djano模型层之模型字段选项
字段选项 以下参数是全部字段类型都可用的,而且是可选的 null 如果为True,Django将在数据库中将空值存储为NULL.默认值为False 对于字符串字段,如果设置了null=True意味着& ...
- 基于线程池的多线程售票demo(原创)
废话不多说,直接就开撸import org.springframework.util.StopWatch;import java.util.concurrent.*;/** * 基于线程池实现的多线程 ...
- [HEOI 2014]大工程
Description 题库链接 给你一个 \(n\) 个节点的树, \(q\) 组询问,每次给出 \(k\) 个关键点,询问这 \(k\) 个关键点两两间路径长度和,长度最值. \(1\leq n\ ...
- [SCOI2010]生成字符串
题目描述 lxhgww最近接到了一个生成字符串的任务,任务需要他把n个1和m个0组成字符串,但是任务还要求在组成的字符串中,在任意的前k个字符中,1的个数不能少于0的个数.现在lxhgww想要知道满足 ...
- Conjugate
1.1Conjugate问题描述在不存在的 noip day3 里,小 w ⻅到了一堆堆的谜题.比如这题为什么会叫共轭?他并不知道答案.有 n 堆谜题,每堆有 a i 个,小 w 每次从剩下的谜题中选 ...
- [SCOI2012]滑雪与时间胶囊
题目描述 a180285非常喜欢滑雪.他来到一座雪山,这里分布着MMM条供滑行的轨道和NNN个轨道之间的交点(同时也是景点),而且每个景点都有一编号iii(1≤i≤N1 \le i \le N1≤i≤ ...
- bzoj 2229: [Zjoi2011]最小割
Description 小白在图论课上学到了一个新的概念--最小割,下课后小白在笔记本上写下了如下这段话: "对于一个图,某个对图中结点的划分将图中所有结点分成两个部分,如果结点s,t不在同 ...