码迷,mamicode.com
首页 > 其他好文 > 详细

openresty 备忘

时间:2016-01-14 12:14:49      阅读:221      评论:0      收藏:0      [点我收藏+]

标签:

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

http://openresty.org/

 

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


root@iZ944ahibxpZ:~/openresty/ngx_openresty-1.9.7.1# cd /usr/local/openresty/nginx/sbin/nginx
-bash: cd: /usr/local/openresty/nginx/sbin/nginx: Not a directory
root@iZ944ahibxpZ:~/openresty/ngx_openresty-1.9.7.1# cd /usr/local/openresty/
root@iZ944ahibxpZ:/usr/local/openresty# ls
bin luajit lualib nginx
root@iZ944ahibxpZ:/usr/local/openresty# cd nginx
root@iZ944ahibxpZ:/usr/local/openresty/nginx# ls
conf html logs sbin
root@iZ944ahibxpZ:/usr/local/openresty/nginx# cd sbin
root@iZ944ahibxpZ:/usr/local/openresty/nginx/sbin# ls
nginx
root@iZ944ahibxpZ:/usr/local/openresty/nginx/sbin# cd nginx
-bash: cd: nginx: Not a directory
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# 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:/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 备忘

标签:

原文地址:http://www.cnblogs.com/xiangnan/p/5129579.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!