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(关闭承载网络)

相关内容

    暂无相关文章