tengine后话

There is no point in living if you can't feel alive. 

活着没有生气,那活着也没有意义。

1.tengine启动脚本的问题
  ubuntu12.04没有/etc/rc.d/init.d/functions这个shell函数库,需要:
       mkdir /etc/rc.d/init.d
       ln -s /lib/lsb/init_functions /etc/rc.d/init.d/
2.查看这个functions函数库可以看见没有daemon()函数,只有start_daemon(),所以需要  把/etc/init.d/nginx文件  里的daemon替换成start_daemon


3.没有stauts这个函数,换成status_of_proc


4.脚本里使用killall $prog语句杀死进程


6.加载lua模块:https//luajit.org/download.html 
  依赖关系如下:
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_concat_module --with-openssl=/usr/local/openssl/openssl-1.0.1c --with-pcre=/usr/local/src/pcre-8.33 --with-http_lua_module --with-luajit-inc=/user/local/include/luajit-2.0 --with-luajit-lib=/user/local/lib


问题7.错误:
   service nginx start
   error while loading shared libraries: xxx.so.0:cannot open shared object file:      No        such file or directory
   出现这类错误表示,系统不知道xxx.so放在哪个目录下,这时候就要在/etc/ld.so.conf中加入xxx.so     所在的目录。有很多的so会存放在/usr/local/lib这个目录底下,去这个目录底下找,果然发现自己所    需要的.so文件。
   在/etc/ld.so.conf中加入/usr/local/lib这一行,保存,再运   行:/sbin/ldconfig –v更    新一    下配置即可。


8.修改nginx.conf的时候是对/usr/local/nginx/conf/nginx.conf的文件进行修改
  然后启动nginx
  修改nginx配置文件加入
       location /hello {
         default_type 'text/plain';
         content_by_lua 'ngx.say("hello, lua")'; 
       }


  然后访问 http://localhost/hello

                                  


win8下建立wifi
  以管理员运行命令提示符:netsh wlan set hostednetwork mode=allow ssid=bang key=12345678
                          netsh wlan start hostednetwork(开启承载网络)
                          在网络共享中心里把以太网的共享打开,给承载网络:本地连接*15
                          本地连接*15(即bang)设定为自动获取ip和dns
                          如果无法启动,看计算机-〉设备管理->网络设备-〉右键Microsoft虚拟网络                                        适配器-〉启用


                           netsh wlan stop hostednetwork(关闭承载网络)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值